Xmosb01xs integration into Openhab

Hello all,

I recently purchased a presence detection device: Xmosb01xs (Xiaomi). It is a bluetooth device (BLE) which not only detects movement but also presence. Usually movement only detects movements (obviously) but any object sitting very quite in a chair won’t be detected. The presence detection devices are able to do so (using mmWave).

This device works very good: just being in a room makes the device detect anyone where the movement detection already decided to turn off the light. Awesome. Disadvantage: it is battery based but until now (over a month usage): no battery drain is visible and Xiaomi claims that the battery life is 3 years. We will see.

Now my question: I haven’t found a way to integrate directly into openhab.It is a Xiaomi device but uses encryption (bindkey). Currently I have integrated it into Home Assistant via ESPHome (as BLE proxy). From there I push the data via MQTT towards Openhab. Works fine, but I want to remove HA since I really prefer Openhab and everything else is Openhab (nearly 900 items and counting)…

My preferred solution would be skipping HA but still keep the MQTT integration (if possible). Does anyone have a clue how to reach this?

Best regards and already thx for any reply.

Can’t ESPHome publish straight to MQTT? It used to be able to.

Hi Rich,

Yes it does. But this one has some kind of encryption and that is being decrypted in HA unfortunately. Using ESPHome as BLE proxy does not decrypt the payload. If it can forward the decrypted payload however, I did not find a way to do so.

Then you’ll have to find something that can handle that decryption or implement it in OH somehow. Depending on how it works you might be able to do it in a transformation.

I don’t think any of the built in bindings to OH support this. There might be third party services like Theengs which might support it.

Hi Rich,
Thx for pointing out. It looks like it can decrypt the payload using a bindkey, I will give it a try. Documentation looks promising anyway.