A very simple NPZ file time series logger for MQTT events
Project description
Simple MQTT time series logger
Work in progress, not production ready
This is a very simple (Python) logging daemon that subscribes
to multiple MQTT topics and logs received messages including
timestamps into daily npz
files. The way it currently works
is really crude so it's only useable for low rate measurements
like minutely temperatures or alike. All data is read and written
for each measurement at the moment (this will change in future).
The service is configured by a configuration file (by default
at ~/.config/mqttserieslogger.cfg
.
Installation
pip install mqtttimeserieslogger-tspspi
Sample configuration
{
"datasources" : [
{
"broker" : {
"broker" : "10.4.1.1",
"user" : "quasem",
"password" : "XXXX",
"basetopic" : "quasem/experiment/"
},
"quantities" : [
{
"name": "pt1000pcb",
"topic" : "cryo/temperature/pt1000pcb",
"field" : [ "temperature", "temperature_C" ]
}
]
}
]
}
Automatic launching with rc.init
script
#!/bin/sh
# PROVIDE: mqtttimeserieslogger
# REQUIRE: NETWORKING SERVERS
# Simple MQTT time series logger
#
# RC configuration variables:
# mqtttimeserieslogger_enable:="NO"
# Enables the logging service
. /etc/rc.subr
name="mqtttimeserieslogger"
rcvar=mqtttimeserieslogger_enable
load_rc_config $name
: ${mqtttimeserieslogger_enable:="NO"}
command=/usr/local/bin/mqtttimeserieslogger
load_rc_config $name
run_rc_command "$1"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mqtttimeserieslogger_tspspi-0.0.5.tar.gz
.
File metadata
- Download URL: mqtttimeserieslogger_tspspi-0.0.5.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ba5fe686448b3f315e71d2dec4b6a0461997ce38f5c617300e2fa60a1d68345 |
|
MD5 | 0b02eea38d11588a49f0099539670fb9 |
|
BLAKE2b-256 | e7b76bf41afec1f09654d9c0458046c57af11b9b3827dc44dd62b578cadf7195 |
File details
Details for the file mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04519f0743d5e294d7628fe7ebd02af96149b2c9662b8468703c26cdca89030e |
|
MD5 | b149b2517bceefaf91a6e2841ff98ebc |
|
BLAKE2b-256 | 70a91a15ac1d3d41916475c365156c7e13316330eac8ae6c64a03b88b8d302e8 |