Philips Air Binding [4.0.0.0;5.0.0.0)

Philips Air Binding
logo

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

2023-09-24 Version bump oh4 - Minor update

Notes:

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
Market place topic for 3.x version: Philips Air Binding [3.0.0.0;4.0.0.0)
Alternative installation jar (you must manually install coap and upnp transport): https://verpaalen.com/openhab/org.openhab.binding.philipsair-4.0.4-SNAPSHOT.jar

Resources

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

1 Like

Tried to instal, the binding on OH 4.1.0 but it fails with:

[WARN ] [internal.service.FeaturesServiceImpl] - Can't load features repository mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/4.0.4-SNAPSHOT/xml/features
java.lang.RuntimeException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT in openhab (https://openhab.jfrog.io/openhab/libs-release/)] : mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/4.0.4-SNAPSHOT/xml/features
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:121) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) ~[?:?]
	at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) ~[?:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:175) ~[?:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:126) ~[?:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:100) ~[?:?]
	at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:92) ~[?:?]
	at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.installFromCache(CommunityKarafAddonHandler.java:167) ~[?:?]
	at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.install(CommunityKarafAddonHandler.java:114) ~[?:?]
	at org.openhab.core.addon.marketplace.AbstractRemoteAddonService.install(AbstractRemoteAddonService.java:189) ~[?:?]
	at org.openhab.core.io.rest.core.internal.addons.AddonResource.lambda$1(AddonResource.java:261) ~[?:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
	at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.io.IOException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT: [Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT in openhab (https://openhab.jfrog.io/openhab/libs-release/)]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.configureIOException(AetherBasedResolver.java:803) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:774) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
	at java.net.URL.openStream(URL.java:1161) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]
	... 18 more
	Suppressed: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT in openhab (https://openhab.jfrog.io/openhab/libs-release/)
		at shaded.org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:48) ~[?:?]
		at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:401) ~[?:?]
		at shaded.org.eclipse.aether.util.concurrency.RunnableErrorForwarder.lambda$wrap$0(RunnableErrorForwarder.java:73) ~[?:?]
		at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector$DirectExecutor.execute(BasicRepositoryConnector.java:669) ~[?:?]
		at shaded.org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:290) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:520) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:408) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:235) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:212) ~[?:?]
		at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:272) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
		at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
		at java.net.URL.openStream(URL.java:1161) ~[?:?]
		at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]
		at org.apache.karaf.features.internal.service.RepositoryImpl.<init>(RepositoryImpl.java:51) ~[?:?]
		at org.apache.karaf.features.internal.service.RepositoryCacheImpl.create(RepositoryCacheImpl.java:51) ~[?:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getFeatureCache(FeaturesServiceImpl.java:611) ~[?:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.ensureCacheLoaded(FeaturesServiceImpl.java:582) ~[?:?]
		at org.apache.karaf.features.internal.service.FeaturesServiceImpl.getRepository(FeaturesServiceImpl.java:530) ~[?:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.findMissingDependency(KarServiceImpl.java:175) ~[?:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:126) ~[?:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:100) ~[?:?]
		at org.apache.karaf.kar.internal.KarServiceImpl.install(KarServiceImpl.java:92) ~[?:?]
		at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.installFromCache(CommunityKarafAddonHandler.java:167) ~[?:?]
		at org.openhab.core.addon.marketplace.karaf.internal.community.CommunityKarafAddonHandler.install(CommunityKarafAddonHandler.java:114) ~[?:?]
		at org.openhab.core.addon.marketplace.AbstractRemoteAddonService.install(AbstractRemoteAddonService.java:189) ~[?:?]
		at org.openhab.core.io.rest.core.internal.addons.AddonResource.lambda$1(AddonResource.java:261) ~[?:?]
		at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]
		at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]
		at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Error resolving artifact org.openhab.core.features.karaf:org.openhab.core.features.karaf.openhab-core:xml:features:4.0.4-SNAPSHOT
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:431) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:235) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:212) ~[?:?]
	at shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:272) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:767) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:657) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:598) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:565) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:555) ~[?:?]
	at org.ops4j.pax.url.mvn.internal.Connection.getInputStream(Connection.java:123) ~[?:?]
	at java.net.URL.openStream(URL.java:1161) ~[?:?]
	at org.apache.karaf.features.internal.service.RepositoryImpl.load(RepositoryImpl.java:114) ~[?:?]
	... 18 more

