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 - https://github.com/rgerganov/py-air-control.
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.
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.
Sir a big applause for you 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 - homeassistant.components.fan - ERROR - Error while setting up platform philips-airpurifier
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, in wait_for
return fut.result()
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/philips-airpurifier/fan.py", line 40, in setup_platform
add_devices([PhilipsAirPurifierFan(hass, config)])
File "/config/custom_components/philips-airpurifier/fan.py", line 76, in __init__
self.update()
File "/config/custom_components/philips-airpurifier/fan.py", 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
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: https://github.com/rgerganov/py-air-control/issues/21
When you add â-dâ to the command (to get debug output), you will probably see something like described in this issue.
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 am trying to install it on my Home Assistant Core and I am getting the âPlatform error fan.philips-airpurifier - No module named âCryptodomeââ error in the logs.
I tried to install pyCryptodome on the virtual env and it says "
Requirement already satisfied: pycryptodome in /srv/homeassistant/lib/python3.7/site-packages (3.9.7)".
2020-06-23 20:48:30 ERROR (MainThread) [homeassistant.components.fan] Error while setting up philips-airpurifier platform for fan
Traceback (most recent call last):
File "/var/lib/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
File "/usr/lib/python3.8/asyncio/tasks.py", line 483, in wait_for
return fut.result()
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/var/lib/homeassistant/.homeassistant/custom_components/philips-airpurifier/fan.py", line 40, in setup_platform
add_devices([PhilipsAirPurifierFan(hass, config)])
File "/var/lib/homeassistant/.homeassistant/custom_components/philips-airpurifier/fan.py", line 76, in __init__
self.update()
File "/var/lib/homeassistant/.homeassistant/custom_components/philips-airpurifier/fan.py", line 102, in update
self._pre_filter = filters["fltsts0"]
KeyError: 'fltsts0'