anthonywebb / homebridge-cbus

CBus plugin for homebridge
MIT License
35 stars 20 forks source link

Timer to delay Homebridge service start with CGate service and Homebridge on Pi3 #64

Closed DarylMc closed 7 years ago

DarylMc commented 7 years ago

Just for information. Pi3 with Homebridge and CGate running as services at boot.

I had some trouble with Homebridge entering a semi unresponsive state after pi reboot and believe it was due to CGate not fully synced when Homebridge service starts.

I have made a timer to delay the start of Homebridge service and it works great but I just wanted to attach this info from CGate manual with estimates for the sync times.

This should give a rough idea of CGate sync times and the delay required for different sized networks.

Sync Stages A sync proceeds through several stages. These are indicated in the log as SyncSubState values. As a guideline:

Gateway initialisation (1 second) Unit presence; and (1 second) Unit duplicate check (15 seconds per 25 units) Unit Identification (15 seconds per 25 units) Bridge sync (1 second) Unit sync (30 seconds per 25 units) Application sync (1 second per application)

peterconn commented 7 years ago

@DarylMc i find that mine take a few minutes to come up when rebooting. I have around 45 groups.

DarylMc commented 7 years ago

@peterconn What time do you have in the timer? If you didn't change it I set it at 240 seconds.

peterconn commented 7 years ago

its 240 as per your text file

DarylMc commented 7 years ago

@simonhac is aware of it and we might not need the timer eventually. Apart from all the tinkering and learning new things I've been doing the last few months I don't really expect a reboot is going to be a common occurrence anyway.