Do you know how to reboot from RM using the url address? I have a friend with a c5 and wemo and I would like to set a rule to reboot the hub every X days....
See below. The pre-requisite is that hub login security has to be turned off (under Settings -> Hub Login Security). Replace hub.ip.addr with the actual address of the hub. I don't know this for a fact, but I would bet that 127.0.0.1 (loopback address) would work.
This is the rule to reboot at 4AM every day:
Note that the HTTP request has to be a POST request (not an HTTP GET):
However, I would like to state for the record, that sometimes just rebooting isn't enough.
Sometimes, you have to remain off, for say 10 minutes, and then start up again.
(This does some clearing of the zwave radio).
I do not think that this can be done pro grammatically from Hubitat, so I recommend getting a $10 WiFi outlet, and scheduling a 10 minute downtime.
P.S. Don't forget to schedule a shutdown, BEFORE turning off the power!
If you want a way to reboot the hub automatically, you need to turn off the option to require a password and login. This will mean anyone on your local network can browse to the Hubitat.
Yeah I have a pi running and can probably do that.... I am just stuck on whether or not I actually have the password/username thing turned off and also whether or not I can have Hubitat do it by itself... will do some more looking. Thanks for your code!!!
Hi, @aaiyar. I have a similar rule that has worked in the past, but it has stopped working for me in 2.1.7.121. Have you had any issues with your rule in the latest platform update?
Thank you for this script! It helped me reboot my hub when it stopped responding and the web interface would hang attempting to log in. I did end up having to add the --max-time parameter to the curl commands as the requests were really, really slow (took about 40 minutes each). But in the end the hub rebooted and went back to normal!