asyncio.exceptions.CancelledError
I have Raspberry Pi 4 Model B Rev 1.1 (Linux earth-ha 5.15.61-v7l+ #1579 SMP Fri Aug 26 11:13:03 BST 2022 armv7l GNU/Linux) and Aranet4 (firmware v0.4.10).
After I connected Aranet4 for the first time, everything was fine. With the command sudo aranetctl EF:C1:88:E1:31:D0 I got the actual data, but after a little while the following error appeared:
earth@earth-ha:~ $ sudo aranetctl EF:C1:88:E1:31:D0 Traceback (most recent call last): File "/usr/local/lib/python3.9/dist-packages/bleak/backends/bluezdbus/client.py", line 171, in connect reply = await self._bus.call( File "/usr/local/lib/python3.9/dist-packages/dbus_fast/aio/message_bus.py", line 337, in call await future asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/aranetctl", line 33, in
[bluetooth]# list Controller DC:A6:32:66:43:DF earth-ha [default] [bluetooth]# paired-devices Device EF:C1:88:E1:31:D0 Aranet4 00407
I can also see data coming from the Aranet device: [CHG] Device EF:C1:88:E1:31:D0 RSSI: -83
When the device is deleted in bluetoothctl and paired again, it is possible to receive data once again. Then the said error appears again.
Additionally and unrelatedly, when I got the data from Aranet, I found that the firmware version does not match what is shown on the phone.
earth@earth-ha:~ $ sudo aranetctl EF:C1:88:E1:31:D0
Connected: Aranet4 00407 | v0.3.1 Updated 12 s ago. Intervals: 120 s 5040 total log_size
CO2: 812 ppm Temperature: 21.3 °C Humidity: 56 % Pressure: 1009.7 hPa Battery: 76 % Status Display: GREEN
I'm having this same issue. I have to remove the device and repair every time I run aranetctl; otherwise I get asyncio.exceptions.CancelledError just as @EarthK shared.