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"
Metadata
Release files for mqtttimeserieslogger-tspspi 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mqtttimeserieslogger_tspspi-0.0.5.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / mqtttimeserieslogger_tspspi-0.0.5.tar.gz
| Download URL | mqtttimeserieslogger_tspspi-0.0.5.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ba5fe686448b3f315e71d2dec4b6a0461997ce38f5c617300e2fa60a1d68345
|
|
BLAKE2b-256 checksum How to use checksums |
e7b76bf41afec1f09654d9c0458046c57af11b9b3827dc44dd62b578cadf7195
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.13
|
Release files / mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl
| Download URL | mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
04519f0743d5e294d7628fe7ebd02af96149b2c9662b8468703c26cdca89030e
|
|
BLAKE2b-256 checksum How to use checksums |
70a91a15ac1d3d41916475c365156c7e13316330eac8ae6c64a03b88b8d302e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.8.13
|