Philips Air Purifier

I have AC2729 on firmware 0.1.0 (and it’s stuck in this version probably - I can’t update it from both Air matters and Philips Air+ app). From what i’ve noticed it works via HTTP. Using airctrl in console I’m able to either read all values and change whatever setting I want. However, no matter what custom integration I’m trying to use I can’t read any attributes from it inside HA (tho I still can change all settings). Does anyone have an idea how to get values like PM2.5, temperature and other readings in HA? I’ve tried GitHub - marlub/philips-airpurifier: 💨 Philips AirPurifier custom component for Home Assistant.
and GitHub - GeorgeSG/philips_airpurifier_http: Home Assistant integration for Philips Air Purifiers

Interestingly, without me changing anything, its started working :person_shrugging:

No of those apps has an update firmware function, it happens automatically, as I remember. But make sure that you have not blocked internet access to the device.

But for forcing an update, as I recall, you need to unplug the device, wait a minute, plug it back and turn it on. Once connected to the wifi and internet it will try to update the firmware automatically.

Otherwise, use the @kongo09 version of the integration, that is updated continuously. Above your post there is alink to that one.

I tried on my AC1715/11 with this result:

ConnectionRefusedError: [Errno 111] Connection refused (ECONNREFUSED, received through errqueue)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/env/bin/aioairctrl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/env/lib/python3.12/site-packages/aioairctrl/cli.py", line 139, in main
    asyncio.run(async_main())
  File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/root/env/lib/python3.12/site-packages/aioairctrl/cli.py", line 97, in async_main
    client = await CoAPClient.create(host=args.host, port=args.port)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/env/lib/python3.12/site-packages/aioairctrl/coap/client.py", line 41, in create
    await obj._init()
  File "/root/env/lib/python3.12/site-packages/aioairctrl/coap/client.py", line 36, in _init
    await self._sync()
  File "/root/env/lib/python3.12/site-packages/aioairctrl/coap/client.py", line 57, in _sync
    response = await self._client_context.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/env/lib/python3.12/site-packages/aiocoap/protocol.py", line 760, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/root/env/lib/python3.12/site-packages/aiocoap/protocol.py", line 835, in _run
    blockresponse = await blockrequest.response
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiocoap.error.NetworkError: Network error: NetworkError

That looks like the connectivity problem that many people experience. I’m sorry, there nothing you can do.

1 Like

Hello @kongo09 , I just updated the extension from a very old version (v0.10.8) to the latest, but many entities on my purifiers are gone.
So, I rolled back, because the older version is more complete and it has the right icons out of the box.
Could you check the code?
I am attaching some screenshot of the two purifiers (before and after the update) and the code got using the aioairctrl command

Thanks :slight_smile:

AC2889
from

to

this is the json using the command:
aioairctrl --host 192.168.207.48 status --json

{
    "name": "My Device",
    "type": "AC2889",
    "modelid": "AC2889/10",
    "swversion": "1.0.8",
    "range": "Comfort",
    "Runtime": 173474909,
    "rssi": -45,
    "otacheck": false,
    "wifilog": false,
    "free_memory": 57128,
    "WifiVersion": "[email protected]",
    "ProductId": "be10acb2e62411e8a1e3061302926720",
    "DeviceId": "b71b496276b811ecb27e8647d9e01c32",
    "StatusType": "status",
    "ConnectType": "Online",
    "om": "1",
    "pwr": "1",
    "cl": false,
    "aqil": 100,
    "uil": "1",
    "dt": 0,
    "dtrs": 0,
    "mode": "A",
    "pm25": 6,
    "iaql": 2,
    "aqit": 10,
    "aqit_ext": 0,
    "ddp": "0",
    "err": 0,
    "fltt1": "A3",
    "fltt2": "C7",
    "fltsts0": 34,
    "fltsts1": 2074,
    "fltsts2": 2074
}

AC3033/10

from

to

this is the json using the command:
aioairctrl --host 192.168.207.49 status --json

