BTHome missing Shelly BLU Motion events
The problem
I am using Shelly BLU Motion to switch on some lights and maintain them on. However, I observe that, despite us being there moving around, the lights switch off regularly. While I do find the last motion event in the Shelly app, that event is not listed in the logbook. There is nothing either in the log file.
Do I enable debug logging and report back when it has happened again?
What version of Home Assistant Core has the issue?
core-2024.7.2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
BTHome
Link to integration documentation on our website
https://www.home-assistant.io/integrations/bthome
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
Hey there @ernst79, mind taking a look at this issue as it has been labeled with an integration (bthome) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of bthome can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign bthomeRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
bthome documentation bthome source (message by IssueLinks)
Maybe its a bluetooth range issue? Have you enable and tracked your signal strength? If so, what values are typical?
Since the event is logged by the Shelly app, a range issue would not explain this missed event.
The app is using the Bluetooth radio of your Phone, while home assistant is using the Bluetooth radio of the HA device. So, it can happen that the range between sensor and Phone is ok, but not to your HA Bluetooth radio. Moreover, the Bluetooth radio of your HA machine can interfere with wifi, as the both use 2.4 GHz. Try using an external BT dongle on an USB extension cable or try using a ESPHome Bluetooth proxy device.
I beg to disagree: my phone is not connecting with Bluetooth to/from the sensor. The Bluetooth signal can go through 2 paths:
- through the RPi,
- through a Shelly plus device serving as a Bluetooth proxy. The plus device reports events to https://control.shelly.cloud/ which is reflected in the mobile app (some info is also cached on the plus device).
In the past, I had disabled Bluetooth on the RPi to see if it helped, but it didn't.
It still might be helpful to enable and track what signal strength values are being reported in HA.
Ok, didnt know that shelly also works via a shelly plus device. But as said by jum0n, show us the RSSI values in HA. Also check the Bluetooth intergration debug logs, to see is messages arive at all from your sensor's mac address.
Nothing in the log file in debug mode even when it works. Does that mean that this is not going through BTHome?
Maybe I should put Shelly in debug.
I disabled the Bluetooth gateway of my Shelly plus device. The motion is still detected and the log file remains empty despite enabling debug in BTHome. Is enabling debug logging through the UI indeed supported?
I am even more puzzled now. I disabled the Bluetooth integration and things continue to work. How is that possible?
It seems that Shelly Plus device is the guilty one. I went to unplug it and Bluetooth communications stopped working. I therefore enabled the Bluetooth integration and things resumed working. However, there is still nothing in the log file in debug mode. Over and out for now.
While waiting for #126988, I would like to enable debug on this integration. I will try to use the bthome key but please communicate to me me which one it is.
I have missed events on a device which has a signal strength of -68 to -78 dbm.
logger:
default: warning
logs:
bthome: debug
I have a similar problem. HA does not detect all BLU Shelly Motion events, especially the "cleared" ones and sometimes the sensor remains in the "motion detected" state for hours. I attach two screenshots from the Shelly App and from HA logbook showing the differences.
I am exchanging with Shelly support on the issue. Beacon mode doesn't work well for BLU Motion sensors, while working properly with BLU DW.
After I put a gateway (a Shelly Plug S Gen3) in the same room as the motion sensor it is working fine. Probably it was a matter of signal strength, since the closest gateway was on a different floor.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.