agittins / bermuda

Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant
MIT License
208 stars 6 forks source link

Heavy performance drops after setting up the integration #199

Open collateral87 opened 1 month ago

collateral87 commented 1 month ago

Version of the custom_component

0.6.5 (and tried main)

Describe the bug

Directly after I set up the integration, Home Assistant experienced significant performance drops. I restarted, but the restart was no longer possible (the core did not start anymore) and I had to force shutdown the machine. Unfortunately, I don't have any logs because of this. After removing the integration, everything ran normally again with the usual performance.

I have 8 BT proxies (ESP) and 1 BT adapter (ASUS). None of them are assigned to areas.

Is this a known issue or has anyone had similar experiences?

agittins commented 1 month ago

I'm really sorry to hear that!

There have been some changes in recent HA versions (around 2024.5 I believe) that appear to have made it less stable when integrations do non-threadsafe things, leading to (effectively) lock-ups. The changes were noted as adding stability but I've only seen it cause more frequent problems - which leads to fixes ultimately, but a lot of user frustration along the way!

Do you know what version of main you tried? I have been pushing a few changes up of late, so it's possible the one you grabbed might have been before a fix. Anyway, I have just pushed another potential fix, and bundled everything up into a release, so if you're able to see if v0.6.6 works for you that would be awesome.

I know it's a big ask, but if v0.6.6 is still a problem, would you be able to do some testing for me? The problem is that I have been unable to replicate some of these issues on my systems, which makes finding a fix so much harder.

From https://community.home-assistant.io/t/2024-5-tracking-down-instability-issues-caused-by-integrations/724441 if you could add this to your configuration.yaml and see if it gives you any helpful output:

homeassistant:
  debug: true

You might need to be able to SSH into your box to be able to get the logs, so I understand if this is a bit much to ask, especially if your system is actively running stuff in your home. I really hope I can get these things sorted out quickly, it's just tricky when I can't get my own systems to show the error. Thanks for your patience, though, and I really appreciate you taking the time to report your experience!

srempfer commented 1 week ago

I had a similar experience after installing the integration (v0.6.6) 3 weeks ago:

I checked the logs and found a warning from the integration that there is a device (Shelly with enabled bluetooth proxy) which has no assigned area. Unfortunately I haven't the exact log anymore.

Since I added an area to the device the problem is gone. I'm not sure if the restart or the assignment of the area fixed the problem.

In the near future I'll integrate some more Shelly devices which gives me the possibility to do some tests and maybe the problem could be reproduced.

Thanks for the great project, exactly what I looked for.

jack3308 commented 6 hours ago

Running into similar here. Running HAOS 2024.6.3 on Pi 4B 4gb w/ ssd for storage. No addons to speak of, fair few integrations, and usually it zips right along, but something with this integration seems to be slowing things down. As soon as I disable it things are quick as normal, but with it enabled everything is noticeably slower, particularly booting up.

Now, I'm gonna caveat all of that and say that this is a fantastic tool and absolutely killer integration, so please don't think I'm displeased or anything. Just wanting to add that it seems to be happening to me too, and willing to provide what support I can in terms of logs and whatnot if you want them to have a look at.