Hub shutdown using RM3

Is there a method to shutdown the hub from an internal command? I would like to use RM3 to shutdown the hub if it receives a notification that power has been lost and a UPS is temporarily keeping it running.

I'm not using RM3 yet but I assume it would be similar or the same. In the screenshot I'm shutting down one hub from another hub. If you want to have the hub shut itself down you would simply use port 8080 instead.

1 Like

Can you send an HTTP Post command to yourself? I just gave that a try and it doesn't work.

I am using that link though from an external source that sends the post back to HE when it receives the command from HE. So, basically, HE command itself to shutdown via a 3rd party. I don't believe there is any way to shut down Hubitat that is totally internal and not user initiated.

Did you try this?

@stephack.

I couldn't find the right address to shut down the hub. I figured I would start by typing the message in Chrome but to no avail.

Here's what I tried?

Tried:
http://192.168.1.xx/hub/shutdown
http://192.168.1.xx:8080/hub/shutdown
http://192.168.1.xx:8080 hub/shutdown

So I think I'm missing something or there is a combination I didn't try.

Can you clarify the shutdown message?

It has to be a POST command and not a GET. The following works perfectly:

http://HUBIP/hub/shutudown or /hub/reboot

You can't do this from a webpage. Doing it from Chrome is essentially a GET request. A POST request is needed. In RM there should be an option to send an Http Request. Within the configuration you would choose a request type of POST and then configure as I have in the screenshot above.

Yes, i tried just hub IP and port 8080. I don't think you can issue an HTTP request to yourself. I've tried that before and it doesn't work.

I have done it before and it worked fine. Something may have changed with one the the firmware update. I will test again and update you.

1 Like

My current screen for :

Select Actions for True

Send POST to: http://192.168.1.xx/hub/shutdown

It is delayed....but doing it on port 8080 was the trick. I knew you couldn't just send it out normally because the outbound and inbound messages would crash into each other cause they're on the same port. But the backdoor port (as one IT friend called it) worked.

1 Like

You have to use the REAL ip of your hub and you have to use port 8080.

so if your hub ip was 192.168.1.58 then the url would be

http://192.168.1.58:8080/hub/shutdown

1 Like

Thanks guys I got it working :slight_smile:

Now to put together a USP with notification.

FYI,
My initial thoughts are to use :
UPS Board
Arduino Pro mini
iharyadi Zigbee board (I will use the illumination sensor "looking" at an LED to trigger the hub shutdown.

John

1 Like

It seems that reboot doesn't work with port 8080 like hub/shutdown does. I thought it was just IP/hub/reboot to reboot the hub also but that doesn't seem to be working anymore.

I just did this with my Dev hub and it rebooted fine

Well it rebooted but "fine" may have not been the correct word. My hub has been stuck at 75% for 10 minutes....sigh :disappointed:

Edit: back up and running after pulling the plug. Thankfully I tested this on my Dev hub. I would have been freaked out if it was my Main hub.

Typo in the URL. DOH!!!!!

1 Like