{
    "name": "Soggiorno",
    "type": "AC3033",
    "modelid": "AC3033/10",
    "MCUBoot": true,
    "swversion": "Ms3331",
    "language": "EN",
    "DeviceVersion": "3.3.1",
    "range": "MarsME",
    "Runtime": 21600631,
    "rssi": -52,
    "wifilog": false,
    "free_memory": 55448,
    "WifiVersion": "[email protected]",
    "ProductId": "9efe665a13c111e9bc6802024953075e",
    "DeviceId": "050836b60bbc11ec8e4526af846cca59",
    "StatusType": "status",
    "ConnectType": "Online",
    "om": "s",
    "pwr": "1",
    "cl": false,
    "aqil": 0,
    "uil": "0",
    "uaset": "A",
    "mode": "S",
    "pm25": 21,
    "iaql": 5,
    "aqit": 4,
    "aqit_ext": 0,
    "tvoc": 1,
    "ddp": "1",
    "rddp": "1",
    "err": 49153,
    "fltt1": "A3",
    "fltt2": "none",
    "fltsts0": 0,
    "fltsts1": 1152,
    "fltsts2": 65535,
    "filna": "0",
    "filid": "0",
    "flttotal0": 720,
    "flttotal1": 4800,
    "flttotal2": 65535
}

Nothing should be missing. If anything, it is more stable and more complete.

If you were on a very old version, you might want to delete your entities and integrations and start fresh.

If icons are missing, you need to reload the interface.

I don’t know what to tell you, but I tried even with a new HA installation.
On both devices with latest version some entities are missing.
The AC2889 and 0.10 has:

  • air quality index
  • indoor allergen
  • pm2.5
    but as you can see on my screenshots with the latest I only have the pm2.5 and the allergen

Same thing with the AC3303, I have:

  • air quality
  • allergen
  • pm2.5
  • VOC
    but with latest the allergen are missing

I’m happy to investigate. Please open an issue on GitHub and post your aioairctrl readings for the missing sensor setting.

Thank you, I just open it

I will stay at disposal if you ll need more info etc :wink:

Added my Philips AMF870/15 without a problem sofar. @kongo09 thanks for all the effort!

Hi folks, I just installed Homeassistant and this is my first post in this community, so glad to find this great resource!

I used Docker for my old Synology, HACS, and installed GitHub - kongo09/philips-airpurifier-coap: 💨 Philips AirPurifier custom component for Home Assistant. Supports local CoAP protocol. (Thank you @kongo09 and all other contributors)

My question might be silly, but to add the AC0951/13 purifier I need to provide the local wifi address. However, I have not set it up yet with e.g. Philips Air+. Is this the recommended way, to set it up like this first? (I am worried that it may do irreversible changes, such as firmware updates that make me lose even more access).

I have tried the commandline GitHub - rgerganov/py-air-control: Command line app for controlling Philips air purifiers to configure wifi access with http, plain_coap and coap. The first two commands (while connected to the purifier hotspot) immediately complain “refused”, the coap one does nothing (looks like timeout). Is there any updated commandline configuration utility I should be aware of?

Thanks!

The py airctrl is not most suitable for coap. Try aoiairctrl, the package which is also used by @kongo09 's integration. Instructions are on GitHub

And setting it up with the Philips app is fine. If you want to prevent it from updating its firmware then best to block internet access

Thank you RT1080 for the answers. Before giving up and trying the Philips app, here’s are some of my observations:

  1. Neither the aioairctl connects to the device.

  2. When connected to the Philips Setup access point, I receive an IP of 10.0.0.100. The purifier itself is 10.0.0.1 and it responds to UDP 53 (probably some hardcoded name for the purifier) and to port 30123 on TCP.

Telnetting overt TCP 30123 immediately promts with json and a subsequent enter with another:

$ telnet 10.0.0.1 30123
Trying 10.0.0.1...
Connected to 10.0.0.1.
Escape character is '^]'.
{"type":"deviceinfo","meta":{"message":"check device info","code":100},"data":{"option":55,"name":"AirPurifier","type":"Unicorn","modelid":"AC0951/13","swversion":"0.0.0","bind_token":"<<redacted>>"}}
<<enter>>
{"type":"config","meta":{"message":"no json","code":1000}}

