Philips TV (2016+) Binding

Hi,

I just continued working on this binding and ambilight is going to be the next feature. I’ve already successfully implemented the feature to switch ambilight styles (follow video etc.). So stay tuned.

BR

Is this still happening? I’m actually working over the binding to fit the current requirements of official bindings, since I want it to be added to the official bindings some day. That’s why I also refactored the connection management, which should hopefully fix the bug of yours. So please stay patient, I will release a new version ASAP.

Thanks for the great work on the binding. I use it on a dialy basis and it works great for my 50PUS7373

New version release, including enchanced Ambilight Control and TvPicture Settings. See the initial post for more information.

Since this release also covers the matching of the current openhab binding model, please report any problems during installation or usage.

BTW: I’m using the Alexa Binding to control the tv with this binding via voice, works like a charm.

@Frozenfranz happy to hear that, I hope you enjoy also the new features!
@Mihai_Badea after 5 months I was finally able to add the Ambilight stuff. Hope things work fine on your side.
@marcin_Emiks now you can control the ambilight colors.
@Sascha_ your exception in the log should be fixed by now.

Hi,

Thanks for the binding, unfortunately i’m not able tot install it. First, i had to install the Jackson requirements, and after I did, i got another unresolved requirement error. I need tot install org.apache.http, but i can’t find it.
Could someone Point me in the right direction please?

Thanks in advance

Hey,

thanks for the feedback. If this happens to more people I might add the dependencies to the installation directly for now.

Regarding your problem, it should be solved by:
bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpclient-osgi/4.5.2/httpclient-osgi-4.5.2.jar
and
bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.9/httpcore-osgi-4.4.9.jar

EDIT: The link in the initial post to the binding is now updated with a version, which comes packaged with the dependencies.

@bennYx0x I think that would solve a lot of issues and you control the versioning of the dependencies.

If you can, just add all required dependencies and it will work out of the box.

Yep, I’ve changed it now. Actually the dependencies should resolve automatically, but well, for now it’s just fine.

I also had to install jackson-annotations-2.4.5.jar and ehcache-2.9.1.jar but still depedency error

openhab> bundle:start 235
Error executing command: Error executing command on bundles:
        Error starting bundle 235: Could not resolve module: org.openhab.binding.philipstv [235]
  Unresolved requirement: Import-Package: net.spy.memcached
openhab> bundle:install http://central.maven.org/maven2/net/spy/spymemcached/2.11.7/spymemcached-2.11.7.jar
Bundle IDs:
Error executing command: Error installing bundles:
        Unable to install bundle http://central.maven.org/maven2/net/spy/spymemcached/2.11.7/spymemcached-2.11.7.jar: org.osgi.framework.BundleException: OSGi R3 bundle not supported
openhab> bundle:install http://central.maven.org/maven2/net/spy/spymemcached/2.10.6/spymemcached-2.10.6.jar
Bundle IDs:
Error executing command: Error installing bundles:
        Unable to install bundle http://central.maven.org/maven2/net/spy/spymemcached/2.10.6/spymemcached-2.10.6.jar: org.osgi.framework.BundleException: OSGi R3 bundle not supported
openhab> bundle:install http://central.maven.org/maven2/net/spy/spymemcached/2.9.1/spymemcached-2.9.1.jar
Bundle IDs:
Error executing command: Error installing bundles:
        Unable to install bundle http://central.maven.org/maven2/net/spy/spymemcached/2.9.1/spymemcached-2.9.1.jar: org.osgi.framework.BundleException: OSGi R3 bundle not supported
openhab> bundle:install http://central.maven.org/maven2/net/spy/spymemcached/2.9.0/spymemcached-2.9.0.jar
Bundle IDs:
Error executing command: Error installing bundles:
        Unable to install bundle http://central.maven.org/maven2/net/spy/spymemcached/2.9.0/spymemcached-2.9.0.jar: org.osgi.framework.BundleException: OSGi R3 bundle not supported

I just reverted the added dependencies, didn’t work the way I wanted to. As soon as I find the time, I’ll have a deeper look into this.

Regarding your problem:
If you download the version from the initial post again and use the following commands, it should work:
bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.9/httpcore-osgi-4.4.9.jar

bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpclient-osgi/4.5.2/httpclient-osgi-4.5.2.jar

Hi @bennYx0x, I tried to install these bundles before I wrote the post, but it doesn’t work

openhab> bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.9/httpcore-osgi-4.4.9.jar
Bundle ID: 239
openhab> bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpclient-osgi/4.5.2/httpclient-osgi-4.5.2.jar
Bundle ID: 238
openhab> bundle:start 239
openhab> bundle:start 238
openhab> bundle:start 247
Error executing command: Error executing command on bundles:
        Error starting bundle 247: Could not resolve module: org.openhab.binding.philipstv [247]
  Unresolved requirement: Import-Package: net.spy.memcached


