-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
room assistant on rpi frequently reports not able to connect to devices #895
Comments
Both of these messages are created for Low Energy devices (BluetoothLowEnergyService uses BluetoothService). The first error message occurs when RA cant connect to the LE device. This could be because the device is on the edge of reception or the device could already be connected to something and thus not available. I have seen this happen when two RA instances are both trying to connect to the same LE device at the same time. The second error occurs when the connection was made but the LE device failed to respond to the subsequent read request. This could be because the device is again at the edge of reception or that the device is doing something else and not ready to respond. I have also seen this happen when the LE device is low on battery and is unable to power the read response. In all cases, queries of LE devices only occurs off the back of a received advertisement message. This way RA knows that the device is highly likely to be in range and able to respond. |
Thanks for the clarification. That explains alot. Do you know any workarounds? Can |
I think Out of interest, how many of these error messages do you get a day and is it more prevalent for a specific pi or phone ? There is an argument to downgrade those messages to be |
In my monit settings, it send an notification, as soon as room-assistant shows an error 10 times in 20 cycles. If this happens, then room-assistant is restarted. After room-assistant has restarted, this problem is gone for a while. But starts again later. Current impression after 4 days: I have actually deployed this solution because room-assistant happens to stop working and does not detect one or both phones. A solution was whether to restart room-assistant or sometimes I have to restart the pis completely. Generally it is not a big deal. I just would like to automate this process. like: detect that a room assistant is not working on a pi. then first restart room-assistant, then restart the pi. |
Update: I am currently testing a new approach: I am matching only defined error messages. Currently I have:
However, I am not sure if those patterns will match if an Android device cannot be detected. Does anyone know how a regular error message looks like if an Android BLE shows errors? |
The error messages are the same irrespective of the BLE devices type. So the ones you identified should be a good list. Given the frequency of errors, have you tried the beta version of room-assistant that disables bleno ? This removes the ability to automatically toggle companion app on/off as your phone moves in/out of range. There have been issues with this feature on some set-ups so the beta version might be worth trying. There is also PR #887 that is not quite ready yet but should hopefully improve things. |
But what is the MAC address? Should I take the MAC address of the bluetooth device? I was not sure because BLE works will UUIDs.
Not yet. But I will test this in the next days. |
Currently, it works pretty good. |
Describe the bug
I have a couple of rpis (rpi0, rpi4 and pi3) around here which I use for room-assistant. I am using BLE, ios companion app and Android Beacon Simulator to track phones.
Lately, I am using monit to monitor the error messages of room-assistant as it occurred a couple of times that room assistant where not able to track my devices. Some of the error messages seems to be weird.
For example:
I am not using Bluetooth Classic at all. Why is room-assistant report that it cannot connect?
The second one:
I think this error occurs when the device is not in range. Is there a way to tell room-assistant not to report if the device is not around?
To reproduce
No specific reproducing steps, just let it run for a day or two.
Relevant logs
the relevant logs are in the text above
Relevant configuration
Paste the relevant parts of your configuration below.
Expected behavior
Environment
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: