ebaauw / homebridge-hue

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

2nd Hue Bridge needs manual pressing of button #1178

Closed MJV74 closed 9 months ago

MJV74 commented 10 months ago

I have homebridge running on a pi. I have 2 HUE bridges in my house (to many bulbs and switches for 1) I have added both bridges in homebridge via "homebridge-hue" only the first bridge connects automatically on every restart. the second one requires a button press on the bridge every time. I have also switched position of the bridges in the config editor, and it remains the 2nd Bridge requiring the hard button press.

Anyone any idea what I am doing wrong? thanks in advance for any help

ebaauw commented 10 months ago

You need to add the bridge ID and username (API key) of the second bridge to config.json as well.

MJV74 commented 10 months ago

I have added both to config.json as required. Only the first one listed in the file works automatically. the second one (I switched the following order to test) always requires manually pressing the bridge button

ebaauw commented 10 months ago

Double-check the bridge ID, it’s case sensitive. And it should be a single object with the two bridge IDs as keys and the two usernames as values.

Daan1203 commented 9 months ago

Hello Erik,

I have the same problem here. Using the standard settings. Everytime i restart the Homebridge, I need to press the button. I am new to homebridge, so i don’t know what i have to do in the config file. Everything is working great after pressing the button, but is there a solution, so I don’t have to press it everytime when startup homebridge?

(You can answer in dutch if you prefer)

IMG_3782

MJV74 commented 9 months ago

Double-check the bridge ID, it’s case sensitive. And it should be a single object with the two bridge IDs as keys and the two usernames as values.

Ah, thank you, I had added them as two separate objects. Now combined and it works like a charm!

Daan1203 commented 9 months ago

@MJV74 Can you show me a printscreen of your config? So I can do the same with my problem. Thanks

MJV74 commented 9 months ago

@MJV74 Can you show me a printscreen of your config? So I can do the same with my problem. Thanks

image

Daan1203 commented 9 months ago

@MJV74 @ebaauw Scherm­afbeelding 2023-12-11 om 10 46 38

Where do I need to put the "users"? Under the last section?

MJV74 commented 9 months ago

image

Daan1203 commented 9 months ago

@MJV74 Do I need to delete the rest of the Hue config?

MJV74 commented 9 months ago

No need to delete anything, just add this under platforms. when you start up home bridge, it asks you to press the button on the bridge. then the startup log shows the hue ID and Key as on my print screen. Copy those and add them under platforms in the config file

Daan1203 commented 9 months ago

@MJV74 Thankyou so much! Working now!

ebaauw commented 9 months ago

I realise this is awkward, but back in the day when I created Homebridge Hue, this was the only way to get it to work.

Homebridge Hue2 will use the dynamic platform accessory setup, and persist the username (API key) in the cached accessories, so there will be no more need to edit config.json manually.