Homie device InfluxDB logger
homie-influx
is a service to connect to an MQTT broker, discover devices following the
Homie convention, and record their property value changes to an
InfluxDB database.
See the main project readme for more details and background.
Installation
It is recommended to install the latest release from our Debian repository:
|
|
&&
Alternatively, you may install with cargo install, but that will require some more setup:
Usage
If you have installed the Debian package, the service will be set up with systemd for you already.
Otherwise, copy the homie-influx
binary to /usr/bin
, copy debian-scripts/homie-influx.service
to /lib/systemd/system
, create a homie-influx
user to run as, and create /etc/homie-influx
for
configuration files.
There should be two config files under /etc/homie-influx
:
homie-influx.toml
contains the main configuration for the service, such as which MQTT broker and InfluxDB server to connect to. See homie-influx.example.toml for an example of the settings that are supported.mappings.toml
contains a map of Homie base topics to InfluxDB databases. By default it will look for devices under the standardhomie
base topic and write to an InfluxDB database calledtest
. You can add multiple base topics to handle multiple users.
After editing these config files you will need to restart the service:
You may find it helpful to watch the logs to see whether it is managing to connect:
License
Licensed under either of
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.