Homebridge-hue: Hue Sync Box support?

Created on 30 Oct 2019  路  9Comments  路  Source: ebaauw/homebridge-hue

Hue Sync Box (new HDMI) support:

  1. Power Toggle the Sync Box
  2. Switch to turn on and off (Start/Stop) light Syncing.

The basic function fro the iOS Hue Sync.app would be great.
I think Hue will be slow to develop Home.app integration for the HDMI Sync Box unfortunately. The two functions mention above are much needed as controllable switches in HomeKit.

Do you think you can add that to your plugin?

question

Most helpful comment

Here is the complete API doc :

_Authentication :_
The authenticated API calls requires a JWT token. The JWT token is obtained in the registration step. The accessToken received must then be passed to authenticated calls as an HTTP header :
Authorization: Bearer <accessToken_here>

Operation | Method | URL | Content-type | Auth ? | Data | Response
-- | -- | -- | -- | -- | -- | --
Basic device info | GET | /api/v1/device | 聽 | no | 聽 | 聽
Registration | POST | /api/v1/registrations | application/json; charset=utf-8 | no | { 聽聽聽 "appName": "Your_App_Name_Here", 聽聽聽 "appSecret": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=", 聽聽聽 "instanceName": "Your_Client_Device_Name_Here" } | Response will contain the accessToken in the returned JSON object (after physical button press for 2 secs). I found it was maybe mandatory to make a first request, then press then button, then a 2nd request.
Get current state | GET | /api/v1 | application/json; charset=utf-8 | yes | 聽 | 聽
Change mode | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | { "mode": "MODE" } MODE = passthrough \| powersave \| video \| music \| game | 聽
Change brightness | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | {聽 "brightness": VAL } VAL =聽 0 -> 200 | 聽
Change intensity | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | { "MODE": { "intensity": "INTENSITY" } } MODE = video \| music \| game INTENSITY = subtle \| moderate \| high \| intense | 聽
Check firmware update available | PUT | /api/v1/device | application/json; charset=utf-8 | yes | { "action": "checkForFirmwareUpdates" } | No response, need to query device state later on
Set firmware autoupdate | PUT | /api/v1/device | application/json; charset=utf-8 | yes | { 聽聽聽 "update": { 聽聽聽聽聽聽聽 "autoUpdateEnabled": true, 聽聽聽聽聽聽聽 "autoUpdateTime": 2 聽聽聽 } } | 聽
Register Hue Bridge | PUT | /api/v1/hue | application/json; charset=utf-8 | yes | { 聽聽聽 "bridgeIpAddress": "YOUR_BRIDGE_IP", 聽聽聽 "bridgeUniqueId": "YOUR_BRIDGE_UNIQUE_ID", 聽聽聽 "clientKey": "BRIDGE_CLIENT_KEY", 聽聽聽 "username": "BRIDGE_USERNAME" } | Follow Hue bridge registration process to get clientKey and username
Define controlled entertainment area | PUT | /api/v1/hue | application/json; charset=utf-8 | yes | { "groupId": "1" } groupId shall match an existing entertainment area id | 聽
Define input names | PUT | /api/v1/hdmi | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "name": "name 1" 聽聽聽 }, 聽聽聽 "input2": { 聽聽聽聽聽聽聽 "name": "name 2" 聽聽聽 }, 聽聽聽 "input3": { 聽聽聽聽聽聽聽 "name": "name 3" 聽聽聽 }, 聽聽聽 "input4": { 聽聽聽聽聽聽聽 "name": "name 4" 聽聽聽 } } | 聽
CEC power state detection | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "cecPowersave": 0 } | 聽
USB power state detection | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "usbPowersave": 0 } | 聽
HDMI inactivity power state | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "inactivePowersave": 0 } | 聽
HDMI input detected | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "hpdInputSwitch": 0 } | 聽
Auto switch inputs | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "cecInputSwitch": 0 聽聽聽 } } | 聽
Auto Sync | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "linkAutoSync": 1 聽聽聽 } } | 聽
Background lighting | 聽 | /api/v1/execution | application/json; charset=utf-8 | Yes | { 聽聽聽 "MODE": { 聽聽聽聽聽聽聽 "backgroundLighting": false 聽聽聽 } } MODE = video \| game | 聽
ARC Bypass | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "arcBypassMode": 1 } | 聽
Restart sync box | PUT | /api/v1/device | application/json; charset=utf-8 | Yes | { 聽聽聽 "action": "doSoftwareRestart" } | 聽

All 9 comments

homebridge-hue already supports stopping syncing, since that鈥檚 supported by the (regular) Hue API, see #496. I won鈥檛 be supporting the Hue entertainment API, which is required to start syncing. I don鈥檛 even know if the HDMI box provides an API.

There seems to be an api, but I haven't figured out how to use it yet. There is also no documentation available an not even release note or something similar. Using https://[box ip]/api you get the following promising response:
serviceType":"huesync","deviceType":"HSB1","support":[{"version":1,"path":"/v1","level":3

Seems /api/v1 would be the way to go but you only get an "invalid token" message. No idea how to get one so far馃槕

