Automating Hubitat Zwave crash recovery with… HomeAssistant

Earlier this week i had a zwave crash during the night and i had an automation to reboot my hub that did what it was supposed to, but didn’t fix my zwave issue. After i realized my zwave devices were not working properly when i checked my zwave status i saw i had no zwave devices. So i checked the forum and saw that it’s a known issue and you need to shutdown the hub and remove power to fix it, once i gave it a shot i was back up and running.

Since i’m running out of things to automate i decided to Automate Hubitat Zwave crash recovery with… HomeAssistant and SONOFF Micro USB Smart WiFi Adaptor 5V, Smart Switch for Type A USB Devices.

The device:

Once you follow the instruction to get this device on your Wifi network, follow these instructions to get the device into HomeAssistant.

You’ll also want to add a virtual device in hubitat to pass over to HomeAssistant so it knows when to cycle the power. In my case i used the native homekit integration to pass the device over to Home Assistant

RM automation to shutdown the hubitat hub and notify HA to power cycle the USB port:

Home Assistant automation triggered on virtual device (Hub Shutdown) turning on. The wait for device (Hub Shutdown) to become unavailable is to ensure the hub is totally down and the delay afterwards is to be extra safe.

Once power has been reset, i have an RM automation to refresh some automations and devices, turn off the virtual device (Hub Shutdown) and start a zwave repair.

I hope this helps someone


I have the same automation and the same experience with an overnight Z-wave crash.

There has to be an easier way to do this than a new home automation system.

Yeah i feel that, I already use HA for some airplay automations so all in all it was simple to setup. The device has a local API and i have not dug into it yet… so it is possible HA is not needed. If / when i have time to look into removing the HA requirement i will, but i also posted this to inspire other people to find better ways of doing this. This community is awesome like that. :heart:

1 Like

Hey, I think I'm onto something.

I have a spare hub-the C-7 I replaced with a C-8.
I think I can use it for crash recovery.
It's a good use for a spare hub, and it's not too complex (my bar is set pretty low).
I still have to think about rules and such, but the C-8 tells the C-7 to run a power cycle rule before it shuts itself down.
It could be used for any situation that could benefit from a power cycle, maybe pinging the C-8 for signs of life, or whatever.