kongo09 / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. Supports local CoAP protocol.
156 stars 22 forks source link

AC2889 not working with aioairctrl but is with airctrl #130

Closed blippercop closed 3 months ago

blippercop commented 3 months ago

Having an AC2889 I wanted to integrate it in HA. However there was only a timeout. Did the steps on the readme aioairctrl to get the status. However it only hangs there infinitely. Powercyle the device etc changed nothing. Then I found https://github.com/rgerganov/py-air-control and tried it. Running:

Exchanging secret key with the device ...
Saving session_key 9fXXX...XXXXXXe3 to /Users/user/.pyairctrl
[om]                          Fan speed: silent
[pwr]                         Power: ON
[cl]                          Child lock: False
[aqil]                        Light brightness: 100
[uil]                         Buttons light: ON
[mode]                        Mode: auto
[pm25]                        PM25: 2
[iaql]                        Allergen index: 1
[aqit]                        Air quality notification threshold: 4
[ddp]                         Used index: IAI

It instantly reported status and using "airctrl --ipaddr 192.168.28.35 --mode M --om 2" I was able to change fan speeds. What can I do to get your integration running, or is the other library a help and could be integrated?

Thanks!

EDIT: WLAN Firmware 14 Device Firmware 1.0.4

kongo09 commented 3 months ago

My AC2889 works but that doesn't say much with Phillips devices, unfortunately.

Did you try --protocol coap on the command line to test if encrypted CoAP works?

kongo09 commented 3 months ago

My AC2889 shows the following in the Philips app:

Screenshot_20240329-172738

blippercop commented 3 months ago

Thank you for the very fast reply :) Very interesting that you have a different (newer) firmware. As your WIFI firmware is different too (mine only says 14 - nothing else) I am assuming that this might be because of a different region??

regarding --protocol coap "aioairctrl --host 192.168.28.35 --protocol coap status" results in

aioairctrl: error: argument command: invalid choice: 'coap' (choose from 'status', 'status-observe', 'set')

and airctrl --ipaddr 192.168.28.35 --protocol coap results in

    raise Exception("sync timeout")
Exception: sync timeout
kongo09 commented 3 months ago

I suspect that your device doesn't support encrypted CoAP which is why the integration doesn't work.

blippercop commented 3 months ago

I understand. Looks like there is no way of updating the firmware (unless the device decides to do so - which mine isn't).

Thank you for the fast help!