This is a Local Push
integration for Philips airpurifiers and humidifiers.
Currently only encrypted-CoAP is implemented.
Due to a bug in the Philips devices, this integration is rather instable. It might or might not work. Even if it seems ok at first, it might stop working after a while. Sometimes, a power cycle of the Philips device helps. Sometimes, only a power cycle and a Home Assistant restart together help. It is frustrating. Do not report this as an issue here. Nobody can help right now. @mhetzi contributed timer code to attempt reconnects if the device is not responsive. Sometimes, that helps. But not always. You've been warned.
It all goes back to some reverse engineering by @rgerganov and you can read about it here: https://xakcop.com/post/ctrl-air-purifier/
Philips has recently introduced a proper API to remote control the devices. However, this only works with the Philips cloud and it is not public (yet?) but only integrates Google Home and Alexa. It used to integrate IFTTT as well, but that seems discontinued.
Add Integration
Philips AirPurifier
and select itNote: configuration.yaml
is no longer supported and your configuration is not automatically migrated. You have to start fresh.
Note: Some of these models seem to have a newer firmware that does not allow local connections anymore. If you buy the device with the intention to manage it via Home Assistant, make sure you can return it, if the integration doesn't work for you.
You can help to get us there.
Please open an issue and provide the raw status-data for each combination of modes and speeds for your model.
To aquire those information please follow these steps:
Create yourself a virtual environment
python -m venv env
source ./env/bin/activate
Install aioairctrl
package inside the virtual environment
python -m pip install aioairctrl
aioairctrl --host $DEVICE_IP status --json
to exit the virtual environment, simply type
deactivate
To aquire debug-logs, add the following to your configuration.yaml
:
logger:
logs:
custom_components.philips_airpurifier_coap: debug
coap: debug
aioairctrl: debug
logs should now be available in home-assistant.log
The integration provides fan
entities for your devices which are documented here. In addition, if your device is a humidifier or a 2-in-1 device, the integration will also provide a humidifier
entity which is documented here. The two entities work together, i.e. the fan
controls power and settings for the fan operation while the humidifier
adds extra capabilities.
It also provides a number of sensor
entities for the air quality and other data measured by the device, as well as some diagnostic sensor
entities with information about the filter or water fill level for humidifiers. A switch
entity allows you to control the child lock function, should your device have one, or a set of other capabilities depending on your model. Finally, there are some light
entities to control the display backlight and the brightness of the air quality display and some select
entities to set other functions like timers. Few devices also have number
entities to set certain values.
The goal is, to offer all existing functionality that is also available both, on the device itself but also in the official app.
Unlike the original philips_airpurifier_coap
integration, this version does not provide any additional services anymore. Everything can be controlled through the entities provided.
The fan
entity has some additional attributes not captured with sensors. Specifcs depend on the model. The following list gives an overview:
attribute | content | example |
---|---|---|
name: | Name of the device | bedroom |
type: | Configured model | AC2729 |
model_id: | Philips model ID | AC2729/10 |
product_id: | Philips product ID | 85bc26fae62611e8a1e3061302926720 |
device_id: | Philips device ID | 3c84c6c8123311ebb1ae8e3584d00715 |
software_version: | Installed software version on device | 0.2.1 |
wifi_version: | Installed WIFI version on device | AWS_Philips_AIR\@62.1 |
error_code: | Philips error code | 49408 |
error: | Error in clear text | no water |
preferred_index: | State of preferred air quality index | PM2.5 , IAI |
runtime: | Time the device is running in readable text | 9 days, 10:44:41 |
The integration also provides the original Philips icons for your use in the frontend. The icons can be accessed with the prefix pap:
and should be visible in the icon picker. Credit for this part of the code goes to @thomasloven
icon | name |
---|---|
power_button | |
child_lock_button | |
auto_mode_button | |
fan_speed_button | |
humidity_button | |
light_dimming_button | |
light_function | |
ambient_light | |
two_in_one_mode_button | |
timer_reset_button | |
sleep_mode | |
auto_mode | |
speed_1 | |
speed_2 | |
speed_3 | |
allergen_mode | |
purification_only_mode | |
two_in_one_mode | |
bacteria_virus_mode | |
pollution_mode | |
nanoprotect_filter | |
filter_replacement | |
water_refill | |
prefilter_clearning | |
prefilter_wick_cleaning | |
pm25 | |
iai | |
wifi | |
reset | |
circulate | |
clean | |
mode | |
pm25b | |
rotate | |
oscillate | |
heating | |
gas |
Note: you might have to clear your browser cache after installation to see the icons.