Philips Hue Play HDMI sync

Thank you Unsigus
This is the rest command giving the error:

  syncbox_startsync:
    url: 'https://10.25.20.156/api/v1/execution'
    method: PUT
    verify_ssl: false
    payload: '{"syncActive":"video"}'
    headers:
      Authorization: "Bearer MY TOKEN HERE"

Other commands like the following work:

  syncbox_passthrough:
    url: https://10.25.20.156/api/v1/execution
    method: PUT
    headers:
      Authorization: "Bearer SAME TOKEN HERE"
    payload: '{"mode":"passthrough"}'
    content_type:  'application/json; charset=utf-8'
    verify_ssl: false

I see, I have made an error in my config example. “syncActive” expects a boolean (true or false), not “Video”. So change your payload to:
"{syncActive": true}"
'{"syncActive": true}'

Also: I highly recommend to create a developer account at https://developers.meethue.com/. It’s free and all the information you need is there!

Edit: Fix typo in payload

1 Like

Unfortunately I get the same error. I’ll try with https://developers.meethue.com/

Thank you for your help.

Sorry, made a typo in the payload…
'{"syncActive": true}' will do.

Just tested it, this must work.

1 Like

GREAT!!! Thank you

1 Like

Hi everyone,

This post was very insightful. I have created a custom component that allows to control most features and also provides information from the device. You can see it on GitHub and on the Community post.

1 Like

Awesome, will definitely look into that!

giphy

1 Like

Hmm, I just finished cleaning up my custom component for the syncbox I have been using/building for a while and put it up on Github, but I now see that @nitobuendia also made one.

I guess (judging from the readme) functionality is similar although I started off from a media_player instead of remote since that supports on/off, input switching and play/stop which seemed to map to most functionality of the syncbox and it gave me a UI for free (mediaplayer card) which was nice.

Another difference seems to be that my integration (only) supports autodiscovery.

For reference: https://github.com/mvdwetering/huesyncbox

Not sure what to do with it now :confused:

2 Likes

I considered the same one too, but technically you do not have any content playing. None is perfect, but I may change it too. It might be a better fit.

That’s a pity, though :frowning:

By the way, this question is not for me, but I wanted to address it too!

My personal view:
Keep it :slight_smile: There’s no harm in having a duplicate component.

Additionally, yours supports config_flow which I do not intend because of the decision of deprecating YAML. Adding HACS support will also make it more popular. More options is always best.

If despite all this, you still think it’s redundant, you are welcomed to merge the code. I have been thinking of it and I do think that media_player could be a better fit as more services are common and it interacts with HDMI.

Great work!

Main reason for not knowing what to do with it was that announcing another integration 2 days after yours felt a bit weird.

But I am going to continue on it as I wanted to use it as a learning project on how to write up a full HA integration with the end goal of getting it merged into HA which it seems you are not aiming for.

No, I do not intend to. It was the original plan, though. Then I learnt about the drop of support for YAML and changed my plans :slight_smile: All yours to contribute! It is a great idea and many of us would appreciate it (especially if it came with YAML support, but that won’t be possible).

The HDMI sync box isnt even in New Zealand yet, and im keen to get it.

Im tinkering with Home assistant now, while my house is being built.

My main question is, do we need a hue hub for the lights to be paired with, or can they be paired directly via ZHA on a conbee 2 or similar instead?

The Hue sync box uses “Hue Entertainment”:

Hue Entertainment is an upgrade to the Hue system which makes it possible to play fast, synchronous light effects on Hue lights, e,g. to be able to synchronize it with games, movies and music. - "Philips Hue Api documen*

It’s a layer added on top of Zigbee. I think the Hue bridge does some magic that requires you to use the Hue Bridge V2 as hub, so I don’t think you can use any other Zigbee hub while still using the sync box.

@mveldman I just installed your component. :clap:

The only trouble I had was that I could not restart HA using the restart option inside HA. I had to restart the docker in order for this to work. But, it was completely flawless after that. I like the creative use of the media player card! :slight_smile:

I know your instructions say that it doesn’t work the first time, but you may want to add that you might not be able to use the restart inside HA because of the issue. Thanks for the component!

PLEASE DISREGARD
There was a typo

Hello everybody.

I had to factory reset my Sync Box and now HA does not connect anymore.

I got the token from the box by pressing the pairing button while the PY script is running (it is the same I used to have in my previous config) but every time HA send a rest command I get Error. Status Code 401.

Any idea???
Thank you

@Michel I use your component and it works well, but not too long ago, the huesyncbox services have disappeared and won’t come back. Boxes still work under the media_player domain and show connected… any ideas? :thinking:

I did add another service a couple of days ago, but that should be fine. I see the services on both my dev and production HA so it is not totally broken.

Since you mention “boxes” I assume you have more than one, so maybe there is the problem. I have some logic to make sure the services are only registered once, maybe that is not working properly?
I can’t really test it because I only have one box.

BTW what version of the custom integration are you using?

Gotcha. I have two boxes. Both worked fine before.

Updated to the latest this morning (1.6).

Thanks.

@ItsRhen I changed the logic for registering the services a bit in v1.7 which might fix it (or not)
I also added a bit of debug logging so in case it is not working please enable logging for the custom component in configuration.yaml and send me the output.

logger:
  logs:
    custom_components.huesyncbox: debug