ebaauw / homebridge-hue

Homebridge plugin for Philips Hue
Apache License 2.0
894 stars 91 forks source link

API error 1.59 #1165

Closed Pltnorwich closed 11 months ago

Pltnorwich commented 11 months ago

Hi, my hue hub has updated itself to API 1.59 but Homebridge gives this error in the log;

29/07/2023, 09:47:33] [Hue] Philips hue: Signify Netherlands B.V. BSB002 bridge v1959097030, api v1.59.0
[29/07/2023, 09:47:33] [Hue] Philips hue: warning: not using recommended Hue bridge api version 1.58.0
[29/07/2023, 09:47:33] [Hue] Philips hue: request 1: /: api error 1: unauthorized user
[29/07/2023, 09:47:33] [Hue] Philips hue: /: api error 1: unauthorized user - retrying in 15s

Thanks

ebaauw commented 11 months ago

I don’t think the error is related to the firmware version of the Hue bridge. Looks like you have an invalid API key in config.json.

Pltnorwich commented 11 months ago

Hi Ebaauw, Im unsure why there would be an error in the .json as it hasn't changed for over a year, could you point to where you think it maybe, { "platform": "Hue", "users": { "xxxxxxxxxx": "xxxxxxxx" }, "name": "Hue", "anyOn": true, "effects": false, "lights": true, "nativeHomeKitLights": true, "nativeHomeKitSensors": true, "resource": true, "wallSwitch": true, "_bridge": { "username": "xx:xx:xx:xx:xx:xx", "port": 54455 } }

Users and username removed

Edited - should I remove the plugin and reinstall to generate the link/connection again?

Cheers

ebaauw commented 11 months ago

Maybe the api key was removed from the Hue bridge?

If you edit config.json, and change the bridge id in users (just insert an x at the front, so it's easily reverted), Homebridge Hue should ask you to press the link button so it can obtain a new api key. Then edit config.json to add the new api key.

Pltnorwich commented 11 months ago

That appears to have fixed it, thank you Ebaauw