Skip to content

Integrate RuuviTag sensors with Home Assistant through MQTT discovery

License

Notifications You must be signed in to change notification settings

tmatilai/ruuvi2mqtt

Repository files navigation

Ruuvi2MQTT

Ruuvi2MQTT listens for RuuviTag sensor BLE events and sends MQTT messages, especially for Home Assistant with MQTT Discovery.

There are also many other projects for integrating RuuviTags to Home Assistant. The main reasons for this project are:

  • Possibility to run multiple bridges in case one receiver can't hear all the sensors (and/or for HA).
  • I wanted to have a hobby project to learn and use Rust.

The second bullet means that the documentation, configuration, and code quality might not be top-notch. Improvements welcome!


Requirements

The target platforms are Linux on amd64, arm64, and arm7 (Raspberry Pi). Because of dbus dependency, (cross) compiling and MUSL can get complicated. MacOS is supposed to work as well.


Usage

Pre-build binaries and container images can be found in https://github.com/tmatilai/ruuvi2mqtt.

An example configuration file can be seen in ruuvi2mqtt.yaml. Configuration file is by default searched from the working directory, but the path can be specified with --config CLI option or CONFIG_FILE environment variable.

Example command to run in a Docker container:

docker run --name ruuvi2mqtt --rm \
    -v /run/dbus/system_bus_socket:/run/dbus/system_bus_socket \
    -v "$PWD/ruuvi2mqtt.yaml:/ruuvi2mqtt.yaml" \
    ghcr.io/tmatilai/ruuvi2mqtt:v1.3.3 \
    --log-level=DEBUG