# 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"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/tspspi/mqtttimeserieslogger",
"name": "mqtttimeserieslogger-tspspi",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "Thomas Spielauer",
"author_email": "pypipackages01@tspi.at",
"download_url": "https://files.pythonhosted.org/packages/e7/b7/6bf41afec1f09654d9c0458046c57af11b9b3827dc44dd62b578cadf7195/mqtttimeserieslogger_tspspi-0.0.5.tar.gz",
"platform": null,
"description": "# Simple MQTT time series logger\n\n__Work in progress, not production ready__\n\nThis is a very simple (Python) logging daemon that subscribes\nto multiple MQTT topics and logs received messages including\ntimestamps into daily ```npz``` files. The way it currently works\nis really crude so it's only useable for low rate measurements\nlike minutely temperatures or alike. All data is read and written\nfor each measurement at the moment (this will change in future).\n\nThe service is configured by a configuration file (by default\nat ```~/.config/mqttserieslogger.cfg```.\n\n## Installation\n\n```\npip install mqtttimeserieslogger-tspspi\n```\n\n## Sample configuration\n\n```\n{\n \"datasources\" : [\n {\n \"broker\" : {\n \"broker\" : \"10.4.1.1\",\n \"user\" : \"quasem\",\n \"password\" : \"XXXX\",\n \"basetopic\" : \"quasem/experiment/\"\n },\n\n \"quantities\" : [\n {\n \"name\": \"pt1000pcb\",\n \"topic\" : \"cryo/temperature/pt1000pcb\",\n \"field\" : [ \"temperature\", \"temperature_C\" ]\n }\n ]\n }\n ]\n}\n```\n\n## Automatic launching with ```rc.init``` script\n\n```\n#!/bin/sh\n\n# PROVIDE: mqtttimeserieslogger\n# REQUIRE: NETWORKING SERVERS\n\n# Simple MQTT time series logger\n# \n# RC configuration variables:\n# mqtttimeserieslogger_enable:=\"NO\"\n# Enables the logging service\n\n. /etc/rc.subr\n\nname=\"mqtttimeserieslogger\"\nrcvar=mqtttimeserieslogger_enable\n\nload_rc_config $name\n: ${mqtttimeserieslogger_enable:=\"NO\"}\n\ncommand=/usr/local/bin/mqtttimeserieslogger\n\nload_rc_config $name\nrun_rc_command \"$1\"\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "A very simple NPZ file time series logger for MQTT events",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/tspspi/mqtttimeserieslogger"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "70a91a15ac1d3d41916475c365156c7e13316330eac8ae6c64a03b88b8d302e8",
"md5": "b149b2517bceefaf91a6e2841ff98ebc",
"sha256": "04519f0743d5e294d7628fe7ebd02af96149b2c9662b8468703c26cdca89030e"
},
"downloads": -1,
"filename": "mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "b149b2517bceefaf91a6e2841ff98ebc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 8434,
"upload_time": "2024-10-25T09:42:44",
"upload_time_iso_8601": "2024-10-25T09:42:44.836589Z",
"url": "https://files.pythonhosted.org/packages/70/a9/1a15ac1d3d41916475c365156c7e13316330eac8ae6c64a03b88b8d302e8/mqtttimeserieslogger_tspspi-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e7b76bf41afec1f09654d9c0458046c57af11b9b3827dc44dd62b578cadf7195",
"md5": "0b02eea38d11588a49f0099539670fb9",
"sha256": "9ba5fe686448b3f315e71d2dec4b6a0461997ce38f5c617300e2fa60a1d68345"
},
"downloads": -1,
"filename": "mqtttimeserieslogger_tspspi-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "0b02eea38d11588a49f0099539670fb9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 7755,
"upload_time": "2024-10-25T09:42:46",
"upload_time_iso_8601": "2024-10-25T09:42:46.027328Z",
"url": "https://files.pythonhosted.org/packages/e7/b7/6bf41afec1f09654d9c0458046c57af11b9b3827dc44dd62b578cadf7195/mqtttimeserieslogger_tspspi-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 09:42:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tspspi",
"github_project": "mqtttimeserieslogger",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mqtttimeserieslogger-tspspi"
}