tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

periodic polling for changes in sitemap/items? #30

Open jayekub opened 8 years ago

jayekub commented 8 years ago

i find myself restarting homebridge whenever i update my openhab config, because it doesn't seem to pickup changes automatically. is there some way to make it periodically refresh from OH?

digiltd commented 8 years ago

I use executeCommandLine in a rule to restart the homebridge service when i restart OpenHAB.

Not a perfect solution, but it works ok. I also have the same command bound to a switch so I restart by pressing a button in the ui.

rule "OpenHAB startup"
when
    System started
then
    executeCommandLine("sudo systemctl restart homebridge");
    logWarn("SystemStart", "Restarting Homebridge")
end
jayekub commented 8 years ago

thanks Sam. this is also what i ended up doing--works pretty well

On Tue, Jun 28, 2016 at 04:00:28PM -0700, Sam Turner wrote:

I use executeCommandLine in a rule to restart the homebridge service when i restart OpenHAB.

Not a perfect solution, but it works ok. I also have the same command bound to a switch so I restart by pressing a button in the ui.

rule "OpenHAB startup"
when
  System started
then

  executeCommandLine("sudo systemctl restart homebridge");
  logWarn("SystemStart", "Restarting Homebridge")
end

You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tommasomarchionni/homebridge-openHAB/issues/30#issuecomment-229209650