# Hue Sync Box Mode

**URL:** <https://community.homey.app/t/hue-sync-box-mode/54510>\
**Category:** Questions & Help\
**Created:** [November 8, 2021, 7:01pm UTC](https://community.homey.app/t/hue-sync-box-mode/54510 "2021-11-08T19:01:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nbplopes](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nbplopes/32/8285_2.png) [@nbplopes](https://community.homey.app/u/nbplopes)\
**Post date:** [November 8, 2021, 7:01pm UTC](https://community.homey.app/t/hue-sync-box-mode/54510/1 "2021-11-08T19:01:31Z")

</div>

Hi. I have Homey Pro. Have added the Hue Sync device using the Hue App.

Is there a way to change sync modes video/music though a flow? The purpose of the Hue Sync Box is to have dynamic light as per video or music.

Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![nbplopes](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/nbplopes/32/8285_2.png) [@nbplopes](https://community.homey.app/u/nbplopes)\
**Post date:** [November 12, 2021, 12:17pm UTC](https://community.homey.app/t/hue-sync-box-mode/54510/2 "2021-11-12T12:17:51Z")

</div>

No one can help?

---

<div class="post-metadata">

**Author:** ![Darrell\_Etherington](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/darrell_etherington/32/91616_2.png) [@Darrell\_Etherington](https://community.homey.app/u/Darrell_Etherington)\
**Post date:** [August 3, 2023, 3:57pm UTC](https://community.homey.app/t/hue-sync-box-mode/54510/3 "2023-08-03T15:57:15Z")

</div>

Hi  
Did you get anywhere with this? I’m keen to be able to turn on Sync Mode from a flow but only see the options for on/off and dim level?  
Cheers  
Darrell

---

<div class="post-metadata">

**Author:** ![Erikvl87](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/erikvl87/32/112784_2.png) [@Erikvl87](https://community.homey.app/u/Erikvl87)\
**Post date:** [November 21, 2025, 11:36am UTC](https://community.homey.app/t/hue-sync-box-mode/54510/4 "2025-11-21T11:36:49Z")

</div>

I was also struggling with controlling the Hue Play Sync Box from Homey. I’ve asked Athom for an update of the app a year ago but unfortunately nothing has changed since then.

Let me share my workaround, which allows me to set the sync mode like this:

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/5/55d2bd948ead71c614c1355b40e8bae02ad9098a.png)

# Step 1: Obtain an access token

Before you can control or read data from the Hue Play Sync Box, you need to pair with it and create credentials. This only needs to be done once. After you obtain the `accessToken`, you can reuse it forever (until you remove the registration).

1. Make sure the Sync Box is **on**
2. Make sure **synchronization is stopped**
3. Make an HTTP **POST** request to:  
`https://<SYNC-BOX-IP>/api/v1/registrations`
4. Use this JSON body:  
`{ "appName": "homey", "instanceName": "homey" }`
5. The first response will be:  
`{ "code": 16, "message": "Invalid State" }`
6. **Within 5 seconds** , press and **hold** the Sync Box button until the LED turns **green**
7. **Release immediately** when it turns green (it will go white again)
8. **Within 5 seconds** , send the **same POST request again**
9. The response now contains the **accessToken** (your Bearer token)

# Step 2: Creating a reusable script to set the Sync Box mode

- Open the **Homey Web App** , go to **HomeyScript** and click **New HomeyScript**
- Name the script: **`SetPhilipsHueSyncBoxMode`**
- Paste the following content into the script editor
  - Replace **`[SYNC-BOX-IP]`** with your Sync Box IP
  - Replace **`[ACCESS-TOKEN-HERE]`** with your access token

- Click **Save**

```auto
// Set Mode for Philips Hue Sync Box

// Argument value: powersave, passthrough, video, game, music, ambient

const syncboxIp = "[SYNC-BOX-IP]";
const bearerToken = "[ACCESS-TOKEN-HERE]";

const url = `https://${syncboxIp}/api/v1/execution`;
const mode = args[0];
const body = JSON.stringify({ mode });

const agent = new https.Agent({ rejectUnauthorized: false });
const response = await fetch(url, {
  method: "PUT",
  agent,
  headers: {
    "Content-Type": "application/json",
    "Authorization": `Bearer ${bearerToken}`
  },
  body
});

if (!response.ok) {
  throw new Error(`SyncBox returned ${response.status} ${response.statusText}`);
}

```

**Note:** _The default Request action card validates SSL certificates and will not work with the Sync Box’s self-signed certificate. That’s why we use HomeyScript instead._

# Step 3: Set the sync mode via a flow

- Add a new **Then…** card
- Choose **HomeyScript**
- Select **Execute script with argument** (_not_ “Execute code”)
- In the dropdown, select **`SetPhilipsHueSyncBoxMode`**
- In the **argument** field, enter the desired mode:
  - `powersave`
  - `video`
  - `game`
  - `music`
