custom-components / ble_monitor

BLE monitor for passive BLE sensors
https://community.home-assistant.io/t/passive-ble-monitor-integration/
MIT License
1.9k stars 245 forks source link

[Bug]: HA stops receiving updates from sensor #864

Closed dom8925 closed 2 years ago

dom8925 commented 2 years ago

What happened?

I have a Govee H5074. I set up the add on to do an active scan and my sensor is found. I start to receive data and then it just randomly stops getting new data. Then it will randomly start getting data again. There are no errors in any of the logs. Battery is at 86%. The sensor is in another room from where my HA is running on a RPI Z W. My phone can connect to my sensor from the same location without a problem.

Sensor type

Govee H5074

Relevant log output

No response

Ernst79 commented 2 years ago

Can you post a debug log? You will need to click on “show full HOme Assistant log” button to show the messages at debug level (and enabling it for ble monitor)

dom8925 commented 2 years ago

home-assistant.log Here is a copy of the log file.

dom8925 commented 2 years ago

It's been working for most part of the day but then just stops working. Maybe the issue is with my device and not this? Notice the straight line at the end. That's when it has stopped updating. SmartSelect_20220514-215125_Home Assistant

Ernst79 commented 2 years ago

Could very well be the case. I normally would expect that this can happen when the reception range is just on the limit. What is the RSSI of this sensor? I can’t find another clue in your logs.

Some sensors also stop reporting when you open the accompanying app, but I don’t think that is the cause here.

dom8925 commented 2 years ago

RSSI history SmartSelect_20220515-095737_Home Assistant

Ernst79 commented 2 years ago

RSSI should be OK, One thing we could try is to use the "report_unknown" option for this sensor. Try to enable it for this sensor only, and let it collect the advertisements in your logs (including a period in which the sensor malfunctions). Full instructions can be found here.

Please make a similar screenshot as above, such that I can see at what time it stopped working.

This might help us identifying if the issue is at the sensor side, or at the BLE monitor side.

dom8925 commented 2 years ago

I ended up setting up a new HA and that one continues to receive data while the one running on my pi doesn't. I will say this is an issue with my hardware and not this integration. Thanks for looking into it for me.

Ernst79 commented 2 years ago

Some times a new usb dongle could fix it. But good to hear you’ve found a workaround.