Perhaps a watchdog from the 8081 server might not hurt. Though having a bunch of welcome home messages in the middle of the night could be an unpleasant surprise!
Addendum to above .. perhaps have a reboot option displayed on the 8081 server only if the 8081 server detects that the main server is not responding, same check to be performed if actually pressed.
That would prevent malicious reboots, but still make it available in times of crisis?
Add in plenty of checks and limitations or people will use it to auto-reboot on hang (even though that's not a terrible idea)
I have a dual hub setup, one is designated as "devices" and another as "software". Each hub connected to power through a smart switch, that is registered on ANOTHER hub, so each hub can reboot another by turning off / on another hub's power switch.
For now I only reboot "software" hub on a schedule, works like a charm.
It is not recommended to restart the hubs by cutting power. You could corrupt your hubs database. This method is good however if your hub is completely locked up.
You can follow @stephack’s example in the thread below and create a rule in RM that will restart your hub. Here are a few screenshots Stephen posted as examples:
POST to http://<hubitat>:8080/hub/reboot no longer seems to work for me in 2.1.7.121. Has anyone else had an issue with this in the latest platform update?
Yes, I hadn't realized that you need to escape the open/close angled brackets when I made the original post, so <hubitat> had vanished from my original post. I've edited above to fix this.
That's not the Hub IP though is it? Can you please try using the Hub's IP instead? If you have the domain "hubitat" only assigned for port 80, the command you are using to port 8080 won't work correctly.
No, you're right—I shouldn't have said, "IP address," as it's a mapped local domain name.
No, this isn't a port mapping—it's a mapping of a local domain name to a local IP address. So I can, for example, go to http://hubitat:8081 in any local web browser to access my hub's diagnostic tools.
My local domain name has always worked in the past, but for the sake of being open-minded, I went ahead and followed your suggestion: I replaced the domain name with my Hubitat's 192.168.X.Y address, and the reboot worked. Glad it's working again!
Taking a step back, I would normally think the above suggests a router issue as the most likely cause, but the only thing that changed between being able to use my locally mapped domain name consistently over many months and having to resort to the hub's actual IP address is the update to 2.1.7. In any case, I think the underlying issue is probably not going to get solved on this forum, but at least my reboot rule is working again.
Also, this is a GET request, not a POST like reboot. I don't think you'll be able to install platform updates since it requires you to agree once you get to the update screen. You have to click the button.