@leoneleone that is the entertainment api the hue sync box is using and not an api to controll the box itself.

Here is the complete API doc :

_Authentication :_
The authenticated API calls requires a JWT token. The JWT token is obtained in the registration step. The accessToken received must then be passed to authenticated calls as an HTTP header :
Authorization: Bearer <accessToken_here>

Operation | Method | URL | Content-type | Auth ? | Data | Response
-- | -- | -- | -- | -- | -- | --
Basic device info | GET | /api/v1/device | 聽 | no | 聽 | 聽
Registration | POST | /api/v1/registrations | application/json; charset=utf-8 | no | { 聽聽聽 "appName": "Your_App_Name_Here", 聽聽聽 "appSecret": "MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI=", 聽聽聽 "instanceName": "Your_Client_Device_Name_Here" } | Response will contain the accessToken in the returned JSON object (after physical button press for 2 secs). I found it was maybe mandatory to make a first request, then press then button, then a 2nd request.
Get current state | GET | /api/v1 | application/json; charset=utf-8 | yes | 聽 | 聽
Change mode | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | { "mode": "MODE" } MODE = passthrough \| powersave \| video \| music \| game | 聽
Change brightness | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | {聽 "brightness": VAL } VAL =聽 0 -> 200 | 聽
Change intensity | PUT | /api/v1/execution | application/json; charset=utf-8 | yes | { "MODE": { "intensity": "INTENSITY" } } MODE = video \| music \| game INTENSITY = subtle \| moderate \| high \| intense | 聽
Check firmware update available | PUT | /api/v1/device | application/json; charset=utf-8 | yes | { "action": "checkForFirmwareUpdates" } | No response, need to query device state later on
Set firmware autoupdate | PUT | /api/v1/device | application/json; charset=utf-8 | yes | { 聽聽聽 "update": { 聽聽聽聽聽聽聽 "autoUpdateEnabled": true, 聽聽聽聽聽聽聽 "autoUpdateTime": 2 聽聽聽 } } | 聽
Register Hue Bridge | PUT | /api/v1/hue | application/json; charset=utf-8 | yes | { 聽聽聽 "bridgeIpAddress": "YOUR_BRIDGE_IP", 聽聽聽 "bridgeUniqueId": "YOUR_BRIDGE_UNIQUE_ID", 聽聽聽 "clientKey": "BRIDGE_CLIENT_KEY", 聽聽聽 "username": "BRIDGE_USERNAME" } | Follow Hue bridge registration process to get clientKey and username
Define controlled entertainment area | PUT | /api/v1/hue | application/json; charset=utf-8 | yes | { "groupId": "1" } groupId shall match an existing entertainment area id | 聽
Define input names | PUT | /api/v1/hdmi | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "name": "name 1" 聽聽聽 }, 聽聽聽 "input2": { 聽聽聽聽聽聽聽 "name": "name 2" 聽聽聽 }, 聽聽聽 "input3": { 聽聽聽聽聽聽聽 "name": "name 3" 聽聽聽 }, 聽聽聽 "input4": { 聽聽聽聽聽聽聽 "name": "name 4" 聽聽聽 } } | 聽
CEC power state detection | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "cecPowersave": 0 } | 聽
USB power state detection | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "usbPowersave": 0 } | 聽
HDMI inactivity power state | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "inactivePowersave": 0 } | 聽
HDMI input detected | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "hpdInputSwitch": 0 } | 聽
Auto switch inputs | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "cecInputSwitch": 0 聽聽聽 } } | 聽
Auto Sync | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "input1": { 聽聽聽聽聽聽聽 "linkAutoSync": 1 聽聽聽 } } | 聽
Background lighting | 聽 | /api/v1/execution | application/json; charset=utf-8 | Yes | { 聽聽聽 "MODE": { 聽聽聽聽聽聽聽 "backgroundLighting": false 聽聽聽 } } MODE = video \| game | 聽
ARC Bypass | PUT | /api/v1/behavior | application/json; charset=utf-8 | Yes | { 聽聽聽 "arcBypassMode": 1 } | 聽
Restart sync box | PUT | /api/v1/device | application/json; charset=utf-8 | Yes | { 聽聽聽 "action": "doSoftwareRestart" } | 聽

Looks like the Sync Box might get native HomeKit support: https://www.macrumors.com/2020/01/07/philips-hue-new-outdoor-lights/.

I've found out a few more things, like color palattes for the music mode and even a new ambient mode (see https://github.com/MadMonkey87/InnerCore.Api.HueSync)

https://developers.meethue.com/develop/hue-entertainment/hue-hdmi-sync-box-api/

Pretty cool, I've updated my library already. It is pretty much the same api as described here. In addition, the secret for the registration has been dropped and IR codes and presets have been addes

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gcappucc picture gcappucc  路  11Comments

th3cube picture th3cube  路  10Comments

brandungskieker picture brandungskieker  路  4Comments

imbaimbaimba picture imbaimbaimba  路  11Comments

jannnfe picture jannnfe  路  3Comments