agittins / bermuda

Bermuda Bluetooth/BLE Triangulation / Trilateration for HomeAssistant
MIT License
546 stars 11 forks source link

cannot setup bermuda integration #317

Open collateral87 opened 2 weeks ago

collateral87 commented 2 weeks ago

Unfortunately, I can't set up the integration. As soon as I add it, my Home Assistant system completely crashes. I can force a restart using "core restart" via SSH, and then I see that the integration wasn't set up.

I wasn't able to provide any logs or configuration.

I'm running HassOS in a VM on my Unraid server, and I have a few Atom Bluetooth devices set up via ESPHome. However, these are not yet assigned to any rooms.

v0.6.9rc2 is my version of bermuda running homeassistant 2024.10.1

I'm a bit afraid to try the setup again, but I would like to provide you with the data. Can you tell me exactly what you need?

agittins commented 2 weeks ago

Yikes!

In the ssh connection, you could try ha core logs to see if that shows anything that might be helpful, but it might not.

I'm out of town currently and have fairly limited internet. I haven't tested HA 2024.10.1 myself yet, so it's possible that bermdua has a compatability issue - but I haven't heard other reports of anything similar, so maybe it's related to initial installation.

Can you let me know which other integrations you have enabled in your HA? I think there's a "blueooth companion app for android" that might have an interoperability thing with Bermuda, but I don't know specifically yet.

Do you think that HA crashed (ie, the program ended and exited) or did it hang, possibly using all the cpu or churning memory? If the ssh connection was painfully slow or difficult to establish that might indicate hanging/churning rather than a crash. That doesn't make it OK, of course! Just helps a bit when diagnosing.

collateral87 commented 2 weeks ago

Ok i will test and will post here what i get

Screenshot_20241008_013625_Samsung Internet.jpg

It seems like, that i can access over ssh. Webui is unreachable.

agittins commented 1 week ago

The first thing to do is to assign an "Area" to each of your proxies. In the esphome integration, click the device, then the pencil in the top-right, and choose/create an area for it. This will get rid of all the messages about that in the logs.

The message about pruning 10k entries hints that you might have another integration that is creating a ridiculous number of bluetooth entries. Can you tell me what other integrations you have installed?

collateral87 commented 1 week ago

Thank you for your reply. I've assigned all my proxies to rooms and disabled all my bluetooth or ble related integrations, but still the same: image

My Integrations are:

Other related:

Do you have any idea what else I could test?

agittins commented 6 days ago

Do you have a list of the bluetooth-related integrations that you've had on there previously?

Even after disabling other bluetooth integrations, I think their data might still remain behind, and that might be what's bogging down Bermuda (it still says it has 10 thousand bluetooth entries it's tracking - anything over a few hundred is suspiciously large).

Would it be possible for you to send me a file from your HA system? If you are on a supervised vm install, when you ssh in it's at ~/config/.storage/bluetooth.remote_scanners

This file is where HA saves out the list of bluetooth advertisements and devices so that when it restarts it comes up with a workable set of (slightly stale) data. My guess is that this file has become very large, and contains thousands of entries that a particular integration has stored there.

If you are able to send me this file, I can probably:

Note though that the file contains the names and possibly IP addresses of your proxies, and also all of the bluetooth data floating around your home - so you might not want to post it publicly here.

You can zip it up and email it to me at ash@ajg.net.au or you can upload it securely to my nextcloud at https://cloud.ajg.net.au/index.php/s/JpeXDnZQGeXqqHB which is only visible to me.

Email is probably only reliable up to about 10MB, but the nexcloud should be good for a gig or two.

Another thing you can try is:

This would cause HA to start up with an empty bluetooth cache, and might allow things to work properly. The downside is that it won't tell us what caused it, and it might just happen again if the guilty integration is fired up again (either immediately, or over time, depending). Note that renaming it while HA is running won't do anything, as HA will just re-save it when it exits.

If you need help working out how to do these, let me know what tool(s)/OS you are using to ssh into your HA, and I can give you the commands required.

Within the ssh session it would be something like:

ls -alF config/.storage/bluetooth* - this should list two files, the bluetooth.passive_update_processor file should be perhaps a few dozen kB, and the bluetooth.remote_scanners file should be far less than a MB, but I suspect yours might be close to or larger than that. Don't proceed beyond this if you don't get a file listing, it means one or more of my assumptions about your system is wrong.

mv config/.storage/bluetooth.remote_scanners config/.storage/bluetooth.remote_scanners.bad would rename the file, but only do this when HA itself isn't running.

After restarting HA, running the ls command above another time will show you if the file has been returned and if it's size has changed.