Philips Hue Play HDMI Sync Box custom integration

I would not blame your self, I love all of my hue stuff but there is always something that has a niggle, for example I had to get a seperate hub for my desktop lights because you cant have two zones synced at once via hub even via the pc app. Although its going to make for one interesting article when I get round to it, the best thing I think I have worked out in my 3 to 4 weeks with home assistant is the dirty virtual switch / sensor (basically both) that I can then create a alexa routine with (so if home assistant calls the service alexa gets told command) its opened up so much more for me.

Great component. Works like a charm. I just had some issues discovering the box but it was because I am running home assistant in a container without host network mode. I changed that and set up the box in less than 2 min. After that, I removed host network mode and it keeps working.

Thanks for your work!!

1 Like

Mine also never got detected, but adding the line to my config got them right away ā€“ weird! Thanks a ton for the component and excellent troubleshooting steps :slight_smile:

1 Like

Iā€™m attempting to setup a Call Service to select the entertainment area, but for Entertainment Area, it says, ā€œEntertainment area to select. Must be one of the names available in ā€˜entertainment_area_listā€™ attributeā€. Where can I locate the entertainment_area_list so I can name the entertainment area correctly?

You can find it with the developer tools in HA. Not sure if they show up in other places.

In the menu on the left select ā€œDeveloper Toolsā€ then select the ā€œStateā€ tab (probably selected by default) and then at the top of the Attributes column there is a filterbox. Put ā€œentertainment_areaā€ in there and it should show the syncbox entity with the attributes

Mine looks like this:

entertainment_area_list: Eettafel, Hobbykamer, Music area, Slaapkamer, Woonkamer šŸ“ŗ
entertainment_area: Woonkamer šŸ“ŗ

But the names to use are just as they are shown in the app so you can just use those as a reference.

Could someone actually point me to the documentation on this?

Maybe I am being really blind but I canā€™t seem to find it ? My syncbox was detected without issue and I see the services added, so I think I can pretty much figure it out from thereā€¦ but I had to read through this thread to find the mention of the services. Canā€™t even see any mention of it on the github page.

The syncbox is exposed as a mediaplayer which should be easy to find in the integration screens of HA.

I donā€™t have data on how people use the integration. I guess some people just use the Lovelace mediaplayer card Others might use the standard mediaplayer services. Or if you use the UI to create automations then it exposes most options in the UI dropdowns (e.g. setting sync modes, selecting inputs etcā€¦).

I guess I could extend the readme a bit to include a mention of the services and the mediaplayer entity and how the functions are mapped to the mediaplayer (I thought I had that mapping, but apparently not in the readme)

Is there anything specific you need help with?

Hey there !
The integration is really nice and worked perfectly since today.
I had to factory reset my hue sync box because this is the only way to change the wifi network (why the hell :joy:?)
Now my sync box wonā€™t get detected anymore, even after trying to reinstall the integration into HAā€¦
In the README youā€™re talking about adding huesyncbox: to the configuration.yaml" in case the automatic detection fails, but you donā€™t say anything about what actually is expected inside this config key, could you help me with that ?
Thank you ! :slight_smile:

There is nothing expected in there, which is why it only mentions huesyncbox: :slight_smile:
I donā€™t even know why it works for people :confused:

However DCSBL added support for manual addition from the integrations screen which I merged last week, but I still need to create a release for that. I wanted to combine that with the bridge change service I am working on, but ran into some issues there. So I probably just create a release with the manual addition change later this week.

You can already install the master version manually or through HACS (select redownload on the integration in HACS, tick show beta versions and select the master branch)

1 Like

Thank you for your answer !

Iā€™ve tried the master branch and itā€™s now possible to add manually the sync box ! :rocket:
However, it looks like itā€™s not working because Iā€™ve set up SSL on my home assistant environment : it tries the 443 port instead of 80ā€¦ Here are the logs :

entry_data:
  name: Hue Sync Box
  host: http://192.168.1.151
  port: 443
  path: /api
  reg: None
  devicetype: HSB1
  uid: redacted_1
  token: None

