Closed lethyro85 closed 11 months ago
This is very strange. I have the same device and it works. What does the debug log say?
2023-06-02 21:42:23.741 WARNING (MainThread) [custom_components.philips_airpurifier_coap] Failed to connect to host 192.168.0.70: [Errno 113] received through errqueue
I fear this is the connectivity problem. Did you try to power cycle the device?
i also was think so, but iwith 0.14.0 without power cycle: same IP. I have delete the integration and add them new in both versions. but only 0.14 will run. No Idea :/
Now that is indeed very strange. Which is the latest version including beta that still runs?
Well i have only stable 0.14 and 0.15 tested,
if i do update it will stuck at
2023-06-02 23:01:27.139 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: philips_airpurifier_coap
by removing it it say the error above.
i can give you this:
This is in 0.14.0:
2023-06-02 23:06:55.052 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration aquarea which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-06-02 23:06:55.056 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration philips_airpurifier_coap which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-06-02 23:06:55.058 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration localtuya which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-06-02 23:06:55.060 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant 2023-06-02 23:07:08.510 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] async_setup called 2023-06-02 23:07:08.548 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] async_setup_entry called for host 192.168.0.70 2023-06-02 23:07:15.245 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] got a valid client for host 192.168.0.70 2023-06-02 23:07:15.246 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] init: Creating and autostarting timer for host 192.168.0.70 2023-06-02 23:07:15.246 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] init: finished for host 192.168.0.70 2023-06-02 23:07:15.246 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] got a valid coordinator for host 192.168.0.70 2023-06-02 23:07:15.246 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] async_first_refresh for host 192.168.0.70 2023-06-02 23:07:15.690 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Starting Timer 180s. 2023-06-02 23:07:18.267 WARNING (MainThread) [custom_components.localtuya.common] [bfa...sag] Failed to connect to 192.168.0.23: [Errno 111] Connect call failed ('192.168.0.23', 6668) 2023-06-02 23:07:20.785 WARNING (MainThread) [custom_components.localtuya.common] [bf8...yhz] Failed to connect to 192.168.0.30: [Errno 113] Connect call failed ('192.168.0.30', 6668) 2023-06-02 23:08:04.755 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: philips_airpurifier_coap 2023-06-02 23:08:07.434 WARNING (MainThread) [custom_components.localtuya.common] [bfa...sag] Failed to connect to 192.168.0.23: [Errno 111] Connect call failed ('192.168.0.23', 6668) 2023-06-02 23:08:10.481 WARNING (MainThread) [custom_components.localtuya.common] [bf8...yhz] Failed to connect to 192.168.0.30: [Errno 113] Connect call failed ('192.168.0.30', 6668) 2023-06-02 23:09:03.096 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] trying to configure host: 192.168.0.70 2023-06-02 23:09:03.110 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] got a valid client 2023-06-02 23:09:03.110 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] trying to get status 2023-06-02 23:09:04.852 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: philips_airpurifier_coap 2023-06-02 23:09:07.439 WARNING (MainThread) [custom_components.localtuya.common] [bfa...sag] Failed to connect to 192.168.0.23: [Errno 111] Connect call failed ('192.168.0.23', 6668) 2023-06-02 23:09:10.481 WARNING (MainThread) [custom_components.localtuya.common] [bf8...yhz] Failed to connect to 192.168.0.30: [Errno 113] Connect call failed ('192.168.0.30', 6668) 2023-06-02 23:09:16.764 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] got status 2023-06-02 23:09:16.767 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] Detected host 192.168.0.70 as model AC2889/10 with name: Schlafzimmer 2023-06-02 23:09:16.768 INFO (MainThread) [custom_components.philips_airpurifier_coap.config_flow] Model AC2889/10 not supported. Trying model family. 2023-06-02 23:09:16.768 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] async_step_user: unique_id=9ecd02e4923211eb81ea1a54784723bc 2023-06-02 23:09:16.769 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] async_setup_entry called for host 192.168.0.70 2023-06-02 23:09:16.782 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] got a valid client for host 192.168.0.70 2023-06-02 23:09:16.782 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] init: Creating and autostarting timer for host 192.168.0.70 2023-06-02 23:09:16.782 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] init: finished for host 192.168.0.70 2023-06-02 23:09:16.782 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] got a valid coordinator for host 192.168.0.70 2023-06-02 23:09:16.783 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] async_first_refresh for host 192.168.0.70 2023-06-02 23:09:16.783 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Starting Timer 180s. 2023-06-02 23:09:40.314 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] finished first refresh for host 192.168.0.70 2023-06-02 23:09:40.314 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] coordinator did first refresh for host 192.168.0.70 2023-06-02 23:09:40.320 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Timer cancelled: ('RESET',) 2023-06-02 23:09:40.321 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Starting Timer 180s. 2023-06-02 23:09:40.353 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.fan] async_setup_entry called for platform fan 2023-06-02 23:09:40.353 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.353 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.sensor] async_setup_entry called for platform sensor 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.354 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.355 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.switch] async_setup_entry called for platform switch 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.light] async_setup_entry called for platform switch 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] PhilipsEntity __init__ called 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.philips] coordinator.status is: {'name': 'Schlafzimmer', 'type': 'AC2889', 'modelid': 'AC2889/10', 'swversion': '1.0.7', 'range': 'Comfort', 'Runtime': 6477895, 'rssi': -56, 'otacheck': False, 'wifilog': False, 'free_memory': 50520, 'WifiVersion': 'AWS_Philips_AIR@73.1', 'ProductId': 'be10acb2e62411e8a1e3061302926720', 'DeviceId': '9ecd02e4923211eb81ea1a54784723bc', 'StatusType': 'status', 'ConnectType': 'Online', 'om': '1', 'pwr': '1', 'cl': False, 'aqil': 100, 'uil': '1', 'dt': 0, 'dtrs': 0, 'mode': 'A', 'pm25': 1, 'iaql': 1, 'aqit': 4, 'aqit_ext': 0, 'ddp': '0', 'err': 209, 'fltt1': 'A3', 'fltt2': 'C7', 'fltsts0': 0, 'fltsts1': 2644, 'fltsts2': 9} 2023-06-02 23:09:40.356 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.select] async_setup_entry called for platform select 2023-06-02 23:09:40.380 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Timer cancelled: ('RESET',) 2023-06-02 23:09:40.380 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.timer] Starting Timer 180s.
So that looks very normal and as expected
yes, but only with 0.14 :( if i can test for you somthing write me :)
You can test the betas after 0.14
I have the same issue with this device
2023-06-04 12:17:33.885 WARNING (MainThread) [custom_components.philips_airpurifier_coap] Failed to connect to host 192.168.1.198: [Errno 113] received through errqueue
2023-06-04 12:17:33.897 WARNING (MainThread) [homeassistant.config_entries] Config entry 'AC2889 Wohnzimmer' for philips_airpurifier_coap integration not ready yet: [Errno 113] received through errqueue; Retrying in background
2023-06-04 12:17:42.365 WARNING (MainThread) [custom_components.philips_airpurifier_coap] Failed to connect to host 192.168.1.198: [Errno 113] received through errqueue
2023-06-04 12:17:50.438 ERROR (MainThread) [coap] Connection loss was not expected.
2023-06-04 12:17:50.440 ERROR (MainThread) [coap] Connection loss was not expected.
2023-06-04 12:17:52.847 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] async_setup_entry called for host 192.168.1.198
2023-06-04 12:17:55.933 WARNING (MainThread) [custom_components.philips_airpurifier_coap] Failed to connect to host 192.168.1.198: [Errno 113] received through errqueue
2023-06-04 12:18:00.682 ERROR (MainThread) [coap] Connection loss was not expected.
2023-06-04 12:18:16.115 DEBUG (MainThread) [custom_components.philips_airpurifier_coap] async_setup_entry called for host 192.168.1.198
2023-06-04 12:18:19.197 WARNING (MainThread) [custom_components.philips_airpurifier_coap] Failed to connect to host 192.168.1.198: [Errno 113] received through errqueue
Does it work for you on version 0.14?
I can just add, that with 0.15 I always get "timeout" during first integration...
Can you please check and let me know if the integration works with the following versions:
v0.15.0-beta.2
v0.15.0-beta.1
v0.14.0
I ran into the same issue with v0.14.0
. I updated to v0.15.0-beta.2
and haven't encountered it since. Will report back in case it happens again.
This indicates that there is a problem with your device or your network. As I said, my AC2889 is working well for all the versions. I wonder if you go to v0.15.0
if it now works as well or not. It might be total coincidence.
Please remember, that this is not just coincidence - as I have reported - my device is getting timeout while adding.. No issue while working with dedicated app on the mobile.
@kongo09, I started to have issues recently and the logged error is similar:
This error originated from a custom integration.
Logger: custom_components.philips_airpurifier_coap.philips
Source: custom_components/philips_airpurifier_coap/philips.py:99
Integration: Philips AirPurifier (with CoAP) (documentation, issues)
First occurred: 17 June 2023 at 11:59:58 (222 occurrences)
Last logged: 17 June 2023 at 12:01:50
_reconnect error
OSError: [Errno 113] received through errqueue
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 99, in _reconnect
self.client = await CoAPClient.create(self._host)
File "/usr/local/lib/python3.10/site-packages/aioairctrl/coap/client.py", line 38, in create
await obj._init()
File "/usr/local/lib/python3.10/site-packages/aioairctrl/coap/client.py", line 33, in _init
await self._sync()
File "/usr/local/lib/python3.10/site-packages/aioairctrl/coap/client.py", line 54, in _sync
response = await self._client_context.request(request).response
File "/usr/local/lib/python3.10/site-packages/aiocoap/protocol.py", line 606, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.10/site-packages/aiocoap/protocol.py", line 665, in _run
blockresponse = await blockrequest.response
aiocoap.error.NetworkError: [Errno 113] received through errqueue
And the logged data looks like not continuous. With hours long constant values which should change regularly, like the hours for the filter.
Might be a different issue, but my log also contains this:
Logger: coap
Source: runner.py:179
First occurred: 11 June 2023 at 19:20:44 (62408 occurrences)
Last logged: 20:56:39
Ignoring unparsable message from ('::ffff:192.168.8.176', 56700, 0, 0)
Ignoring unparsable message from ('::ffff:192.168.8.157', 56701, 0, 0)
Ignoring unparsable message from ('::ffff:192.168.8.156', 56701, 0, 0)
Ignoring unparsable message from ('::ffff:192.168.8.178', 56700, 0, 0)
Connection loss was not expected.
Might related as well, by the number of occurrences and the aiocoap:
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:137
First occurred: 12 June 2023 at 09:37:57 (61530 occurrences)
Last logged: 20:56:39
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiocoap/tokenmanager.py", line 61, in shutdown
await self.token_interface.shutdown()
File "/usr/local/lib/python3.10/site-packages/aiocoap/messagemanager.py", line 65, in shutdown
for messageerror_monitor, cancellable in self._active_exchanges.values():
AttributeError: 'NoneType' object has no attribute 'values'
Logger: homeassistant
Source: /usr/src/homeassistant/homeassistant/runner.py:137
First occurred: 12 June 2023 at 15:27:25 (41 occurrences)
Last logged: 09:39:56
Error doing job: Exception in callback RecvmsgSelectorDatagramTransport.__init__.<locals>.rr() at /usr/local/lib/python3.10/site-packages/aiocoap/util/asyncio/recvmsg.py:74
Traceback (most recent call last):
File "/usr/local/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/local/lib/python3.10/site-packages/aiocoap/util/asyncio/recvmsg.py", line 75, in rr
s()._read_ready()
File "/usr/local/lib/python3.10/site-packages/aiocoap/util/asyncio/recvmsg.py", line 122, in _read_ready
self._protocol.datagram_msg_received(data, ancdata, flags, addr)
File "/usr/local/lib/python3.10/site-packages/aiocoap/transports/udp6.py", line 469, in datagram_msg_received
message = Message.decode(data, UDP6EndpointAddress(address, self, pktinfo=pktinfo))
File "/usr/local/lib/python3.10/site-packages/aiocoap/message.py", line 247, in decode
msg.payload = msg.opt.decode(rawdata[4 + token_length:])
File "/usr/local/lib/python3.10/site-packages/aiocoap/options.py", line 152, in decode
option = option_number.create_option(decode=rawdata[:length])
File "/usr/local/lib/python3.10/site-packages/aiocoap/numbers/optionnumbers.py", line 108, in create_option
option.decode(decode)
File "/usr/local/lib/python3.10/site-packages/aiocoap/optiontypes.py", line 57, in decode
self.value = rawdata.decode('utf-8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 0: invalid start byte
The model is a AC3829/50 with firmware AWS_Philips_AIR@73.1
Hm. I don't know enough about the CoAP details. I run the same 73.1 firmware and don't have these errors. Not sure what's going on.
I tried to reload the integration and it has failed to initialize and to communicate with the unit. Then I downgraded to 0.14, restarted HA and it communicates without any issues and there is an update about every 30 seconds. Before that, it was updating the values randomly. Sometimes staying the same for hours.
So even if you now go back up to 15, you get the error and back to 14 it disappeared again? Is that predictable?
I will need to test that still. I had a connection issue (restarted wifi system) with the airpurifier around the 10th-11th June, but I restarted the airpurifier and it has been resolved. But since that the data was inconsistent. And unfortunately I cannot remember when have I updated the integration.
Please go back and forth a few times. I highly doubt that this is related to the new version. I feel this is the standard connectivity problem of Philips
I will do that. I just don't understand how a restart could fix it, if the issue is not with 0.15. If it is a connection issue and a restart can fix it, then a fix could be implemented into the next version to drop connection to the unit for a few minutes and try again after (assuming that the time matters during the restart).
I swapped back to 0.15 and seems to be working normally. I will keep an eye on it for the next few days.
By the way, the old (unavailable) filters (entitites) should have not been removed automatically?
It's a big mess and the integration tries to restart as well, which might or might not work. Sometimes, power cycling the air purifier helps.
That's where it probably started from. I had to restart the Wifi mesh for other reasons, then the integration was not able to communicate with the air purifier, but the cloud connection was still working without any issues in the Air+ app. So the airpurifier was power cycled, being unplugged for 30 seconds, just to make sure it power cycles correctly. Then the integration started to but seems to be everything was flooded with the aforementioned errors, when it should have had a clean start and a clear run. As I just noticed it yesterday, I cannot really tell what else was in the mix. Everything should have worked as it is, disregarding the mesh restart or the power cycling of the airpurifier, without the restart of HA. I know that the CoAP implementation is not perfect, on both sides. I had issues before, as we all did, when Philips was updating firmware on the units. But this was something new what I have not experienced before. And it looked quite similar to the reported error in this issue, hence I "hijacked" it.
I will keep monitoring it for a few days. Hopefully you are right and it was just a connection issue and all is resolved.
I have a AC3829/10 model. Which has it's perks. (Wi-Fi disconnects quite often and I need to reconfigure it again... If anyone knows a fix for that, that would also be nice!)
I tried to use this plugin using HACS, unfortunately it does not connect, it says time out through the interface. I enabled debug logging, I found this there:
2023-06-27 22:04:14.978 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] trying to configure host: 10.0.0.129
2023-06-27 22:04:14.995 DEBUG (MainThread) [aioairctrl.coap.client] syncing
2023-06-27 22:04:14.996 DEBUG (MainThread) [coap] Sending request - Token: 5adf, Remote: <UDP6EndpointAddress 10.0.0.129>
2023-06-27 22:04:14.996 DEBUG (MainThread) [coap] Sending message <aiocoap.Message at 0x7f0cc7d2d590: NON POST (MID 6521, token 5adf) remote <UDP6EndpointAddress 10.0.0.129>, 1 option(s), 8 byte(s) payload>
2023-06-27 22:04:44.980 WARNING (MainThread) [custom_components.philips_airpurifier_coap.config_flow] Timeout, host 10.0.0.129 doesn't answer, aborting
However, this works: https://github.com/rgerganov/py-air-control
C:\Users\User>airctrl --ipaddr 10.0.0.129
Exchanging secret key with the device ...
Saving session_key <random stuff was here> to C:\Users\User/.pyairctrl
[om] Fan speed: 0
[pwr] Power: OFF
[cl] Child lock: False
[aqil] Light brightness: 50
[uil] Buttons light: OFF
[mode] Mode: manual
[func] Function: Purification & Humidification
[rhset] Target humidity: 70
[rh] Humidity: 41
[temp] Temperature: 25
[pm25] PM25: 5
[iaql] Allergen index: 2
[aqit] Air quality notification threshold: 7
[ddp] Used index: IAI
[wl] Water level: 100
And:
C:\Users\User>airctrl --ipaddr 10.0.0.129 --firmware
Name: AC3829_10
version: 15
upgrade:
state: idle
progress: 0
statusmsg:
mandatory: False
I'm using device firmware version 0.1.9, and WiFi firmware 15 according to the Philips Air+ app.
I have a AC3829/10 model. Which has it's perks. (Wi-Fi disconnects quite often and I need to reconfigure it again... If anyone knows a fix for that, that would also be nice!)
For me wifi issues usually fixed by an extended power cycling. Cable out of the socket, wait a minute plug it back. But what you explain I think is different.
With many IoT devices you need to disable some convenience functions in your router/access point.
By what you wrote, my guess would be, that you have a mesh wifi system. Probably it has the automatic frequency hopping turned on. It means it will adjust its wifi frequency according which channel is the least used. IoT devices generally doesn't like that. Sometimes when they connect to a mesh network, they even store the mac address of the ap. So client steering should be turned off as well, because the devices just cannot work with a mesh.
Tell more and might can help with other ideas.
Thanks for your reply. By the way I have not used the device for over 2 months, so the WiFi was disconnected again after turning it on. Just now when I wanted to install it again and use it in Home Assistant (I also just started with HA, great fun) I re-configured the Air Purifier to the WiFi. Then after 10 minutes I unplugged the device, plugged it back in, and the orange WiFi icon was blinking again, as if it did not save the WiFi details on the device. Does this sound familiar/logical?
As far as I know I don't use a mesh WiFi system... I just have one router (TP-Link Archer C1200). Now I tried setting a static IP for my Air Purifier, maybe it helps. I did it by adding the MAC address of the Air Purifier to a list in the router with a static IP. I have not disconnected the power yet. The process of getting it back on the WiFi is just troublesome.
and the orange WiFi icon was blinking again
So that is a completely different situation. Have you tried to move the air purifier to another location where it might have better wifi reception?
Otherwise, if it is always loosing the settings, then I would think, that must be a hardware issue, and I would contact support. They might can help with some extended troubleshooting instructions. (more than the one linked below)
https://www.philips.sa/en/c-t/XC000019027/i-cannot-connect-my-philips-air-purifier-with-the-app
Mine AC2889/10 is not recognized anymore and I can not reconfigure it.
I can reach it from the official Philips app or I can reach it with aioairctrl
from macOS.
Home Assistant 2023.9.2 philips-airpurifier-coap v0.15.0
This is my error log:
2023-09-18 20:51:16.905 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] async_step_dhcp: called, found: DhcpServiceInfo(ip='192.168.30.107', hostname='mxchip', macaddress='047863e2b****')
2023-09-18 20:51:16.905 DEBUG (MainThread) [custom_components.philips_airpurifier_coap.config_flow] trying to configure host: 192.168.30.107
2023-09-18 20:51:16.941 DEBUG (MainThread) [aioairctrl.coap.client] syncing
2023-09-18 20:51:17.508 DEBUG (MainThread) [coap] Sending request - Token: a445, Remote: <UDP6EndpointAddress 192.168.30.107>
2023-09-18 20:51:17.509 DEBUG (MainThread) [coap] Sending message <aiocoap.Message at 0x7fee846c31d0: NON POST (MID 36338, token a445) remote <UDP6EndpointAddress 192.168.30.107>, 1 option(s), 8 byte(s) payload>
2023-09-18 20:51:20.519 DEBUG (MainThread) [coap] Socket error recevied, details: SockExtendedErr(ee_errno=113, ee_origin=2, ee_type=3, ee_code=1, ee_pad=0, ee_info=0, ee_data=0)
2023-09-18 20:51:20.523 DEBUG (MainThread) [coap] Incoming error [Errno 113] received through errqueue from <UDP6EndpointAddress 192.168.30.107 (locally 192.168.16.1)>
2023-09-18 20:51:20.524 WARNING (MainThread) [custom_components.philips_airpurifier_coap.config_flow] Failed to connect: [Errno 113] received through errqueue
2023-09-18 20:51:20.530 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
OSError: [Errno 113] received through errqueue
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/philips_airpurifier_coap/config_flow.py", line 77, in async_step_dhcp
client = await CoAPClient.create(self._host)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 38, in create
await obj._init()
File "/usr/local/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 33, in _init
await self._sync()
File "/usr/local/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 54, in _sync
response = await self._client_context.request(request).response
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 606, in _run_outer
await cls._run(app_request, response, weak_observation, protocol, log)
File "/usr/local/lib/python3.11/site-packages/aiocoap/protocol.py", line 665, in _run
blockresponse = await blockrequest.response
^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiocoap.error.NetworkError: [Errno 113] received through errqueue
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/discovery_flow.py", line 95, in _async_start
await gather_with_concurrency(
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 183, in gather_with_concurrency
return await gather(
^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/async_.py", line 181, in sem_task
return await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 846, in async_init
flow, result = await task
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 874, in _async_init
result = await self._async_handle_step(flow, flow.init_step, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 394, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/philips_airpurifier_coap/config_flow.py", line 101, in async_step_dhcp
raise exceptions.ConfigEntryNotReady from ex
homeassistant.exceptions.ConfigEntryNotReady: [Errno 113] received through errqueue
I have to apologize for having so little time right now to look into this. Can you please check if an earlier version works?
I tried v0.14.0 and got the same error. It was working with v0.15.0 just a few weeks ago.
@hundehausen, are you using DHCP for assigning IP to the device or have you set it up with fixed IP reservations?
When you say, you can reach from aioairctrl
, are you using the same IP that HA is trying to query? As 192.168.30.107?
Do you have some fancy VLANs and multiple IP ranges set up on your network? As it shows this as well "locally 192.168.16.1". Does your Mac and your phone is on the same network (ip range, etc.)?
Generally a rule of thumb with these Philips airpurifiers, if you have any connection issue, power it down by unplugging the power for a minute, additionally a restart of the router/WiFi network can help as well, as it troubles time to time to connect correctly. After that "troubleshooting" try to connect again.
My device has a fixed IP, set by the UniFi Router.
Yes, when using aioairctrl
I use the same IP address 192.168.30.107.
My subnet from my Mac and my phone is 192.168.10.0/24 and the subnet from my home assistant is 192.168.1.0/24. There are no firewall rules blocking it. I know some devices like the roborock vacuum don't like VLANs. So I added some firewall rules for VLAN NAT for the roborock. I did the same for the Philips air purifier, since it is not reachable anymore, but I did not help, unfortunately.
I tried out your rule of thumb, but I did not work.
More info from my AC2889/10:
WLAN firmware: 73.1 Device firmware: 1.0.7
These devices are a pain in the neck, but if you are complicating the situation with VLANs and subnets, I cannot really help further. I had issues with my device even it is on the same IP range and no VLAN at all...
Let me try to move the philips air purifier in the same subnet as home assistant.
Oh yeah, now it discovered it immediately! So it's a subnet / VLAN problem :/
By the way, have you tried to restart HA? Somehow this integration behaves weirdly and a full restart changes that. (Or might be just stopping interacting with the device for an extended time solves some issues.)
I had multiple times weird connection issues what I couldn't resolve, then just started to work again after some restarts....
Yes, I restarted HA like 30 times :D
Can you temporarily put your device into the same subnet as homeassistant and try again?
Yes, I already did that, like I mentioned just a few minutes ago. And yes, it is working now! It's a routing / firewall problem, but I don't know how to debug this. I am using a Dream Machine Pro from Ubiquiti on latest versions.
I have a AC3829/10 model.
@empewoow : This model by now should be supported by the integration. Does it work for you? If not, please open a new issue as it is off topic here.
I'll close this issue, as the AC2889/10 seems to be working again.
Hello @kongo09 , sorry, but for me AC2889/10 is still not working. I have tried different versions. including beta ones. I thought, that it might be the network problem, but in the meantime I've rebuilded my entire home network with Ubiquiti, using Dream Machine SE. Home Assistant is deffinitelly in the same network. No issue with pairing via mobile native app. But still, integration gives the same answer - timeout...
The mobile app is cloud based, that doesn't say anything about your local connectivity from home assistant.
Does aioairctrl
work for you?
Don't know yet. I need to find some time to configure it.
Well... i see that airctrl is working very well - I can see status and set parameters like power on or off. But with aioairctrl I'm not sure what is going on.
If I use it like this: aioairctrl --host 192.168.1.168 -D status-observe DEBUG:aioairctrl.coap.client:syncing DEBUG:coap:Sending request - Token: 499e, Remote: <UDP6EndpointAddress 192.168.1.168> DEBUG:coap:Sending message <aiocoap.Message at 0x7f61a4d35810: NON POST (MID 5441, token 499e) remote <UDP6EndpointAddress 192.168.1.168>, 1 option(s), 8 byte(s) payload>
..nothing more happen - (while playing around with changing states with the mobile app in the meantime).
If aioairctrl
doesn't work, the integration won't work either.
I have a 2889/10 and with 0.14.0 it will recognized, but with 0.15.0 not.