I would like to share with you a new binding for Philips Air Purifiers device family.
The OpenHAB binding provides readings and control of Philips Air Purifier devices.
Based on the project at py-air-control
by rgerganov and this binding is an adaptation to OpenHAB project. Thanks for researching the whole communication with those devices!
Any feedback welcome!
Supported Things
Supported Philips Air Purifiers (hardware testes) devices are
AC2889/10
AC2729/50
Features
first OpenHAB 2 binding poviding support for Phlips Air Purifiers devices
@michalboronski
Thank you for your work.
Do you know if new Philips models DualScan are supported
for example this model Philips Dual Scan AC3858/50 ?
Asking based on comments here:
There is an experimental support for newer models (after end of 2019) which communicate over the CoAP protocol. So this binding support CoAP protocol also?
Yes, I’m aware of the recent switch to CoAP but as it’s already noted here - yes, looks like it won’t be easie to provide support as the communication is encrypted and ports are closed
Hi @michalboronski,
First of all many thanks for your work!
I have a problem with the binding, it does not discover my AC2889/10 automatically.
Currently I am running openHAB 2.5.6-2 and I have tried the following versions:
org.openhab.binding.philipsair-2.5.5-SNAPSHOT.jar
org.openhab.binding.philipsair-2.5.0-SNAPSHOT.jar
The manual installation was successful, it is shown as active in the console and I can see it in Paper UI.
In the Philips app the AC2889/10 is also shown and I can control it without problems.
Is there anything else special to do, what else can I check?
Or does the binding generally not work correctly with openHAB 2.5.6?
Thanks!
Maybe someone can help me how I can the get the actual powerstate to sync it with openhab?
This is what I’ve done so far…I installed the phyton script and I am able to control my device via command line.
I created a simple rule so when I switch a item to on or off a script with the command line code will be started to power on or off the device.
This is working fine, also the control via „Fan“ in HomeKit works nice.
My only problem is when the powerstate is changed on the device itself (physical button) or via the Philips app the powerstate is no longer synchronized.
How can I fetch the powerstate and show it correct in openhab no matter how the state is changed?
@michalboronski or whoever finds it useful:
In anticipation of my Philips air to arrive I made this port to OH3:
UnfortunatelyPhilips cancelled my order, so I’ll not have one on short notice to actually test it with a device.
But you may find it useful. It compiles again against the OH3.1 (disabled few of the tests though)
After beeing on a long hiatus as a developer over last months (it’s all covid’s fault;)) I’m planning to get back to coding beginning of March and try to add what is needed for most recent FW. First I need to upgrade my OH from 2.5 to 3 @marcel_verpaalen I will definitely take a look at your port to see what has changed in terms of OH3
We can open a new PR once it is verified it works against newer FW.
I try to use the binding to access the AC 2889 in Openhab.
Installed:
openhab-transport-coap │ 3.4.0 │ x │ Started │ distro-3.4.0 │ CoAP Transport
openhab-transport-upnp │ 3.4.0 │ x │ Started │ distro-3.4.0 │ UPnP Transport
org.openhab.binding.philipsair │ 3.4.0.SNAPSHOT │ x │ Started │ org.openhab.binding.philipsair-3.4.0-SNAPSHOT │ openHAB Add-ons :: Bundles :: Philips Air Purifie
Philips air binding installed from market place.
Exception:
java.lang.IllegalArgumentException: Empty key
at javax.crypto.spec.SecretKeySpec.(SecretKeySpec.java:95) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirCipher.initKey(PhilipsAirCipher.java:76) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirHttpAPIConnection.initCipher(PhilipsAirHttpAPIConnection.java:91) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirHttpAPIConnection.(PhilipsAirHttpAPIConnection.java:82) ~[?:?]
at org.openhab.binding.philipsair.internal.PhilipsAirHandler.getConnection(PhilipsAirHandler.java:208) ~[?:?]
at org.openhab.binding.philipsair.internal.PhilipsAirHandler.lambda$0(PhilipsAirHandler.java:193) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
2023-01-08 13:07:09.400 [INFO ] [hilipsair.internal.PhilipsAirHandler] - Exception while updating thing: Empty key
java.lang.IllegalArgumentException: Empty key
at javax.crypto.spec.SecretKeySpec.(SecretKeySpec.java:95) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirCipher.initKey(PhilipsAirCipher.java:76) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirHttpAPIConnection.initCipher(PhilipsAirHttpAPIConnection.java:91) ~[?:?]
at org.openhab.binding.philipsair.internal.connection.PhilipsAirHttpAPIConnection.(PhilipsAirHttpAPIConnection.java:82) ~[?:?]
at org.openhab.binding.philipsair.internal.PhilipsAirHandler.getConnection(PhilipsAirHandler.java:208) ~[?:?]
at org.openhab.binding.philipsair.internal.PhilipsAirHandler.updateThing(PhilipsAirHandler.java:227) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
After initialization, the Things is ‘offline’ in OH.
The AC2889 is located at a different VLAN than my OpenHab Instance.
The airctrl command was issued from the same host as the OpenHab Instancew runs on.