Philips Air Purifier Climate / Fan Component


Wondering is there a possibility to integrate the Philips Air Purifier to HA ? User @HaUserFromFarAway found this command line program to control the WiFi enabled Philips Air Purifiers -
It is tested with AC2729 and AC2889 models. I have the AC3259 and it is working too. Can anyone try to wrap it into a HA component ?

Totally agree. The default app is not much more than a fancy remote control. Being able to do some automation based on presence, weather, air quality in- and outdoors would be awesome.
Out of the box Philips offers nothing, so HA would be the first platform where we can automate philips air purifiers/humidifiers.

Come on now!

No one with the skill and time to get this working?

All i can do is confirm that the linked python command line tool works perfectly with the Philips AC3829 (purifier + humidifier).
I have zero programming skills unfortunately, and asking around in several facebook groups did not lead to anybody with the combination of:

  • has (python/yaml) programming skills
  • owns a philips purifier
  • uses Home Assistant

If anybody is looking here that has the technical skills but does not own a philips air purifier, the python tool works, it just needs to be wrapped in a HA component.
If anybody can wrap it into a HA component, i’ll gladly test it, do whatever finetuning is needed and make a fancy lovelace card for viewing and controlling your purifier from your HA dashboard.

Would love to see an integration for this.

AC2729 on the way to me. If its nice I intent to implement it in my homeassistant setup. Will update you if i got sth

So i reversed engineered the protocol from my new unit. My code currently is here:

If you experience problems please describe them here:

A custom_component for HACS is available here that uses this new protocol version 2 option (should also work with older models):

Currently it exports some attributes as well as controlling fan mode and power.
Will add services to control function, aqil, target humidity soon


Sir a big applause for you :slight_smile: many thanks for your hard work.

I have just tested the solution with my AC2729/50 and got the following error:

2020-02-03 13:11:53,040 - MainThread - - ERROR - Error while setting up platform philips-airpurifier
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/", line 442, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.7/concurrent/futures/", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/philips-airpurifier/", line 40, in setup_platform
    add_devices([PhilipsAirPurifierFan(hass, config)])
  File "/config/custom_components/philips-airpurifier/", line 76, in __init__
  File "/config/custom_components/philips-airpurifier/", line 102, in update
    self._pre_filter = filters["fltsts0"]
KeyError: 'fltsts0'

Have you seen such an issue so far? Also I would like to highlight that AC3259/10 works like a charm.

Update: if I try to use airctrl I have just got an empty response

[email protected]_server:~/py-air-control$ sudo airctrl --ipaddr --protocol coap
[email protected]_server:~/py-air-control$ echo $?

Yes, you have probably connected your device to the cloud and Philips did some updates on your device.
The payloads of the requests to the device needs to be encrypted as it seems. My solution only works for devices that are on local control and never connected to cloud.
Follow this:

When you add “-d” to the command (to get debug output), you will probably see something like described in this issue.

Yes you are right, I have the same issue as described in the mentioned issue. Thanks for the quick reply.

I’m a bit confused on this thing. In HACS I only see the version of xMrVizzy and not of shexbeer. I do not need the new protocol since I have an older air purifier. Does the version of shexbeer support the fan.set_speed service? It doesn’t work for me on xMrVizzy version at least.

I made the service fan.set_speed available by adding

    def supported_features(self) -> int:
        return 1

to class PhilipsAirPurifierFan(FanEntity) in

I also made all modes work by changing set_speed in into:

    def set_speed(self, speed: str):
        values = {}
        if speed == 'Turbo':
            values['mode'] = 'M'
            values['om'] = 't'
        elif speed == 'Speed 1':
            values['mode'] = 'M'
            values['om'] = '1'
        elif speed == 'Speed 2':
            values['mode'] = 'M'
            values['om'] = '2'
        elif speed == 'Speed 3':
            values['mode'] = 'M'
            values['om'] = '3'
        elif speed == 'Auto Mode':
            values['mode'] = 'P'
        elif speed == 'Allergen Mode':
            values['mode'] = 'A'
        elif speed == 'Sleep Mode':
            values['mode'] = 'M'
            values['om'] = 's'

Works well for the AC2889.