I did install the additional features, btw. Looks like it references some 4.0.4.-SNAPSHOT artefacts.

+1 on that.
Had the same problems when I tried to install the binding.

When I’m back next week from travelling I’ll try to compile a 4.1 version. Don’t know what causes the incompatibility

1 Like

Much appreciated! Looking forward to the new release :slight_smile:

I have a beta version available here
https://verpaalen.com/openhab/org.openhab.binding.philipsair-4.2.0-SNAPSHOT.jar

edit 29-1-2024. Also added kar file, which eliminates the need for manual feature install of coap&upnp
https://verpaalen.com/openhab/org.openhab.binding.philipsair-4.2.0-SNAPSHOT.kar

I have it working for week now. This should also impove the connectivity issues.
It is still having more debug output… once i test some more I’ll remove it and make a real release.

Thanks for sharing!

Get an error thou after putting it into the addons folder:

2024-01-27 15:56:10.424 [WARN ] [org.apache.felix.fileinstall        ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.philipsair-4.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.philipsair [275]
  Unresolved requirement: Import-Package: org.eclipse.californium.core; version="[2.7.0,3.0.0)"
	at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.18.0.jar:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

I think this is due to missing the features. Add them with

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

Hi Marcel,
just installed the missing features. But now there isn’t even a log-entry that the binding has or has not been added. I also don’t see anything new in the Things-Add-Menu.
I restarted openhab after installing the features in karaf, but nothing changed.
Also deleting the file from the addons folder and putting it in again hasn’t changed anything.

I tried to capture the Install-Process in Karaf with log set to debug for everything… If this might help…

yes, pls do. I saw your

which is due to missing the openhab-transport-coap hence the suggestion

Hi Marcel,
thanks for the add-on, is this the command for SSH console, or where should I write the commands?

Thanks,
Michal

yes, in ssh / karaf console

Thanks, I am asking just because it does not work in my case

openhabian@openHABianDevice:~ $ feature:install openhab-transport-coap
-bash: feature:install: command not found

You are running it in your bash console, when you should apply it in the OH console, the one accessible via ssh to localhost: The Console | openHAB

1 Like

thanks, probably my first time using karaf console :slight_smile: after almost 5 years on OH

I also compiled a .kar version which should not need the manual steps for installing the features.
find it here (you can drop it in the addons folder similar to the .jar files)

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

Alternatively use the jar file and install the features for coap and upnp (see first post)
https://verpaalen.com/openhab/org.openhab.binding.philipsair-4.2.0-SNAPSHOT.jar

As said… still version with more debug logging than earlier versions, but hopefully better to keep connection to the devices.

Created separate topic for the new version, so it can be installed directly from openhab.

Hi Marcel,

I am using the AC2889/10 devices and executing settings changes, turning on/off work very well. Thank you very much for taking care of that! Unfortunately status updates still seem to be a problem: The device is always shown as offline and all status data is not transfered to openhab.
Is there anything that I can help to resolve this issue? Did I do something wrong while configuring?

Thank you very much again!

Erik

Installed the Binding from the Marketplace, now I’m seeing the Bionding and my Purifier is discoverd.
I can’t get it online thou. In the Binding there is a Field “Key” (Air Purifier device token for communication) that has been filled automatically. Where do I get this Token from? I sometimes see a Token in the coap-communication log. but everytime this Token is different…

Update: The Purifier came online after waiting a little while. does this mean, I don’t need the Token to set it up?

I think the token is needed for the http based devices. I don’t know, I don’t have such a device and it was there from Michaels development.

What I know is that it is not needed for the coap ones.