BTHome Binding

fyi: I started working on a BTHome binding

This is a new standard implemented by some bluetooth sensor devices like the Allterco Shelly BLU series, ATC MiThermometer, BTHome Weather Station and ESP32-based projects

My focus at the moment the the Shelly BLU series of device. Those are already supported by the Shelly Binding (see Shelly Binding - #3362 by markus7017), but the concept is that you need a Shelly device acting as a proxy. The binding does an auto-install of a script, which sends forwards the events from a BLU sensor to the openHAB system (processed by the binding). You could bind the BLU device to multiple Shellys. This is cool, because you could build something like a Mesh network, because each Shelly is acting like a repeater. However, if you just want to have a BLU sensor (Button, Door/Window, Motion) without the need to a Shelly you are stuck. Therefore I got the idea to create an independent binding based on the existing openHAB Bluetooth support, which then could also be used for other BTHome based sensors.

I’m currently doing some initial research, but also want to get feedback from the community and find people supporting on testing different types of devices. If it works like expected the binding will process the BTHome packets and create sensor channel for different types of sensors (temperature, humidity, motion, acceleration etc., see Reference – BTHome) as offered by the BTHome sensor device.


Hi Markus,

I have bought some BLU Window Sensors and am currently thinking about the best way to integrate it.
Currently I am hesitant to use the shellys because on the esphome it hints about much larger code on the device and a maximum of 3 devices however the last one seems to be only applicable when using a paired device. The docs also describe a trade off between wifi reception and bluetooth performance.
What are your thoughts on the issue?

ESPHome offers the functionality of a bluetooth proxy, where one can extend the bluetooth range through cheap esp32 modules. Since many users have their openhab instance far away from their bluetooth devices (e.g. in some rack or basement) the bluetooth functionality is currently of limited use.
Are there any plans to support this bluetooth proxy functionality?

For the shelly blu sensors I’m still unsure what to use. Currently I tend to OpenMQTTGateway which can publish the sensor values over mqtt but I have not made up my mind yet.

The only thing I could say

  • A Shelly Plus/Pro
  • the Shelly binding
  • BLU devices
    works quite well and has a fast reaction.

So if you have multiple Shellies in the house this is a simple to setup approach. The Plus/Pro series has strong power on the device and offer rich functionality, also JS scripting, which allows to implement control functions on the deevice. Currently the BT proxy is implemented as a script (installed by the binding automatically), but I think Allterco will integrate an API based approach in the near future. All Plus/Pro support BT, even a Plug. etc. so you could easily extend your private “BT proxy network”.

On the other side you need to have a Shelly within ca. 10m and the Shelly needs appropriate WiFi coverage. This could make a different approach more feasible like you describe them, but I have no experience with those. Nevertheless, I would prefer the Shelly based approach. The BTHome binding would offer a mixed setup, incl. the BT roaming capability offered the the BT binding, but there is 0.1% progress for now :slight_smile:

Beside that I’m currently struggling to find out if there is a combo of BT and BT binding, which allows me to develop on a Mac. As I understood the binding is designed to use bluez, which is Linux specific and bluegiga, but I couldn’t find infos if this runs on Mac and requires a 50€ USB adapter. Would be perfect if the build-in hardware could be used (newer versions support BLE).

@Kai could you answer this question? I saw that you are one of the initial contributors of BT functions in OH.

I’m on a Mac myself and unfortunately, the internal BLE isn’t supported. I bought myself Bluegiga dongles in order to do the development.

already ordered one (BD112) :slight_smile:

Hi Markus,
I already have more than 30 shelly devices in my openhab installation.

For Gardena bluetooth devices (by now not integrated in openhab) I currently use the Gardena bluetooth app to control a lawn mover (Gardena Sileno Minimo) and a irrigation controller (Gardena Bewässerungssteuerung Bluetooth).

If you can find a way to integrate them in my openhab installation, I would be happy to support you with tests.

No, BTHoime is not generic, so I would expect that it doesn’t run with Gardena
BTHome needs to be supported by the device like the Shelly BLU series and some other sensors do.

So far I didn’t had the time to look further into this