Closed rossbacher closed 1 year ago
00000012-0000-1000-8000-656261617577
is the UUID of the Hue Bridge service (that holds Heartrate, Transition Time, etc. Looks like the timeout on GET / isn't handled correctly and causes the bridge to be exposed again, erroneously creating a second instance of this service. Strictly speaking, this is a bug, but I don't think I'll be fixing it. The startup sequence of Homebridge Hue, still a static platform accessories plugin, is delegate, and I daren't touch it, without extensive testing. I'd rather spend my time on Homebridge deCONZ and Homebridge Hue2.
Since this is related to the system load, I suggest giving the deCONZ gateway a bit more time to answer, before timing out, by setting timeout
in config.json to 15 or 30 seconds. I suppose that when the system is under load, the GET / gets issued at a later time, where it is less likely to timeout.
Is this when just restarting Homebridge, or when rebooting the server, also restarting deCONZ? In that case, you might want to add a delay before launching Homebridge, making sure deCONZ has initialised when Homebridge Hue starts. Also, running Homebridge Hue in a child bridge will cause it to start later, and allows you to restart only the child bridge, should Homebridge Hue still end up in startup loop. I would also shield Homebridge Hue from other plugins potentially blocking NodeJS, and contributing to the timeout.
Increasing the timeout actually seemes to have fixed it (I just did 10 restarts and it started fine every time, without the artificial load "trick").
This is happening on both Homebridge restart and and when the server is rebooting. I already did play with the deCONZ <-> Homebridge timing and ensured that Homebridge starts after deCONZ.
Also totally understand this is a wontfix thank you very much for looking into it!
Issue
When homebridge hue is starting it gets stuck with
I disabled all other plugins that I have running and it appears to work then, however what is even stranger is that it happens less often if the system is under load (This is running on an RPI 4) and I can "fix" the issue if I do run
stress --cpu 3
on the RPI and then restart homebridge,Once the system is started I can kill the artificial load generation and all works fine (until the next restart).
I attached a dump file and can provide any other information.
Log Messages
Debug Files
homebridge-hue.json.gz