lukasroegner / homebridge-philips-hue-sync-box

Homebridge plugin for the Philips Hue Sync Box.
MIT License
55 stars 12 forks source link

error 400 #35

Closed shannondpasto closed 3 years ago

shannondpasto commented 3 years ago

Hi.

When I try and turn on the sync box using Home I get the following error in my homebridge log...

Dec 21 17:21:40 rpione homebridge[13268]: [21/12/2020, 5:21:40 pm] [PhilipsHueSyncBoxPlatform] Error while communicating with the Sync Box. Status Code: 400 Dec 21 17:21:40 rpione homebridge[13268]: [21/12/2020, 5:21:40 pm] [PhilipsHueSyncBoxPlatform] Failed to switch state to ON

I have an accessToken using a POST curl command... { "registrationId": "2", "accessToken": "<redacted>" }

Any ideas?

EDIT - I've just done a curl GET using the accessToken and it successfully returned data

shannondpasto commented 3 years ago

Worked it out. Had a misconfig in my json.

shannondpasto commented 3 years ago

I'm going to re-open this as I've figured out what the issue is. According to your documentation defaultOnMode and defaultOffMode are optional. My initial setup did not have these set in my config.json so when I tried turning on the sync box I was getting the 400 error. Adding these in (and not just 1) resolved the issue.

lukasroegner commented 3 years ago

Thanks for reporting this bug. The two settings are not optional with the new version 0.7.6.