2022-01-26 22:40:50 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 78, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 181, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 137, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 157, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 62, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 252, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/config/custom_components/huesyncbox/config_flow.py", line 56, in async_step_user
    return await self.async_step_check(entry_info)
  File "/config/custom_components/huesyncbox/config_flow.py", line 123, in async_step_check
    if await api.is_registered():
  File "/usr/local/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 109, in is_registered
    await self.request("get", "/registrations")
  File "/usr/local/lib/python3.9/site-packages/aiohuesyncbox/huesyncbox.py", line 216, in request
    raise RequestError(
aiohuesyncbox.errors.RequestError: Error requesting data from http://192.168.1.151: Cannot connect to host http:443 ssl:default [Try again]

Do you think the SyncBox API refuses connection on port 443 ? :confused:
Iā€™ve tried to add the SyncBox on local HA url (http) but it doesnā€™t change anything.

Thank you ! :wink:

The Syncbox only supports secure HTTP connections. Note that this is a connection from the syncbox integration inside Home Assistant to the syncbox and is not related to how you setup access to Home Assistant.

Not sure where the ā€˜http://ā€™ part is coming from, I donā€™t have that in code. Did you type it in the IP address box?

That box should only contain the IP address of the Philips Hue Play HDMI Sync Box (no http://, no ports) you can get the IP address from the Hue Sync App under Settings > Devices > Your Box and then under the Network info heading.

1 Like

Oh, sorry I should have read the Syncbox API doc firstā€¦

Iā€™ve tried without adding the scheme to the IP address first, and it results (nearly) the same :

entry_data:
  name: Hue Sync Box
  host: 192.168.1.151
  port: 443
  path: /api
  reg: None
  devicetype: HSB1
  uid: redacted_1
  token: None

[same trackback as above]

aiohuesyncbox.errors.RequestError: Error requesting data from 192.168.1.151: Cannot connect to host _192.168.1.151:443 ssl:default [Connect call failed ('192.168.1.151', 443)]

But I realized the problem is elsewhere as I canā€™t even ping my device API using cURL :

curl -k -X GET https://192.168.1.151/api/v1/device
curl: (7) Failed to connect to 192.168.1.151 port 443: Network is unreachable

I think I have an issue with my new Wifi setup using Google Wifi routers, It has nothing to do with HA nor the integration.

Thank you for your time ! (and for this great module which I use with automations :rocket::heart_eyes:)

1 Like

I managed to do all I wanted, but I would think it would be a good idea to just mention in the readme something like:

This Integration adds a media player entity plus the following services that can be used to call automations
huesyncbox.set_sync_mode
ā€¦
huesyncbox.set_sync_state
etc

Basically just listing the services would make it a lot easier. Especially if you also included the mapping table that you already made available in the GUI.

Donā€™t get me wrong, as it is all the information is already there, it just took me a few minutes to realize all the information was there once you go to the actual services.

That is indeed a valid point and I extended the README just now with the mapping and mention the services.

For detailed info about the service parameters I am still pointing to the Services tab in Developer tools as that always matches the code (and it is a lot of work to document and keep up-to-date all that info in the README while it is mostly auto generated there)

1 Like

Hi

I am hoping someone can help / answer my question, I am trying to find a way to trigger an automation to turn my lights on / off when I press play / pause on my blue-ray player. Is this possible with the Hue Sync?

Thanks

No, this integration only works with the Philips Hue Play HDMI Sync Box and can only detect/control the status of the box, not of connected devices.

You will need an integration for your blu-ray player.
Take a look at the Integrations section on the Home Assistant website and search for your brand of player. If nothing is there you could search the internet for your brand of player in combination with Home Assistant which might give some results for custom_components created by other Home Assistant users.

I have one question regardin this integration. I have bought the Philips Hue Sync Box and I already have a Conbee II + Deconz and I was already using Hue Sync in my Nvidia Shield with Hue Essentials. Now that Im going to add the hue syn box, do I need an emulated hue bridge or similar or things can still work only with the Deconz?

Thanks in advance

Not sure what you are trying to achieve as I am not sure how Conbee II + Deconz (something with Zigbee it seems) would relate to the Philips Hue Play HDMI Sync Box (as the box does not do Zigbee)

This integration talks with the Philips Hue Play HDMI Sync Box and allows you to select the input, start/stop syncing, select modes (game/music/video) and intensity (maybe a bit more, but that is the gist of it). Basically the box analyses the video signal to figure out the colors for the lights and then sends to the lamps through a Hue Bridge. So you need a Hue Bridge for it to work as far as I know.

Awesome stuff, thank you for this. Iā€™ve got it set up and running nicely

1 Like

Hi All,

Iā€™m very new to Home Assistant and was able to install HACS and the Hue Sync Integration. However, I am unable to see the box as a device. Am I missing something?

Thanks
Anthony