Devices go unavailable every few mins for a few seconds
Closed this issue · 6 comments
Logger: custom_components.bermuda
Source: helpers/update_coordinator.py:382
integration: Bermuda BLE Trilateration (documentation, issues)
First occurred: 1:21:26 AM (80 occurrences)
Last logged: 1:31:25 AM
Unexpected error fetching bermuda data
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/update_coordinator.py", line 382, in _async_refresh
self.data = await self._async_update_data()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/bermuda/coordinator.py", line 656, in _async_update_data
device.calculate_data()
File "/config/custom_components/bermuda/bermuda_device.py", line 190, in calculate_data
scanner.calculate_data()
File "/config/custom_components/bermuda/bermuda_device_scanner.py", line 382, in calculate_data
self.hist_distance_by_interval.insert(0, self.hist_distance_by_interval[0])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
When this happens, i see this in the logbook:
My Phone BLE Bermuda Tracker was detected at unavailable
1:31:05 AM - 2 minutes ago
Hey, thanks for your report. That definitely looks like a bug, I'll include a fix in the next version.
When this happens, does your phone stay Sorry, answer to that is in the title of the bug report! 😅unavailable
or does it come back a second later?
I'm also seeing this, it may have caused an HA crash too that I needed to restart from Supervisor -- could easily have been something else but these are the only error logs I have.
I'm guessing this is happening the moment that a device (like an iPhone) rotates its mac to a new address.
If anyone is able to capture a download diagnostics between 3 to 10 seconds after this happens, that might be quite helpful. But I'll be able to fix the problem in the next release, would be nice to be able to check on any deeper potential issues if we can nab a diags at just the right time. It's a bit ask though, so don't stress if you don't have the time to sit there crouched over the mousebutton for long stretches of time!
I suspect this won't be too too hard to acquire, will be on the look out
@vaparr how much memory are you running on?
I'm hosting Home Assistant via Proxmox, I noticed it running near it's memory limit, so I increased the limit and I've not seen the issue since. I'm not sure if the new release uses more memory or anything, but just putting this thought out there in case it's helpful!
Hey, this should now be fixed in the v0.7.1 release I just sent out. I'll close this issue now, but if you find it is not resolved please feel free to re-open. Cheers!