Success with UPS!

Well... I've been reading back and forth about the issues with for instance an instant power loss of the hub and with a possible corrupted DB as a result of this.

Fortunately I live in a country with a very stabile power grid, but with that said it doesn't mean that it cannot happen, especially during summer time with thunder storms that might cause shorter outages. So because of this I bought a dirt cheap power bank/UPS from eBay called GM322 and apparently in my country quite rare power cable for the C4-hub from Lindy.

All was fine and I was happy until I realized that I didn't know how to gracefully shut the hub down, because I do not have any UPS for the router so the network will naturally be down if the power is off. The reason for not having any external power source to the router will be because both of the inconvenience and the non esthetically pleasing due to the fact that that I have three wall mounted ASUS Lyra as mesh-routers.

But... I was pleasantly surprised that the http://hubIP:8080/hub/shutdown actually was working without any connection to the router. This was checked by creating a timed rule and long before the occasion I plainly yanked the ethernet cable out of the hub, lo and behold the action did work! :blush:

Next step will be to use a trigger that makes more sense, for instance one of my power reporting Z-wave plugs. Here I might check the mains once every hour or so and if there is no reading or if it differs to normal, the rule will gracefully shutdown the hub.

I can also confirm that the GM322 mentioned above is working perfect when switching the power source off and on without making any impact on the hub at all!

3 Likes

If you have a device that you can ping and get a response from that should always be online except during a power outage you could try the iPhone Presence sensor virtual device as the trigger when it goes away (cannot be pinged for the time you specify) then trigger the shutdown. Otherwise if you can find one of these "USP (United Security Products) USPLS USP Power Loss Sensor" you can connect it (using the yellow and black wires) to the terminals on a Ecolink door sensor (DWZWAVE2.5-ECO) to trigger when it opens. The USP/Ecolink combo works very well.

4 Likes

Similar to what @tterk1, if you like to tinker a bit and want instant power on/off reports, take a look at his post. It's long but there are a quite a few different ways you can accomplish reporting with various types of zigbee/zwave sensors. Look through the whole post when you have time. It might inspire something. It did for me.

4 Likes

Will you mind posting a project on this when you finish? I'm interested in how this is done from start to finish.

2 Likes

I’m still using my original device I created for ST.
I test it once a month or so just to make sure it and it's battery are ok :slight_smile:

Now though, I use a shutdown driver and a new app to auto shutdown local & remote hubs after a configurable number of minutes while running on UPS
If the power is restored, the timer is reset

Andy

4 Likes

Hi Cobra

I wanted to ask when your website will be going live, would love to try your apps.

1 Like

Obviously, the app/driver I talked about is on the website :slight_smile:

We will be running a 'pilot' for the website for 20-30 people very soon.
Just ironing out a few bugs

5 Likes

Long time overdue, but it plainly slipped my mind to report back! :slightly_smiling_face:

None the less, apart from the hardware stated in my initial post I did also use the HTTP Presence Sensor by @jwetzel1492 to check wether or not the router is responding to pinging.

Skärmavbild 2020-05-17 kl. 18.34.42

Then I created a very simple rule in RM with a delay and cancel looking like this:

Skärmavbild 2020-05-17 kl. 18.54.15

With all the logging activated, the result makes me pretty confident that this will work as intended. :wink:

2 Likes