Method or Subscribe to Hub Reboots

Ok. What I need, though, is an event declaring the reboot cmd being called...

Well, maybe it's a thing but I've never heard of it. Why doesn't initialize work or the subscribe to systemStart above? If your initialize method was called you know the hub is restarting. What are you doing exactly and why is reboot so special?

I think what @elfege is looking for is a way to get an event when the reboot has started and possibly measure how long the reboot is taking?

If so, I don't think there is a way. And I don't even know if its possible as at the start of the reboot none of the services are even running to report such a thing. A reboot is doing a lot more than just starting to run things in the OS. Its checking the database and restoring if corrupted, its performing a backup and a few other things.

Only after all that is done is the OS available to report an event and by that time the reboot is probably near completion.

Hopefully I got what you were looking for right.

1 Like

What I would like to see is an event before a reboot or shutdown command starts. That way, any watchdog you have running has time to shut down and "chill out" until the reboot is finished. Right now I am doing this in a very roundabout way by having the shutdown/reboot take place after a delay using a virtual button but of course this doesn't happen for system reboot events like after an upgrade to the firmware. But a location event and then 3-4 seconds before the process of shutdown/reboot began would give enough time for any watchdog/monitoring process to shut itself off before the shutdown reboot occurs.

1 Like

That's indeed what I am talking about too. Maybe @bravenel can relay this to his team? There should be a way to throw a "rebootstart" event since the reboot command also throws a backup event, it seems.

In the meantime, how can one catch the backup event? That'd be a fair temporary workaround, wouldn't it?

I don't see anything in System Events before the reboot starts so I don't think there is anything that you can subscribe to from Location. You can see everything that is published to location if you look under system events on the left-hand menu.

Just reading through this. I've been scratching my head forever trying to work out why it doesnt work for me....

OMG! its INITIALIZE a "Z"!!!!

I had been spelling it the english way: "initialise()" and hadn't noticed that it was the american spelling! What an idiot!