I have a handful of Govee H5101 thermo-hygrometers. These devices transmit temperature, humidity, and battery status as Bluetooth Low Energy (BLE) advertisements.
I have a Home Assistant instance running on a NUC at one end of the house, and a router running OpenWrt 24.10 at the other end of the house.
The NUC is unable to receive some of these BLE advertisements, so I wanted to relay them via the router via MQTT.
Implementation
I wrote a Python script that uses
dbus_fast from from OpenWrt's
python3-dbus-fast package:
Other approaches
devbis's ble2mqtt
https://github.com/devbis/ble2mqtt
This is already packaged for OpenWrt, so it was promising.
Its dependencies were heavy for my taste:
-
bleak, which in turn depends on
- D-Bus
- BlueZ
Aside from this, the software didn't already support the Govee H5101 specifically. Probably not difficult to add, but anyway, I didn't.
usbip
Already packaged for OpenWrt. Tried it, with a USB-Bluetooth adapter plugged into the router. Worked but was unreliable.