Philips Air Binding [3.0.0.0;4.0.0.0)

image

Binding to support the integration with Philips Air Purifiers including the models based on COAP communication protocol (most >2019 models)

Note may require to (manually) install coap and upnp transport

feature:install openhab-transport-coap
feature:install openhab-transport-upnp

Changelog

2021-11-04 Initial market place version.

2022-12-15 Minor update

Note:
Philips Air Binding is developed by Michał Boroński
(GitHub - michalboronski/openhab-addons: Add-ons for openHAB 2.x
Coap protocol support (this version) contributed by [Marcel Verpaalen] (Profile - marcel_verpaalen - openHAB Community)
Discussion topic in this forum: Binding request: Philips air purifier

Resources

https://verpaalen.com/openhab2/org.openhab.binding.philipsair-3.4.0-SNAPSHOT.kar

@marcel_verpaalen Why not directly building a KAR file ? It will then install coap and upnp if necessary.

… maybe cuz I didi not know that would do the trick… and don’t know how to make a .kar file…
Hint?

HeHe, quite simple :

mvn clean install karaf:kar
1 Like

Hello guys,
I am happy new owner of Philips 3000i series. I have connected through the addon and CoAP.
I am looking for a documentation how to switch between different modes.
Should I simply rewrite Mode channel from AG to something different?

Thank you,
otherwise much better comparing to Xiamoi Air Purifier 2S!

Yes indeed that’s the way, these are the values for some of the models:

				<option value="P">Auto</option>
				<option value="A">Allergen</option>
				<option value="S">Sleep</option>
				<option value="M">Manual</option>
				<option value="B">Bacteria</option>
				<option value="N">Night</option>
			</options>
1 Like

I found mine are:
AG-Auto, S-Sleep, T-Turbo, M-Medium(1), M-Medium(2)

Hi,

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.

airctrl --ipaddr 192.168.51.21 --protocol coap
[type] Type: AC2889
[modelid] ModelId: AC2889/10

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.

Any ideas?

Best,

– Jaap

Works for me with AC2939/10 and OpenHAB 3.4.1 using COAP protocol. As soon as OpenHAB and the air purifier were located in the same network it was automatically discovered and shown in the Things Inbox. Thanks for contributing this addon!

Sorry for the question, but how do I install the Coap and upnp parts for the add-on on a raspi 4

The 2 commands are in the first post. Enter them in the openhab console.
This is only needed when the binding does not load well. (e.g. if you don’t see any possibility to add a Philips air thing)

Thank you very much, works quit well

Hello,
when I install the binding in OH 3.4.2 I get the following error message:

java.lang.RuntimeException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.4.0-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:3.4.0-SNAPSHOT] : mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/3.4.0-SNAPSHOT/xml/features

Who can help me with this problem ?

Greetings
Dietmar

Hi,

Thanx for this add-on.
I saw in the channel-groups.xml that there are also channels for temp and humidity.
I tired adding them via a items file, but they don’t seem to get retrieved (Stay NULL)

Number           PhilipsAirPurifierAC382910Humidity  "Humidity"          <airpurifier> {channel="philipsair:coap:dc4a03f40a0911ea88b90abe45ce2be6:sensors-adv#rh"}
Number           PhilipsAirPurifierAC382910Temp      "Temp"              <airpurifier>  {channel="philipsair:coap:dc4a03f40a0911ea88b90abe45ce2be6:sensors-adv#temp"}

Is it possible to get these readings?

Hi there and thanks for the binding!

Reading work fine, but changing modes shows problems

  • When I change the mode via the item in the admin section of openHab web interface the mode on the device is changes but the new Mode in openHab is shown as NULL
  • When I change the mode via a rule with e.g. itemName.postUpdate(“S”) nothing at all happens

Am I doing something wrong?

thanks for any hint
Thomas

I suspect your device is using additional / different codes see also post of @misko903 who has slightly different values.

@misko903 you indicate M-Medium(1), M-Medium(2) (both M), is there some other value that differs from medium 1 and medium 2? (or is there 1 medium only?)
Does your model support manual or not at all?

@marcel_verpaalen & @misko903

It was much easier :slight_smile:
The device simply does not react to postUpdate(), when I use sendCommand() it works!

What about this list in the interface, can I edit this somewhere? My AC2729 does not have all these options. And it seems the problem with the interface occours when I click on a non-existing one - so I would like to remove them…
image

thanks
Thomas

I’m not sure you can easily change that. For the old basicUI you can define the mapping, but i’m nt sure if that is still possible with the newUI.
You can obviously recompile the binding and change the options, but that is somewhat inconvienient way of solving the matter.

1 Like

Is there a schedule about when this binding will be available for OH 4?

Good evening,
my two 1214 are found but stay offline when I add them as a thing. IP address and Device ID are configures but the key field is empty.

Any hints?
br Leo