home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.03k stars 29.69k forks source link

BTHome missing Shelly BLU Motion events #122226

Open patriiiiiiiiiick opened 1 month ago

patriiiiiiiiiick commented 1 month ago

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. 1000017833 1000017811

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

home-assistant[bot] commented 1 month ago

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 close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bthome` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove 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)

jum0n commented 1 month ago

Maybe its a bluetooth range issue? Have you enable and tracked your signal strength? If so, what values are typical?

patriiiiiiiiiick commented 1 month ago

Since the event is logged by the Shelly app, a range issue would not explain this missed event.

Ernst79 commented 1 month ago

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.

patriiiiiiiiiick commented 1 month ago

I beg to disagree: my phone is not connecting with Bluetooth to/from the sensor. The Bluetooth signal can go through 2 paths:

In the past, I had disabled Bluetooth on the RPi to see if it helped, but it didn't.

jum0n commented 1 month ago

It still might be helpful to enable and track what signal strength values are being reported in HA.

Ernst79 commented 1 month ago

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.