DIY- Battery Backup Hubitat- under TEN bucks-NO soldering

I also think we need to be careful about adding things that will drive the price to much.

I can get a pi zero 2 or a cheap pi and use the apcusb dameon and get full details for a ups. Then It would also be allot more battery, and i can connect several devices. The smallest ups with smarts isn't cheap but i believe below 100$.

Agreed. I'm happy with a pure UPS.

1 Like

USD $

1 Like

I think what would be optimal would be maybe one or two more outward powering USB ports. I see these as gravy ports after the first run has proven it works perfect for what we are asking

Give me the option to attach a sensor if that is what I want. Reporting back to the hub would be nice, but honestly with the battery life this is going to give, i doubt it will be of much benefit.

The important thing is that simply it keeps the hub running no matter what the incoming power state is. Then it also needs to power the hub back up when main line power is restored after it has been fully depleated.

2 Likes

That could be good for multiple hubs. I wonder what the sustained power on that would be. But then again having something tell hubitat it's on battery would go a long way because you could write a rule such as battery attribute changed> wait 20 mins, shut down. Other hubs (hue, lutron etc) you wouldn't have to worry about dirty shut downs but they could still draw power.

As you know from the other thread, but for those who were not following the T6 power thread.

I recently found I could have the Hub notified of AC power loss by my Honeywell T6 Thermostat(s).
See this thread.

I would guess there is a chance any battery backed up thermostat could do the same.

In any case I plan on using it to shutdown my hub after an hour or so of no mains power.

Well for that matter this is also the Ring Gen2 Range Extender that also has battery backup and can notify HE if power is lost. The question is once notified what do you do with that information.

what do you do with that information.

My Battery backup is a single 18650 battery. It has limited runtime, but is small and consumes little energy with not in use.

My plan is to shut down the Hub an hour or so into a blackout. After which there will be no risk in hub database corruption due to sudden loss of power.

If the black out lasts more that an hour or so I start to worry about longer term issues (heat, refrigerator, freezer).

I’ve been using a TalentCell Mini UPS and once, I accidentally unplugged it. I think it powered 2 hubs for one or two days…

https://www.amazon.ca/dp/B07WLD32RP?ref_=cm_sw_r_cp_ud_dp_6EA58ATVM4C55G1QRBM6

2 Likes

Understood. My point though is with two 18650's should we really need to worry about powering the hub down. Like you said it is more likely we will be dealing with many other bigger issues at that point.

That is awesome. It kind of what i am hoping for.

I can't wait to get my hands on the final product from @dJOS

3 Likes

The affordable 18650 LFP batteries are usually around the 1600 mAh range so run time with 2 batteries should be around 12 hours by my calculations.

I’d still recommend implementing grid monitoring with an automated shutdown Rule.

Things are going well. One of my agents sent me this spy shot of Derek hard at work in his garage...

image

3 Likes

I guess it depends on your area and what you wish to deal with. We are lucky here we have very few power outages. Almost all of them are in the sub minute range with a few going to 5 minutes. I figure I will never have to worry about these and don't mind dealing with recycling the hub power to restart it when the outage lasts longer.
When we have a longer power outage I unplug most everything I can (or shut off breakers). I prefer to let others deal with whatever transients occur when the power returns.

Mine's still in the drawer after coming in from the US courtesy of a friend. The best part is that it has both 5 and 12V outputs.

True - You can use it for quite a few devices at once! I currently have 3 of my Hubs on it, had to get a 12V to 5V converter for this to work, as there are only 2 5V ports, but it worked out!

It is rather expensive though…. Having other solutions available is great!

1 Like

Reading through the different posts it seems there are two separate goals for a HUB UPS.

  1. Simply protect the database from sudden power off corruption. This is my goal.
  2. Continue operating for an extended period of time, hopefully through the whole length of the power outage.

For me a single 18650 cell is perfect. Early in my research I have considered using 4 AA or AAA lithium non chargeable batteries. Just to bridge the gap between power loss and shutdown.

1 Like

I need an ups.with normal outlet for.mine so i can out a zwave or wifi switch between and reboot remotely if.need be .

I wouldn't say those options are not mutually exclusive. I first and foremost I want to prevent any power blip to the hub. This is to prevent power off coruption.

Then I also want to let it run for as long as possible to prevent total loss of automation if i am away and can not manually cycle power to activate the hub afterwards. I think once you know the expected max runtime you then would want to put in a graceful shutdown before that occurs. With two 18650's hopefully that is a fairly long time. I think my point is this isn't as simple as just shutdown after a slightly longer then expected blip especially if you are not present to cycle the power to the device.

On a computer with lest say APC's powerchute software that means i would set it to run until maybe 5 min of battery was left. Then I would also have it set to power the pc back on after mains power was restored. My unraid server does just that. But we dont have that extra logic in most cheap ups devices. We just get hopefully good battery power until it runs out.

1 Like

i have a rule on my ups to shutdown the hub when the battery power goes below a certain runtime or percentage.. so as to not cold turn off the hub.. as you said when the ups comes back on the hub will too and also the kasa wifi switch.

probably too expensive to build a network interface or even telnet over usb to these cheap devices to monitor when they are ab out to run out of runtime. but it seems necessary if you have a long power outage.. I have had databse corruption in a hub due to cold turn off previously.

but if ou can somehow build is some sort of telnet interface over serial usb a driver could be written to monitor it.

I have that in my little synacsess PDU. @thebearmay was kind enough to write me an integration for it. Works fantastically.

2 Likes