python-eq3bt
python-eq3bt copied to clipboard
error in code when connection fails
I test the script and an error occurs vhen the connection fails. Here are the logs `Traceback (most recent call last): File "/home/pi/.local/lib/python3.7/site-packages/eq3bt/connection.py", line 36, in enter self._conn.connect(self._mac) File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 455, in connect self._connect(addr, addrType, iface) File "/usr/local/lib/python3.7/dist-packages/bluepy/btle.py", line 447, in _connect raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType) , rsp) bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral 00:1A:22:0E:D0:FD, addr type: publi c
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./eq3cli", line 10, in
The error reporting is not indeed very nice, this is tangentially related to #29 .
I have the same problem but i didn't get what is the root cause. It is too far away causing issues?
Any suggestion from where to start troubleshooting
I am sorry to say but I have the same problem
`Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/eq3bt/connection.py", line 36, in enter self._conn.connect(self._mac) File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 445, in connect self._connect(addr, addrType, iface) File "/usr/local/lib/python3.6/dist-packages/bluepy/btle.py", line 439, in _connect raise BTLEDisconnectError("Failed to connect to peripheral %s, addr type: %s" % (addr, addrType), rsp) bluepy.btle.BTLEDisconnectError: Failed to connect to peripheral 00:1A:22:13:8C:73, addr type: public
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/eq3cli", line 11, in
The root cause is the inability to connect to the device, which can be caused by various reasons. Some users have reported low battery or too long distance as potential causes for this. There is unfortunately nothing that can be done code-wise here, besides making the error reporting of the client tool nicer by suppressing the stacktrace.
The root cause is the inability to connect to the device, which can be caused by various reasons. Some users have reported low battery or too long distance as potential causes for this. There is unfortunately nothing that can be done code-wise here, besides making the error reporting of the client tool nicer by suppressing the stacktrace.
What about a configurable retry rate? After trying to run a command for example 5-15 times it finally get's through to the device. It would be nice if your cli utility / library would offer some way to just add a retry.
That could be done, PRs are welcome!
The above mentioned errors (e.g. from zyndata above) occur in my case when I try to connect a second time to the SAME bluetooth thermostats while the first request to it is not finished yet. A connection to different thermostats at the same time is NO problem.
The behavior can be reproducably provoked by calling the python script from Schnup89 from two different terminal windows right after each other.
Also, it seems that the adapter dies (turns red in IOBroker) when this occurs.
In case someone is interested, I have submitted a pull request (#46) that is supposed to fix this issue. If you have any feedback, please let me know.
This question may be out of context: I use this through the Home Assistant Integration and retries would finally make these radiators solid. Do you maintain that integration?