uracoli-rsensor - A Framework for Logging Sensor Values
Abstract
The uracoli-rsensor package provides a logging of data from a MQTT broker into a database (sqlite or MySQL).
Setup
The package can installed directly from the sources.
pip install git+https://gitlab.com/uracoli-project/uracoli-rsensor.git
Quickstart
To quickly log sensor data from a MQTT broker in a SQLite database write a minimal config file minial.cfg:
database:
dbtype: sqlite
dbname: /tmp/rsensor-database.sqlitedb
mqtt:
- host: test.mosquitto.org
port: 1883
prefix: rsensor-test
Note: The "dash" before the "host:" keyword means there can be a list of MQTT brokers.
Run the test data generator in the background or in a seperate shell:
rs_testgen -H test.mosquitto.org
See your data arrive at the broker (optional step):
mosquitto_sub -h test.mosquitto.org -t "rsensor-test/#" -v
Run the data logger script:
mqtt_to_db -C minimal.cfg
To see whats in the database, run:
sqlite3 /tmp/rsensor.sqlitedb "select * from timeseries"
... or human readable:
sqlite3 /tmp/rsensor.sqlitedb "SELECT strftime('%Y-%m-%d %H:%M:%S', datetime(t.ts, 'unixepoch')) as string, s.id, t.value FROM timeseries AS t JOIN sensors AS s ON s.sensor_idx = t.sensor_idx"
Documentation
https://uracoli-rsensor.readthedocs.io/en/latest/
License
The contents of uracoli-rsensor is licensed with a Modified BSD License, see file LICENSE for further details.
Metadata
Release files for uracoli-rsensor 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uracoli-rsensor-0.1.3.tar.gz | 16.7 kB | Without provenance | Details |
Release files / uracoli-rsensor-0.1.3.tar.gz
| Download URL | uracoli-rsensor-0.1.3.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5fa693f21438bb63deabd98d2dc43d7ccd862ea002fdd32e6cc9bd1c6ca4222
|
|
BLAKE2b-256 checksum How to use checksums |
34e22e5695b87f88b38938ce16c9fefbfcc93e0a1cdf22c4f74fd99c6443c310
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.5.2
|
Security for uracoli-rsensor 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.