[RELEASE]Hub Updater v2 - Update multiple hubs with a button push

This virtual device is designed to allow a single button push to request that all hubs in a Hub Mesh check for and install an HE firmware update if available.

Available via HPM or https://raw.githubusercontent.com/thebearmay/hubitat/main/hubUpdaterV2.groovy.

Setup:

  1. Install the device driver on every hub you wish to participate

  2. Determine which hub you want to use as the primary aka, publisher

  3. Either:

           a.	Method 1 (Port 39501)
                i.	On each subscribing hub:
                          1.	Turn on the acknowledgement of HE Terms of Service
                          2.	Enter the publishing hub’s IP address and click subscribe               
               ii.	On the publisher hub
                          1.	Turn on the acknowledgement of HE Terms of Service
                          2.	Turn on “Push Update Request to All HubMeshed Hubs”
                          3.	Click “Send Test Message” (all subscribing hubs should have their msg attribute set to “Test Message”)
           b.	Method 2 (Rule Assisted)
               i.	On each subscribing hub:
                          1.	Turn on the acknowledgement of HE Terms of Service
                          2.	Share the Hub Updater Device via HubMesh to the publishing hub
               ii.	On the publisher hub:
                          1.	Turn on the acknowledgement of HE Terms of Service
                          2.	Create a rule:
                                a.	Trigger: Push on the publishing hub is clicked
                                b.	Action: Activate Push on all subscribing hubs
    
    1. Optional – create a momentary button tile on a dashboard of the publisher hub for the updater device.

To initiate request:
Click the Push command on the publishing hub updater device.
The device will check for an update and either:

  1. Set the msg attribute to say that the hub is current.

    or

  2. Send a request out to each subscribing hub to initiate their check for update and:
    a. Store the URL of the Community Thread for the update in the notesUrl attribute.
    Note: This is URL not valid for Beta releases, production releases only
    b. Update the msg attribute with the message that it is updating to version xx.xx.xx.xxx
    c. Request the update from HE and start processing.

15 Likes

This sounds very cool. Thank you for working on this. I know there was a discussion on this topic recently and I thought the conclusion was that it was not possible.

1 Like

I mean, for crying out loud, I don’t even have an altar with @thebearmay on it. How the heck am I supposed to pray to this God?

1 Like

For those using Method 1, I’m interpreting this to mean that we should create a virtual button, add it to a dashboard, and have a baby rule that actuates the Push command upon button press? If I’m going to do all that, I might as well have done Method 2 lol. Unless there is a button attribute inside this awesome driver that I could add to my dashboard on the publisher hub directly?

No judgment either way, just confirming understanding.

Driver has the Momentary button capacity so it can be directly added to a dashboard.

1 Like

Found a small code reversion issue - fixed in v2.0.5

v2,0,6 fixes notesUrl formatting issue

This is great and will certainly makes things easier for people with multiple hubs.
As with all things, when you release something, we all want more. Sorry!!
Personally I always download a backup before updating.
Is it at all possible to incorporate 'download a backup' before updating?
It may not be that easy to do but it's just a thought.

Thanks again for all your efforts in making things easy for us non-coders out there.

2 Likes

I'll look at it. The problem will be accessing the destination device.

3 Likes

Is this the link? Release 2.3.9 Available
Doesn't this change with each update? or at least each new platform version? By chance this could work for Beta too?

For the production releases the availability check returns the link to the community forum thread, for the beta releases it returns the url to the latest production thread (my assumption is that by using a single endpoint to serve both production and beta updates, updating the endpoint with the url for the beta thread would overwrite the information for the production thread.)

1 Like

I've been playing with options and keep running into the issue that I can't respond from the destination location. What I could do, if you think it would help, is add an option to send a HTTP GET to a URL of your choosing. Thinking that you may be able to script the wget execution as a response to the GET.

I wouldn't worry about it.
I'm only using 2 hubs so it's no big deal.
It was just a nice to have.
Thanks for having a look though.
I'm sure there are more important things you can be focusing on.
Thanks again.

Thank you for sharing the link to this app in the other thread! I can’t believe I didn’t know it existed!

Installed, and eagerly waiting for the next available update to test it out…

I tried linking it to HomeKit, but even after activating it, I don’t see it in the HomeKit list… is it just me?

Never looked at it from HomeKit, I'll look into it.

Edit: Looks like HomeKit wants a Pushable Button capability instead of the Momentary - shouldn’t be too difficult to add.

2 Likes

HomeKit Pushable Button wouldn’t implement right (refused to send button press - wanted to start some other action) so I added Switch capability. Turning on the switch will execute the push logic and then turn the switch off.

v2.0.8

3 Likes

I have never shared buttons with HomeKit but was curious about your findings and attempted to add a button device to Tonesto's Homebridge and saw this message which confirms your findings:

3 Likes

Awesome! Thank you for that! :smiley:

2 Likes

Does need installed on each hub or just a single hub in the mesh?

Each hub that you want it to update will need a copy. (The publishing hub needs something to talk to.)

1 Like

@thebearmay
Any chance this can work with HubConnect? I use mesh here at home, but have two remote hubs at different locations. They are connected via HubConnect and work well for sharing devices... Since I'm on the beta channel, and we seem to get a lot of updates, I have to VPN into those locations and do it manually... Not a big deal, but it would be nice to control it from one hub.