-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delay homebridge startup until deCONZ has discovered all lights #246
Comments
New command, `ph_lightlist` creates a resourcelink with all lights. This is used by homebridge-hue to delay startup, until deCONZ has discovered (and exposed through the REST API) all lights. See ebaauw/homebridge-hue#246.
What about the sensors? |
homebridge-hue now delays the startup of homebridge, until all whitelisted resources are available, see issue #246. A special `lightlist` can be created through `ph.sh`, to list all resource that have to be available, but aren’t necessarily exposed. Also when deCONZ hasn’t initialised the RaspBee/ConBee, homebridge-hue no longer exits homebridge, but delays startup until the `bridgeid` has been initialised.
Not an issue, as deCONZ restores their resources from its database and exposes these directly on startup. It's only the light resources that are missing, see dresden-elektronik/deconz-rest-plugin#97. Anyway, homebridge-hue will wait for all whitelisted resources to be available. |
For me some Xiaomi Aqara door and temperature sensors appear after some minutes if i restart the gateway. Can you show, how such a whitelist looks like? I would create it with a REST client. |
Appear where? In the deCONZ GUI or in the REST API. I find all my
|
In v0.5.55. |
You are right. It is only in the GUI. The REST API have all sensors on startup. With v0.5.55 and the |
I tried a few hours by reading all available information here, but I still dont understand how (and where) to add the output from ph_get. Do I add this to the config.json? (already tried but only getting an error during statup) Can you give me a hint? Thanks! |
|
Hello, can you perhaps explain to me again how to apply the lightlist exactly so that Homekit does not lose the lamps? Even better would be in the Hue Wiki a guide step by step how to proceed? I installed homebridge-hue in the last version. Thank you. |
OK, step by step (
To update the resourcelink after you've added more lights, simply re-run |
Thank you for your prompt reply. That's really not much and seems to be easy but i get this message? Which user does he mean? ph lightlist: error: 1 unauthorized user |
Like any client, |
Ok, now it worked. Thank you. A question, still sensors and switches are also stored with them that can not be lost or only lights? I dont have lights in deconz only switches and sensors. ph lightlist: /resourcelinks/1: 0 lights |
Please see above. |
Shit, I completely overlooked. Thank you. |
Thanks for this. I'm finding the same problems so I just ran ph lightlist -v. I noticed you mentioned it shouldn't affect sensors, how about the Sonos' exposed in the SonosZP plugin? I just had to reboot my pi and all the Lights moved to default room but so did the Sonos'. It seems the ph lightlist -v is only for lights? |
Sonos is a different issue, see ebaauw/homebridge-zp#139.
Exposed by Homebridge Hue. |
Hello. |
Just in case this might be of interest to someone. I forked the plugin and added a loop that tries to find lights on startup. If there are none, it tries again until lights have been found. This would obviously be an issue if you don't have any lights. But for me it seems to work fine until now. Finally lights stopped from disappearing from HomeKit after restarts. |
From #245 (comment):
Yeah, this sucks. I start the homebridge service manually because of this. Luckily you can restart deCONZ while keeping homebridge/homebridge-hue running, so it's only an issue when you reboot the Raspberry.
This needs to be solved by deCONZ, see dresden-elektronik/deconz-rest-plugin#97, or in homebridge-hue by moving to the dynamic accessory model, see #4. No E.T.A. on either, I'm afraid.
I've been thinking about a workaround, holding up the homebridge startup (or simply exiting homebridge) until all lights are available. Unfortunately, deCONZ doesn't maintain /groups/0/lights, so either that needs to be maintained manually (need some testing to see whether that's reliable), or we'd need another homebridge-hue resourcelink (in addition to the whitelist and blacklist). I could provide a command in ph.sh to create/update that list automatically.
The text was updated successfully, but these errors were encountered: