Skip to content
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

Automatic Connection to OpenHAB after Start #34

Open
syoma755 opened this issue Aug 5, 2016 · 1 comment
Open

Automatic Connection to OpenHAB after Start #34

syoma755 opened this issue Aug 5, 2016 · 1 comment

Comments

@syoma755
Copy link

syoma755 commented Aug 5, 2016

Currently when Homebridge-openhab starts it tries to connect to Openhab server only once. If Openhab is not running yet (typically at start), homebridge stops and service needs to be restarted manually. Other workaround is to start homebridge from openhab script, which is also not good.
It would be good if Homebridge-openhab would try to connect to openhab continuously and automatically without requirement for user intervention.

@digiltd
Copy link

digiltd commented Aug 12, 2016

The solution in #30 works fine for myself and at least one other user :)

You can also set up some switches to fire off the restart commands and put them in a sitemap (I use a separate "admin" one for system related stuff)

Though 99% of the time restarting the service (#30) once openHAB has kicked in usually works fine.

Switch execStopHB    "Stop Homebridge"     { exec="ON:sudo systemctl stop homebridge", autoupdate="false" }
Switch execStartHB   "Start Homebridge"    { exec="ON:sudo systemctl start homebridge", autoupdate="false" }
Switch execRestartHB "Restart Homebridge"  { exec="ON:sudo systemctl restart homebridge", autoupdate="false" }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants