Bluetooth devices sometimes won't update

Hello everyone,

I’m new to Home Assistant and I am trying to make it work with a pair of Shelly sensors - a motion detector and a window opening/closing detector - used via Bluetooth (NO Shelly USB gateway).
They work flawlessly…except that at some point they don’t update their status.

So for example, checking their status in Home Assistant, at some point the window remains open (or closed) and/or motion sensor continues detecting motion (or not) regardless of what it is actually happening in the real world.

The status doesn’t remain stuck for both sensors together (they can work both, only one or none).

I don’t know how to debug this, it seems to happen randomically.

Any help really appreciated!

Using the Bluetooth of your HA, or an ESP Bluetooth proxy?

The Bluetooth of my HA

Ok, it happened again and I was able to check via Shelly Debug Android app (this one) that the sensor works and transmits events.

HA just won’t update its status, even if another device triggering another event has its status correctly updated.

Checking if something appears in the logs, I only got this, but at a time that doesn’t match:

# bluetooth_auto_recovery.recover
# Source:
Could not reset the power state of the Bluetooth adapter hci0 [uuid] due to timeout after 5 seconds
Could not cycle the Bluetooth adapter hci0 [uuid]: [Errno 110] Operation timed out
Bluetooth adapter hci0 [uuid] successfully turned back ON

And also

# habluetooth.scanner
# Source:
hci0 (uuid): Successful fall-back to passive scanning mode after active scanning failed (4/4)

Does it permanently stop updating with state changes or just misses a single state change (such as would happen if HA just didn’t see a momentary broadcast)? I have a number of BT door/window sensors that unfortunately only send an update at state change (even though they transmit other info on a regular cadence), so if HA happens to miss one it will never update correctly unless I go and physically open/close the entity so it transmits again.

Almost permanently: devices sends their momentary broadcasts, but HA doesn’t just miss one. Seems that after some time it decides to ignore some specific device(s). Then, after a while, maybe it starts listening again.

It’s curious that it doesn’t happen to all devices together at the same moment.

Today i’ll make some test using a different Raspberry/power source, maybe helps, but considering that this behavior may arise after a whole day, in the meantime any idea is appreciated :slight_smile:

Tried another Raspberry, it happens also with it.

Why don’t you add an ESP Bluetooth proxy?

Well, given that those are BT devices I thought that the default BT integration present in HA would suffice…I wouldn’t even know where to start configuring an ESP proxy