(Where <<enter>> denotes where I pressed enter and <<redacted>> is a 16-hex string)

Unpacking the Philips APK shows that for example modelId is referenced in a class from “com/gaoda/sdk/bean/coap” namespace, which means this is still COAP we’re talking about …

All communication of newer models is through Coap. Whilst Pyairctrl used to work on coap it is known to cause issues - i use pyairctrl it only for my http based machine (pre 2020). Best chance is with kogo009’s repo

I got it working using the Google Assistant SDK integration. The philips air purifier seems to function well with Google Home, although just a basic on/off function. In my case I named my device “Humidifier” in Google Home, calling “Humidfier on” through the Google Assistant SDK turns it on).

I did something similar. I made a script that sends a command to google home (through sdk/assistant), you can do more than just on/off, if you give it a command to chnge modes, it will do that as well. You don’t get the data back - like for m in google home Phillips reports pm levels, but google isn’t able to “pass” those to HA, I think. At least not automatically. I have 4 script in place, for on/off and auto/night modes.

Nice to know there is the option to select auto/night mode. Could you please tell me your exact call for each mode? Google home gives me the following response when I ask it to activate night mode on the device: “it looks like this device hasn’t been set up yet”. Basic on/off does work. Could be a device specific thing, mine is a HU5710.

Hello, I wanted to know if someone has any experience with the Philips AC0650 and the CoAP Integration.

I’m running HA OS on Proxmox and added the integration using HACS. I set up static DHCP for the purifier so it has a static IP. Unfortunately, I didn’t think about adding it to Home Assistant when I bought it, so it probably has an updated firmware.

I tried spinning up a CT container and installing aioairctrl to see if it would work stand alone, but I get the same error from HA (connection refused).

Output from aioairctrl in Debug Mode:
root@test:~# aioairctrl -D -H 10.79.0.4 status --json   
DEBUG:aioairctrl.coap.client:syncing
DEBUG:coap:Sending request - Token: 6387, Remote: <UDP6EndpointAddress 10.79.0.4>
DEBUG:coap:Sending message <aiocoap.Message at 0x79d92efdfb50: NON POST (MID 25787, token 6387) remote <UDP6EndpointAddress 10.79.0.4>, 1 option(s), 8 byte(s) payload>
DEBUG:coap:Socket error recevied, details: SockExtendedErr(ee_errno=111, ee_origin=2, ee_type=3, ee_code=3, ee_pad=0, ee_info=0, ee_data=0)
DEBUG:coap:Incoming error [Errno 111] Connection refused (ECONNREFUSED, received through errqueue) from <UDP6EndpointAddress 10.79.0.4 (locally 10.79.0.105%eth0)>
ConnectionRefusedError: [Errno 111] Connection refused (ECONNREFUSED, received through errqueue)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/root/.local/bin/aioairctrl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aioairctrl/cli.py", line 139, in main
    asyncio.run(async_main())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aioairctrl/cli.py", line 97, in async_main
    client = await CoAPClient.create(host=args.host, port=args.port)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 41, in create
    await obj._init()
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 36, in _init
    await self._sync()
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aioairctrl/coap/client.py", line 57, in _sync
    response = await self._client_context.request(request).response
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aiocoap/protocol.py", line 760, in _run_outer
    await cls._run(app_request, response, weak_observation, protocol, log)
  File "/root/.local/pipx/venvs/aioairctrl/lib/python3.11/site-packages/aiocoap/protocol.py", line 835, in _run
    blockresponse = await blockrequest.response
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
aiocoap.error.NetworkError: Network error: NetworkError

Did the firmware update kill local access completely? Is there a way to still controll it using cloud APIs?

Device details:
Model: AC0650/10
MAC: E4:BC:96:xx:xx:xx
Wi-Fi FW: 1.6.4
Device FW: 0.1.9