236 │ Active    │  80 │ 2.4.5                  │ jackson-databind
237 │ Active    │  80 │ 2.4.5                  │ Jackson-core
238 │ Active    │  80 │ 4.5.2                  │ Apache Apache HttpClient OSGi bundle
239 │ Active    │  80 │ 4.4.9                  │ Apache Apache HttpCore OSGi bundle
240 │ Active    │  80 │ 2.4.5                  │ Jackson-annotations
241 │ Active    │  80 │ 2.9.1                  │ ehcache
247 │ Installed │  80 │ 2.5.0.201909300912     │ openHAB Add-ons :: Bundles :: philipstv Binding

I will try to uninstall it all and start again

EDIT:

openhab> feature:install esh-io-transport-upnp
openhab> bundle:install http://central.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/2.4.5/jackson-databind-2.4.5.jar
Bundle ID: 251
openhab> bundle:install http://central.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.4.5/jackson-core-2.4.5.jar
Bundle ID: 252
openhab> bundle:install http://central.maven.org/maven2/com/fasterxml/jackson/core/jackson-annotations/2.4.5/jackson-annotations-2.4.5.jar
Bundle ID: 253
openhab> bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpclient-osgi/4.5.2/httpclient-osgi-4.5.2.jar
Bundle ID: 254
openhab> bundle:install http://central.maven.org/maven2/org/apache/httpcomponents/httpcore-osgi/4.4.9/httpcore-osgi-4.4.9.jar
Bundle ID: 255
openhab> bundle:install https://github.com/mebe1012/openhab2-bindings/raw/philipstv/bundles/org.openhab.binding.philipstv/release/org.openhab.binding.philipstv-2.5.0-SNAPSHOT.jar
Bundle ID: 256
openhab> bundle:start 251 252 253 254 255 256
openhab> bundle:list
....
251 │ Active   │  80 │ 2.4.5                  │ jackson-databind
252 │ Active   │  80 │ 2.4.5                  │ Jackson-core
253 │ Active   │  80 │ 2.4.5                  │ Jackson-annotations
254 │ Active   │  80 │ 4.5.2                  │ Apache Apache HttpClient OSGi bundle
255 │ Active   │  80 │ 4.4.9                  │ Apache Apache HttpCore OSGi bundle
256 │ Active   │  80 │ 2.5.0.201909302019     │ openHAB Add-ons :: Bundles :: philipstv Binding

everything works, thank you for a great binding

Great to hear, thanks for the feedback!

Updated also the linked release download - the dependencies are now coming bundled, no need for manual installation anymore.

Good job, but I have a problems with your binding…
Even if I download jar from link from first post, still have this error:

2019-03-31 23:07:19.161 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.philipstv-2.5.0-SNAPSHOT.jar

And when I try to use karaf console and type

feature:install esh-io-transport-upnp

I got:

Error executing command: No matching features for org.eclipse.smarthome.io.transport.upnp/0.0.0

Any idea why?

Thanks for your feedback!
Could you post the logs AFTER the statement Error while starting bundle: ? Because afterwards it should actually state what exactly is missing to start the bundle.
If its UPNP, it would be definitely installed by openhab if you install the sonos binding as stated here: Installing a binding.jar file

Installing Sonos binding helped. Thanks!!!

Hi. The binding works fine (and thanks for it!). However, I have the same issue as reported by someone else: when added through PaperUI/Auto discover, the username/password found during paring won’t be saved and restored when OpenHab is restarted. Manually restoring the username/password in PaperUI or, much better, adding a good old .things file in openhab configuration with all the relevant data solves the issue.

OpenHab 2.4.0.M4
TV: Philips 803 55"
Philips TV binding 2.5.0.201910011951
JVM: Zulu 8
OS: debian buster amd64

Thank you very much for the binding. Tested it on a 55PUS7502/12 and it works.

Is there a possibility to switch the ambilight on and off while the TV is turned off? For example like the funtionality on the original Philips remote when you press the ambilight button while the TV is turned off. I’d like to use the ambilight as a lamp.

Thanks for the feedback! I will try to look again into this as soon as I find the time. Future users shouldn’t be bothered with thing files :slight_smile:

@bsarmin I think it’s possible to switch the ambilight lounge mode on while the TV is running, but that’s not yet implemented. But that won’t work out of the box if the tv is off, since the network card turns idle after a while. I guess setting up a rule with a mix of wake on lan + sending the command for the ambilight lounge mode would work.
Shouldn’t be that much work with the ambilight lounge mode, I’ll have a look in the near future.

EDIT: @bsarmin Ambilight Lounge Mode is added as a new feature, give it a try and feedback is appreciated.

BR

Hi, trying to install your binding, but getting this error :

Error while starting bundle: file:/openhab/addons/org.openhab.binding.philipstv-2.5.0-SNAPSHOT(1).jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.philipstv [216]
Unresolved requirement: Import-Package: org.apache.commons.codec.binary; version="[1.6.0,2.0.0)"

can somebody help? Is there still a dependency missing in the latest jar? 2.5 ?

Hey Jacky,

re-download the binding, you shouldn’t get the error anymore.