Philips Hue HDMI Sync Box


Philips Hue HDMI Sync Box

This binding integrates the Play HDMI Sync Box into openHAB. The integration happens directly through the Hue HDMI Sync Box API.

:arrow_right: README for setup instructions
:arrow_right: PR #16516 - Hue Play HDMI Sync Box Binding to see full change log


:receipt: Source Code


The binding works with openHAB 4.2.1 and openHAB 4.3.0-Snapshot(s). I consider the binding feature complete; please let me know asap if you miss a vital/core function for your use case (the PR is in the queue for review), or if you find a :bug:. Contributions to the documentation (README) are very welcome, in case you face questions on how to set things up.


2024-20-30: Removed binding from marketplace; as testing phase is completed and the PR is in final the review phase.

5 Likes

Thanks Patrik thanks for your great work.
I installed the version from add-on store in OH4.2 and it is working well!

Today I recognized some new warnings in the log:

2024-07-21 11:32:40.563 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - device status missing ⚠️
2024-07-21 11:32:40.563 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - hdmi status missing ⚠️
2024-07-21 11:32:40.563 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - execution status missing ⚠️
2024-07-21 11:32:50.588 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:32:50.789 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:32:50.996 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:32:50.996 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - device status missing ⚠️
2024-07-21 11:32:50.996 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - hdmi status missing ⚠️
2024-07-21 11:32:50.996 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - execution status missing ⚠️
2024-07-21 11:33:01.022 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:33:01.225 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:33:01.426 [ERROR] [nternal.connection.HueSyncConnection] - javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
2024-07-21 11:33:01.426 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - device status missing ⚠️
2024-07-21 11:33:01.426 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - hdmi status missing ��️
2024-07-21 11:33:01.426 [WARN ] [sync.internal.handler.HueSyncHandler] - ⚠️ Device information - execution status missing ⚠️

After I disabled the thing and enabled it again all errors&warnings were gone. :white_check_mark:
Is this something serious?

best, Kai

I’ve added this warning in case the device reports incomplete data - I’ve seen this only during start up - but not in regular operation yet … it might be related to the problem in the SSL layer - here I use OH/Karaf/Jetty infrastructure - I’ll keep an eye on this; let me know if you see any warnings during normal operation. After an update of a binding in development it is sometimes difficult to predict what will happen.

There is also an update available that should support to switch the input source - useful in my case, as HDMI ARC/CEC sometimes interfere with some automation code (I had to switch this off for some input devices and switch manually via rule …).

I recommend to use DEBUG or TRACE log level in case you experience warnings again or problems with the update to the latest 4.3.0 snapshot.

thank you for the feedback.

with kind regards,
Patrik

Hello Patrik,

first of all many thanks for creating this binding!

I would like to report an issue with the thing registration-/ startup-process. I load the configuration of the hue sync box via a .things file, in which I configured all required parameters as well as the registrationId and apiAccessToken. After the thing file is loaded by the ModelRepository I can see the following logs:

time,level,source,data
"12:12:52.992","INFO","org.openhab.core.model.core.internal.ModelRepositoryImpl","Loading model 'Hue.things'"
"12:12:53.480","INFO","openhab.event.ThingStatusInfoChangedEvent","Thing 'huesync:box:LivingRoom' changed from UNINITIALIZED to INITIALIZING"
"12:12:53.485","INFO","openhab.event.ThingStatusInfoChangedEvent","Thing 'huesync:box:LivingRoom' changed from INITIALIZING to UNKNOWN"
"12:12:53.486","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","Stopping 0 task(s): "
"12:12:53.488","INFO","openhab.event.ThingStatusInfoChangedEvent","Thing 'huesync:box:LivingRoom' changed from UNKNOWN to OFFLINE (CONFIGURATION_PENDING): Device registration pending. Please press the HDMI Sync Box device button for 3 seconds."
"12:12:53.518","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","Stopping 0 task(s): "
"12:12:53.520","DEBUG","org.openhab.binding.huesync.internal.connection.HueSyncDeviceConnection","Connection configuration update for device 192.168.2.190:443 - Registration Id [2]"
"12:12:53.521","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","startTasks - [Update]"
"12:12:53.527","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","Starting task [Update]"
"12:12:53.528","DEBUG","org.openhab.binding.huesync.internal.handler.tasks.HueSyncUpdateTask","Status update query for Sync Box HSB2:C42996E068CC"
"12:12:53.531","INFO","openhab.event.ThingStatusInfoChangedEvent","Thing 'huesync:box:LivingRoom' changed from OFFLINE (CONFIGURATION_PENDING): Device registration pending. Please press the HDMI Sync Box device button for 3 seconds. to ONLINE"
"12:12:53.715","DEBUG","org.openhab.binding.huesync.internal.handler.tasks.HueSyncUpdateTask","Value must be between 0 and 100"
"12:12:53.716","INFO","openhab.event.ItemStateChangedEvent","Item 'HuesyncMode' changed from powersave to passthrough"
"12:12:53.719","INFO","openhab.event.ItemStateChangedEvent","Item 'HuesyncHdmiActive' changed from OFF to ON"
"12:12:53.722","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","Stopping 1 task(s): Update"
"12:12:53.724","DEBUG","org.openhab.binding.huesync.internal.connection.HueSyncDeviceConnection","Connection configuration update for device 192.168.2.190:443 - Registration Id []"
"12:12:53.725","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","startTasks - [Registration]"
"12:12:53.725","INFO","openhab.event.ThingStatusInfoChangedEvent","Thing 'huesync:box:LivingRoom' changed from ONLINE to OFFLINE (CONFIGURATION_PENDING): Device registration pending. Please press the HDMI Sync Box device button for 3 seconds."
"12:12:53.727","DEBUG","org.openhab.binding.huesync.internal.handler.HueSyncHandler","Starting task [Registration]"
"12:12:56.729","DEBUG","org.openhab.binding.huesync.internal.handler.tasks.HueSyncRegistrationTask","Listening for device registration - Sync Box HSB2:C42996E068CC"
"12:12:56.746","DEBUG","org.openhab.binding.huesync.internal.connection.HueSyncConnection","registration in progress: no token received yet"
"12:12:57.747","DEBUG","org.openhab.binding.huesync.internal.handler.tasks.HueSyncRegistrationTask","Listening for device registration - Sync Box HSB2:C42996E068CC"
"12:12:57.760","DEBUG","org.openhab.binding.huesync.internal.connection.HueSyncConnection","registration in progress: no token received yet"

