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
72.8k stars 30.5k forks source link

esphome bluetooth proxies stop working after a while #101308

Closed AdrianGarside closed 1 year ago

AdrianGarside commented 1 year ago

The problem

They stop sending any data to home assistant and I see this in the home assistant log output: adrian@SpiralServer:~/.homeassistant$ tail -f home-assistant.log | grep esp 2023-10-03 00:00:46.205 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth1 (94:3c:c6:32:e2:d8): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information 2023-10-03 00:01:06.889 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth2 (cc:db:a7:53:51:4c): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information 2023-10-03 00:01:11.556 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth3 (cc:db:a7:53:83:08): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information

And with no easy way to restart them remotely I have to go physically unplug/replug them.

What version of Home Assistant Core has the issue?

2023.9.2

What was the last working version of Home Assistant Core?

Don't know

What type of installation are you running?

Home Assistant Container

Integration causing the issue

esphome

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2023-10-03 00:00:46.205 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth1 (94:3c:c6:32:e2:d8): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information
2023-10-03 00:01:06.889 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth2 (cc:db:a7:53:51:4c): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information
2023-10-03 00:01:11.556 INFO (MainThread) [homeassistant.components.bluetooth.base_scanner] esphome-bluetooth3 (cc:db:a7:53:83:08): Bluetooth scanner has gone quiet for 90s, check logs on the scanner device for more information

Additional information

No response

marcelveldt commented 1 year ago

Like the log already suggests, this is an issue with your esphome hardware rather than Home Assistant core. Some esp32 boards have problems with running WiFi and bluetooth at the same time and you may need to tweak the settings or just use another board. I'd suggest you to have a look at the logs of the device (maybe connect a serial debug cable when it is in the unreachable state?) and/or open an issue on the ESPHome issue tracker if the issue persists.

In any way, it's not an issue that should be reported here.

Thanks!

AdrianGarside commented 1 year ago

Yes, that was exactly the problem. I hadn't realized there was any choice in how to configure an esp bluetooth proxy. Configuring the install to be esp-idf instead of arduino and turned off the web server looks to have fixed the issue (so far). And, more surprisingly, gave me a massive boost in sensitivity/range. A single proxy in my attic is now seemingly able to see the bluetooth thermometers in all 4 floors of my house from basement to attic. Where before I had 3 proxies and they were sometimes seemingly unable to see devices < 20 feet away through only 1 wall.

Update: Seems my attic plus the esp32 being horizontal is the perfect location. Making it vertical or putting it where I had the centrally located one (vertically up the wall above a slim USB power brick) I'm seeing similar poor range. Is the orientation of the antenna that critical?