This project is a simple bridge that connects Philips Air Purifiers to MQTT. I use this to integrate my Philips Air Purifier into Home Assistant without having to use HACS.
- Mode Control
- Light Control
- Filter Status
- PM2.5
- Allergen Index
- Home Assistant Auto Discovery
Supported Models
- AC2889/10 (I only tested this one)
Other models are probably also supported, but the AC2889 is the only model I own. Please open a ticket or submit a PR if you tested this with another model.
Ensure you have access to an MQTT broker. If you don't have one set up, you can use Mosquitto or other brokers.
The project uses environment variables for configuration. Set the following environment variables before running the project:
Variable | Description | Default* |
---|---|---|
PHILIPS_AIR_HOST |
Air Purifier IP/Host | |
PHILIPS_AIR_DEVICE_NAME |
Air Purifier IP/Host | |
PHILIPS_AIR_PROTOCOL |
http or coap |
http |
PHILIPS_AIR_REFRESH_INTERVAL |
Status Refresh Interval in Seconds | 120 |
MQTT_HOST |
MQTT Broker IP/Host | |
MQTT_USERNAME |
MQTT Broker Username | |
MQTT_PASSWORD |
MQTT Broker Password | |
MQTT_PORT |
IP or Host of you MQTT Broker | 1883 |
MQTT_HA_AD_ENABLED |
Home Assistant Auto Discovery enabled | true |
MQTT_HA_AD_DELETE_ON_SHUTDOWN |
Delete Home Assistant Auto Discovery Topic on Shutdown | false |
*Variables without a default value are required
The easiest way to deploy this is using the docker image.
Create a file called docker-compose.yaml
using the following contents:
version: '3.3'
services:
philips-air-to-mqtt:
image: philips-air-to-mqtt:latest
environment:
- MQTT_HOST=
- MQTT_PORT=1883
- MQTT_USERNAME=
- MQTT_PASSWORD=
- PHILIPS_AIR_HOST=
- PHILIPS_AIR_DEVICE_NAME=
- PHILIPS_AIR_PROTOCOL=http
- PHILIPS_AIR_REFRESH_INTERVAL=120
- MQTT_HA_AD_ENABLED=true
- MQTT_HA_AD_DELETE_ON_SHUTDOWN=false
restart: unless-stopped
init: true
Starting the container:
docker-compose up
- Install node 18
- Clone this repository
- Copy
.env.example
to.env
and edit the configuration - Run
npm install
- Run
export $(cat .env | xargs) && npm start
Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue in the GitHub repository.
This repository uses conventional commits. Please make sure to use the conventional commits for your commit messages.
This project is licensed under the MIT License.
This project would not have been possible without the open source community.
Special thanks to the following projects and libraries: