# Binding request: Philips air purifier

**URL:** <https://community.openhab.org/t/binding-request-philips-air-purifier/66304>\
**Category:** Bindings\
**Tags:** philips, airquality, purifier\
**Created:** [February 1, 2019, 3:48pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304 "2019-02-01T15:48:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![duiffie](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@duiffie](https://community.openhab.org/u/duiffie)\
**Post date:** [February 1, 2019, 3:48pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/1 "2019-02-01T15:48:39Z")

</div>

Is any of the openHAB developers interested in creating a binding for Philips air purifiers? I found a python script which communicates with those devices, but I guess a binding is much nicer than all sorts of exec things and items to control such a device. The python script can be found [here](https://github.com/rgerganov/py-air-control). Anyone interested? 🙂

---

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [February 1, 2019, 8:36pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/2 "2019-02-01T20:36:36Z")

</div>

> [@duiffie](#):
>
> Anyone interested?

You could post an incentive on Bounty source

> [@Introducing BountySource for funded development](https://community.openhab.org/t/introducing-bountysource-for-funded-development/32879):
>
> All, While in the early days of openHAB every user was also a developer, the number of non-tech users steadily grew over time. This led us to the situation, where the number of ideas and feature requests clearly outweighs the capacity of the openHAB developer community. Having more ideas than it is possible to implement brings up the question of prioritisation. For users that are developers, this is rather easy as they decide for themselves what is most important for them and then come up with…

---

<div class="post-metadata">

**Author:** ![duiffie](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@duiffie](https://community.openhab.org/u/duiffie)\
**Post date:** [February 1, 2019, 8:56pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/3 "2019-02-01T20:56:17Z")

</div>

I could do that, but I won’t… thanks for the idea though

---

<div class="post-metadata">

**Author:** ![cweitkamp](https://community.openhab.org/user_avatar/community.openhab.org/cweitkamp/32/56864_2.png) [@cweitkamp](https://community.openhab.org/u/cweitkamp)\
**Post date:** [February 2, 2019, 9:55am UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/4 "2019-02-02T09:55:47Z")

</div>

Hi Marco,

Give it a try on your own: [Developing a Binding for openHAB](https://www.openhab.org/docs/developer/development/bindings.html). It is not that hard. Have fun and do not hesitate to ask if you have any questions.

---

<div class="post-metadata">

**Author:** ![tomekz28](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@tomekz28](https://community.openhab.org/u/tomekz28)\
**Post date:** [March 15, 2019, 8:50pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/5 "2019-03-15T20:50:51Z")

</div>

It looks like someone (hats off!) has just now published a python script for the philips air purifiers.

> **[GitHub - rgerganov/py-air-control: Command line app for controlling Philips air...](https://github.com/rgerganov/py-air-control)**
>
> Command line app for controlling Philips air purifiers

I just tried it and voila, it works with my AC3256/60 air purifier from command line (running openhabian). Haven’t tried it yet, but I do not see why it wouldn’t work with the exec binding. Will have to give it a try. It can be a work-around until a dedicated binding is done.

---

<div class="post-metadata">

**Author:** ![duiffie](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@duiffie](https://community.openhab.org/u/duiffie)\
**Post date:** [March 15, 2019, 10:06pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/6 "2019-03-15T22:06:01Z")

</div>

Seems like that’s the same script that I was referring to in my first post… Hats off 😉

---

<div class="post-metadata">

**Author:** ![tomekz28](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/5e9695/32.png) [@tomekz28](https://community.openhab.org/u/tomekz28)\
**Post date:** [March 18, 2019, 9:24pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/7 "2019-03-18T21:24:49Z")

</div>

You are right. I confirm that I got it to work.  
Here’s what I did. Note there are 2 dashes before pwr, om and so on.

1. Installed the python program.
2. Installed Exec binding.
3. Set up channels in the binding
4. Edited the conf files:  
Rules:

> rule “Philips\_AC3259 ON”  
> when  
> Time cron “0 0 22 \* \* ?”  
> then  
> ac3259\_Args.sendCommand(“–pwr 1”)  
> exec\_command\_ac3259\_run.sendCommand(ON)  
> Thread::sleep(1000)  
> ac3259\_Args.sendCommand(“–aqil 0”)  
> exec\_command\_ac3259\_run.sendCommand(ON)  
> Thread::sleep(1000)  
> ac3259\_Args.sendCommand(“–om 2”)  
> exec\_command\_ac3259\_run.sendCommand(ON)  
> Thread::sleep(1000)   
> ac3259\_Args.sendCommand(“–mode A”)  
> exec\_command\_ac3259\_run.sendCommand(ON)  
> sendMail(“[xxxxx@gmail.com](mailto:xxxxx@gmail.com)”, “Philips turned on”, “Philips turned on”)  
> sendNotification(“[xxxxx@gmail.com](mailto:xxxxx@gmail.com)”, “Philips turned on”)  
> end
> 
> rule “Philips\_AC3259 OFF”  
> when  
> Time cron “0 0 7 \* \* ?”  
> then  
> ac3259\_Args.sendCommand(“–pwr 0”)  
> exec\_command\_ac3259\_run.sendCommand(ON)  
> sendMail(“[xxxxxxx@gmail.com](mailto:xxxxxxx@gmail.com)”, “Philips turned off”, “Philips turned off”)  
> sendNotification(“[xxxxxx@gmail.com](mailto:xxxxxx@gmail.com)”, “Philips turned off”)  
> end

Items:

> // Arguments to be placed for ‘%2$s’ in command line  
> String ac3259\_Args {channel=“exec:command:ac3259:input”}  
> // Output of command line execution  
> String ac3259\_out {channel=“exec:command:ac3259:output”}

Things:

> Thing exec:command:ac3259 [command=“airctrl 192.168.7.123 %2$s”, interval=0, timeout=5, autorun=false]

---

<div class="post-metadata">

**Author:** ![noppes123](https://community.openhab.org/user_avatar/community.openhab.org/noppes123/32/115976_2.png) [@noppes123](https://community.openhab.org/u/noppes123)\
**Post date:** [March 23, 2019, 7:23am UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/8 "2019-03-23T07:23:07Z")

</div>

> [@cweitkamp](#):
>
> Give it a try on your own: [Developing a Binding for openHAB](https://www.openhab.org/docs/developer/development/bindings.html). It is not that hard. Have fun and do not hesitate to ask if you have any questions.

Hi @cweitkamp, that is exactly what I intend to do.😀 It is a simple device, so that should make a good example to brush up my rusty programming skills (dating from the 90’s and 00’s with languages like assembler, C/C++) and get going in the world of OH!

However, given the current state of the build system, my lack of experience (I grew up in the age of `make`…), and adding a touch of ‘out of sync’ documentation, I have a hard time to get going.  
But, I’ll post my struggles and questions in the development thread.

---

<div class="post-metadata">

**Author:** ![Tobi77](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@Tobi77](https://community.openhab.org/u/Tobi77)\
**Post date:** [April 18, 2019, 8:09am UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/9 "2019-04-18T08:09:38Z")

</div>

Dear all,

I also bought a Philips Air Please series 1000 with WiFi.

@noppes123, would you be so kind to keep me updated? Thanks a lot 🙂

---

<div class="post-metadata">

**Author:** ![noppes123](https://community.openhab.org/user_avatar/community.openhab.org/noppes123/32/115976_2.png) [@noppes123](https://community.openhab.org/u/noppes123)\
**Post date:** [April 18, 2019, 8:14pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/10 "2019-04-18T20:14:51Z")

</div>

@Tobi77: since this is my very first binding and very first Java program, it will take some time with the limited spare time I have. But I’ll post relevant updates on the forum. Another challenge is the fact that the entire build system of openHAB gets a major overhaul, so this is not really the best time to start developing bindings…😁

FYI, so far I’ve been able to perform the Diffie-Hellman Key exchange to decrypt and encrypt the communication and retrieve firmware info as a test scenario. Next step will be to implement discovery and binding/thing configuration. Extracting the other information will be relatively easy by then…

---

<div class="post-metadata">

**Author:** ![Tobi77](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@Tobi77](https://community.openhab.org/u/Tobi77)\
**Post date:** [April 19, 2019, 5:39am UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/11 "2019-04-19T05:39:59Z")

</div>

@noppes123 Great, thank you!

---

<div class="post-metadata">

**Author:** ![michalboronski](https://community.openhab.org/user_avatar/community.openhab.org/michalboronski/32/45821_2.png) [@michalboronski](https://community.openhab.org/u/michalboronski)\
**Post date:** [December 4, 2019, 10:19am UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/12 "2019-12-04T10:19:03Z")

</div>

Hi @duiffie  
I made some binding based on the work of rgerganov

> **[openhab-addons/bundles/org.openhab.binding.philipsair at master ·...](https://github.com/michalboronski/openhab-addons/tree/master/bundles/org.openhab.binding.philipsair)**
>
> Add-ons for openHAB 2.x. Contribute to michalboronski/openhab-addons development by creating an account on GitHub.

And here you can find alpha build [org.openhab.binding.philipsair-2.5.0-SNAPSHOT.jar](https://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.philipsair/2.5.0-SNAPSHOT/org.openhab.binding.philipsair-2.5.0-SNAPSHOT.jar)

Feel free to comment and contribute!

---

<div class="post-metadata">

**Author:** ![duiffie](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@duiffie](https://community.openhab.org/u/duiffie)\
**Post date:** [December 4, 2019, 12:15pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/13 "2019-12-04T12:15:49Z")

</div>

Great news, thanks! Just placed the binding file in my addons directory, but it doesn’t seem to discover my device. Maybe that’s because it’s type is not defined in the binding? It’s not possible to add it manually from paperui either. My devicetype is ac3829, which works with the airctrl.py script as well.

---

<div class="post-metadata">

**Author:** ![michalboronski](https://community.openhab.org/user_avatar/community.openhab.org/michalboronski/32/45821_2.png) [@michalboronski](https://community.openhab.org/u/michalboronski)\
**Post date:** [December 4, 2019, 12:50pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/15 "2019-12-04T12:50:24Z")

</div>

Yes indeed, it most probably it’s due to that not all models are listed in the binding definition. I’ll add yours (is that ac3829/10 or ac3829/50), but also change UPNP discovery to create generic Philips Air Purifier devices that works universally.  
Since you have a different model than I do it would be worth for me to know is the detailed message from your purifier to see what other parameters it exposes beside the ones I know already (based on my AC2889/10).  
To do that please look for a log lines in openhab.log of like this one

> 2019-12-04 13:36:49.607 [DEBUG] [l.connection.PhilipsAirAPIConnection] - Philips Air Purifier device response: status = 200, content = ‘{“om”:“0”,“pwr”:“0”,“cl”:false,“aqil”:75,“uil”:“1”,“dt”:0,“dtrs”:0,“mode”:“P”,“pm25”:4,“iaql”:1,“aqit”:10,“ddp”:“1”,“err”:0}’

However you’d probably need to first turn on debug logging via Karaf console :

> log:set DEBUG org.openhab.binding.philipsair

Using that I will be able to add potentially new parameters this model provides 🙂

---

<div class="post-metadata">

**Author:** ![duiffie](https://community.openhab.org/letter_avatar_proxy/v4/letter/d/eb9ed0/32.png) [@duiffie](https://community.openhab.org/u/duiffie)\
**Post date:** [December 4, 2019, 2:26pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/16 "2019-12-04T14:26:36Z")

</div>

ac3829/10 it is. When I placed your new binding containing my model I’ll send you the results

---

<div class="post-metadata">

**Author:** ![michalboronski](https://community.openhab.org/user_avatar/community.openhab.org/michalboronski/32/45821_2.png) [@michalboronski](https://community.openhab.org/u/michalboronski)\
**Post date:** [December 4, 2019, 4:38pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/17 "2019-12-04T16:38:24Z")

</div>

I made a fix and should discover your model too  
[org.openhab.binding.philipsair-2.5.0-SNAPSHOT.jar](http://openhab.jfrog.io/openhab/libs-pullrequest-local/org/openhab/addons/bundles/org.openhab.binding.philipsair/2.5.0-SNAPSHOT/org.openhab.binding.philipsair-2.5.0-SNAPSHOT.jar)

---

<div class="post-metadata">

**Author:** ![markuslaube](https://community.openhab.org/user_avatar/community.openhab.org/markuslaube/32/43405_2.png) [@markuslaube](https://community.openhab.org/u/markuslaube)\
**Post date:** [December 4, 2019, 5:17pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/18 "2019-12-04T17:17:42Z")

</div>

Cool, You make me Happy, installed and works fine 😉  
Thanks for your Development!

Laubi

---

<div class="post-metadata">

**Author:** ![markuslaube](https://community.openhab.org/user_avatar/community.openhab.org/markuslaube/32/43405_2.png) [@markuslaube](https://community.openhab.org/u/markuslaube)\
**Post date:** [December 4, 2019, 5:20pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/19 "2019-12-04T17:20:08Z")

</div>

FYI: Works fully discovered with this Models by me:  
AC5659/10  
AC2889/10

---

<div class="post-metadata">

**Author:** ![Tobi77](https://community.openhab.org/letter_avatar_proxy/v4/letter/t/d2c977/32.png) [@Tobi77](https://community.openhab.org/u/Tobi77)\
**Post date:** [December 4, 2019, 7:36pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/20 "2019-12-04T19:36:56Z")

</div>

Great 🙂

Would it be possible to add model AC1214/10? That’s the one I own, and as it is controllable via app, it should also be addressable via network…

---

<div class="post-metadata">

**Author:** ![michalboronski](https://community.openhab.org/user_avatar/community.openhab.org/michalboronski/32/45821_2.png) [@michalboronski](https://community.openhab.org/u/michalboronski)\
**Post date:** [December 4, 2019, 9:00pm UTC](https://community.openhab.org/t/binding-request-philips-air-purifier/66304/21 "2019-12-04T21:00:56Z")

</div>

Since I was not able to even find a comprehensive list of all Philips Air purifiers cntrollable via WiFi, I can only assume and hope they all communicate in the same way. Currently I physically I have only 2889/10, I also had 2729.  
@Tobi77, if you currently control your model with Air Matters application (that is what I used initially) then I’m pretty sure it will already work with that binding. However it might be that some particular models reports extra parameters, while some does not use others.  
Best would be to get sample messages for as many models as possible, available in logs when using this binding and see what are differences.  
See my earlier post on how to enable DEBUG and what to look for in the log.

[Next page](https://community.openhab.org/t/binding-request-philips-air-purifier/66304.md?page=2)