for me it looks like the thing loads the correct parameters from the .things file, connects successfully to the sync box and reads the first set of item states, but then some process overrides the loaded parameters with empty parameters and triggers the registration process again.

Let me know if you need additional information or if I should create an issue for that.

Kind regards,

Sebastian

Hi Sebastian,

the following line did catch my eye in the log:

Can you check if the respective value is set and in the expected range? As I do not use textual configuration it might even be a mistake in the README of the binding. If it looks ok to you, please post the configuration without token - then I’ll give it a try on my test instance. Also enable TRACE for the binding and post the info - it might give me some more insight what is going on.

As a temporary workaround you can try to add the thing via UI (using the advanced options) to enter the id and token you already have.

If it works - be aware that HDMI/CEC (called Anynet+ on some Samsung devices) can interfere with your rules (as the devices try to be clever …). It took me some time to figure you where to enable, or disable those options to be able to use the remote control without side effects I did not expect in the rules.

with kind regards,
Patrik

Hello Patrik,

thank you very much for the quick response and also for pointing out the suspicious log line. Because I only use the following 5 items of the binding:

//Commands
String    HuesyncMode         "Mode"          <switch> {channel="huesync:box:LivingRoom:device-commands#mode"}
Switch    HuesyncActive       "Sync active"   <switch> {channel="huesync:box:LivingRoom:device-commands#sync-active"}
Switch    HuesyncHdmiActive   "HDMI active"   <switch> {channel="huesync:box:LivingRoom:device-commands#hdmi-active"}
String    HuesyncHdmiSource   "HDMI Source"   <player> {channel="huesync:box:LivingRoom:device-commands#hdmi-source"}
Dimmer    HuesyncBrightness   "Brightness"    <slider> {channel="huesync:box:LivingRoom:device-commands#brightness"}

I just removed the HuesyncBrightness-Dimmer item from the .items file and now the binding is able to connect to the hue sync box and also stays connected to it.

I suspect that the state of the Dimmer item might be uninitialized at first and might therefore be out of range? For me removing the dimmer items solves my problem because I do not really need it, but it could be an issue for others…

I also noticed that there is likely a typo in the readme of the sitemap example because the corresponding slider that is connected to the brightness item has a max value of 200

Slider item=huesync_brightness minValue=0 maxValue=200 step=10

Thanks again for your quick response.

Kind regards,

Sebastian

Hello Sebastian,

I just removed the HuesyncBrightness-Dimmer item from the .items file and now the binding is able to connect to the hue sync box and also stays connected to it.

:+1: - could you create an issue report in the bug tracker including the configuration that did create problems - so that I remember to check and fix this for a next release.

The range in the README is a un-intuitive; but matches the API definition:

image

with kind regards,
Patrik

Here is my report: [huesync] Dimmer item connected to brightness breaks binding. · Issue #18096 · openhab/openhab-addons · GitHub.

Kind regards,

Sebastian

I experienced that the item for the brightness should not be of “Dimmer” as the example suggests. but instead “Number:Dimensionless”, which is what the GUI itself states, as well as the textual documentation. Using type “Dimmer” seems to cause the boxes registration to get deleted, and any attempt of re-registration to fail.