hoobs-org / HOOBS

Build your Smart Home with HOOBS. Connect over 2,000 Accessories to your favorite Ecosystem.
https://hoobs.org
GNU General Public License v3.0
553 stars 51 forks source link

Delay Homebridge start #219

Closed Bladestar2105 closed 4 years ago

Bladestar2105 commented 4 years ago

Hello,

is it possible to delay the homebridge start? The problem is, that my Zigbee Conbee2-USB-Stick is to slow when initializing after reboot so that not all accessories are loaded.

mkellsy commented 4 years ago

Currently there is no delayed start but there is a couple of workarounds.

  1. If you edit the ~/.hoobs/etc/config.json file manually using nano. There is an autostart option in the server section. Set this to false. You will have to login to the UI and click Start Service from the menu on the top right.

  2. If your USB stick uses a service, you can add it to the wait list in the /etc/systemd/system/hoobs.service or Homebridge.service.

Bladestar2105 commented 4 years ago

Thank you the first solution works fine. Can you please implement the delay function? My stick has a service and it starts fast but the Initializing after service start is about 10 seconds before the lights are loaded.

askovi commented 4 years ago

@mkellsy this delay seems to also be needed for the Ikea Trafri. See trello plugin test results

mkellsy commented 4 years ago

I could expose some of the server section settings in the config screen.

Then I can change the autostart setting to an integer value in seconds.

Then change the code to use a setTimeout

Bladestar2105 commented 4 years ago

This would be great :-)

mkellsy commented 4 years ago

Done in Beta 69

Bladestar2105 commented 4 years ago

Is it public? It doesnt show.

mkellsy commented 4 years ago

Not released yet. Many changes go into a release. If we released after every change, the version would be something like Beta 2,345,321. :)

Bladestar2105 commented 4 years ago

When will the new beta be released? Cant wait for the delay feature 😊

mkellsy commented 4 years ago

It is released now.

Bladestar2105 commented 4 years ago

Thank you it works :-)

PoppyS33d commented 9 months ago

Would someone mind explaining how you set the delay for Homebridge? I just got a new Mac mini M2 Pro, and it loads Homebridge on startup too quickly, so quick in fact that I'm not even fully online, so it pretty much all fails. I have to restart Homebridge after boot, and then all is well. How do you set the delay? I'm using the GUI...

Thank you!