1
0
Fork 0
mirror of https://github.com/Luzifer/mqtt2influx.git synced 2024-10-18 05:44:19 +00:00
MQTT to InfluxDB transport
Find a file
Knut Ahlers b265cf072e
Add more info to README
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2020-07-11 20:05:02 +02:00
.dockerignore Initial version 2020-07-11 18:20:49 +02:00
.gitignore Initial version 2020-07-11 18:20:49 +02:00
config_sample.yml Initial version 2020-07-11 18:20:49 +02:00
Dockerfile Initial version 2020-07-11 18:20:49 +02:00
influx.py Move vault connection to single place 2020-07-11 19:48:24 +02:00
LICENSE Add LICENSE 2020-07-11 19:56:43 +02:00
main.py Move vault connection to single place 2020-07-11 19:48:24 +02:00
Makefile Initial version 2020-07-11 18:20:49 +02:00
README.md Add more info to README 2020-07-11 20:05:02 +02:00
requirements.txt Initial version 2020-07-11 18:20:49 +02:00
vault.py Initial version 2020-07-11 18:20:49 +02:00
yaml_lambda.py Initial version 2020-07-11 18:20:49 +02:00

Luzifer / mqtt2influx

MQTT to InfluxDB transport: uses mapping config including transformer functions to pull data from MQTT topics and write those values into InfluxDB.

The motivation behind this was for me to have a lot of Tasmota sensors sending data through MQTT to Home-Assistant. Home-Assistant is capable of writing those metrics into InfluxDB but sadly it only writes them on change. So if a value does not change for an extended period of time for example Grafana dashboards will stop to display the metric as it contains no data.

As those sensors are sending values in different forms (value only, value embedded in JSON, ...) I needed a way to configure the transform of the values in a way no code needs to change for a new transmission method. Therefore I came to use Python with extra support for lambda functions in the configuration.

A word of warning: If you plan to run this in an untrusted environment you will compromise your environment! Lambda functions in config which execute code on random values sent through MQTT aren't a good idea. So only use them if you are 110% sure you only will get the expected values / data in a fully trusted environment!