Capture Hub shutdown event and trigger pre-actions

Hey folks,

Is there a Rule Machine/programmatic way to capture a C8 shutdown event? Plan is to flip a momentary switch (connected to Alexa)--the momentary switch and routine are already in-place and working--that physically power off the Hubitat (via an Alexa-controlled WiFi switch) and reboot it 2 mins later. Currently, this requires me to shutdown the Hub via the hub integration app so I can trigger the logic.

If I just shut it down via settings, can I consume that event in some way?


No, the hub begins shutting down immediately, so even if there were, there would be no time to do anything. This has come up at least once before.

But you're in control of when the hub shuts down or restarts. It sounds like you're doing this from an endpoint. Maybe hit another endpoint that triggers a rule (you can set up local endpoints as triggers, among other options) and does whatever you want first, perhaps also including the shutdown itself?



Yup, it's already automated but if I can plumb things at the lowest point in the stack, that's my preference... and other shutdown paths exist so clearly I'm not at the bottom.

Your point is well taken, though, as I see no logged activity or events of any kind at shutdown so I guess I've got it as good as it'll get. :+1:

Perhaps a second C8 to have the pair play ball with one another. :thinking: