KraigM / HomeBridgeController

Provides a simplified UI for controlling your HomeBridge
88 stars 7 forks source link

Auto-Update Feature #6

Open epheterson opened 8 years ago

epheterson commented 8 years ago

It'd be nice if HomeBridge had an 'Update All' and/or Auto-Update feature to keep my plugins always updated w/out any effort.

This feature should be off by default, but discoverable, as some setups require homebridge never be restarted.

It is possible to update the plugins automatically and present the user with a 'Restart Homebridge' button, similar to how OS X downloads updates then tells the user when it's time to reboot. Personally, I'd want the updates to be installed, and homebridge restarted, all on its own as a moment of downtime is inconsequential.

KraigM commented 8 years ago

The first part is def doable but the second part (the restart) is a little more tricky. I myself have completely diff OS's and both have multiple ways to start homebridge. I started this project assuming people would just have homebridge installed on their Mac but given that I myself don't (RPi) I realized that that was a bad assumption.

I know they are working on a way to update homebridge without restarting (https://github.com/nfarina/homebridge/pull/497), but not sure when that would be done.

I couldn't think of anyway to self destruct homebridge but have it restart the exact same way. I'm sure there is a node js guru who has a sneaky way :smile:

epheterson commented 8 years ago

Not having to relaunch to reload the config file is a great idea for homebridge!

In the meantime, if you package homebridge with the UI, you have absolute control over its location on disk, and how it stops/starts. Perhaps this will make it easier for you to relaunch homebridge on the users' behalf?

KraigM commented 8 years ago

ABSOLUTE CONTROL! I like that :smile:

Yeah I figure one way is to bundle it in or at least control the installed version. Prob with that is getting sandboxing approved.

Another option would be docker. That way it is a closed system that is easily managed.

KraigM commented 8 years ago

I think we can still get it to be "sandboxed" if we bundle it with it but I think that would involve any plugins that use native code to be precompiled and signed.

Another way to get it to be "sandboxed" might be to build a embedded, self installing command line toolset (similar to what Xcode does) that would handle all the auto restart magic via the link. Or if embedding it doesn't work, it could just be a separate installer package.

KraigM commented 8 years ago

Or if anyone has some clever node js voodoo, I'm open to suggestions. NodeJS is not my forte :sweat_smile:

AppleTechy commented 8 years ago

@KraigM Can you persist the data? @devbobo Would this be possible, to have it relaunch in its previous state? Not exactly sure if what you ended up doing on the platform-wemo could be applied in a similar fashion to accomplish what we want to achieve.