For the next hardware version of the Hub, please consider adding an ultracapacitor that would allow the hub to gracefully shut itself down in the event of a power failure. It would eliminate the need for an external UPS.
Hope the ultracapacitor would be better than the Chamberlain garage door ones that seem to have a huge problem and a recall because of it. I would prefer a CR2032 or similar replaceable battery.
A UPS is really a good idea to protect your investment and they're not that expensive. I don't know about you, but I run a closet full of hubs, bridges, and an always on computer. It's just better for devices to have a UPS in place when power dips suddenly.
Battery backup in the ST hub turned out to be pointless, since it was cloud based anyway and the extremely curated list of automations that were local was nothing I wanted to use. Then there was their failed firmware update that caused batteries to be completely drained and leak. Mine was affected so I had to clean acid out of my hub. I think they sent me an $8 Amazon gift credit for my trouble
Personally, after a short term power outage, I want my IoT devices back on-line without my intervention, not a shutdown. If it's a long term outage, then of course it needs to be shutdown before the backup battery is depleted, but only a UPS is going to be able to help me with that.
My UPS is within cord distance from a computer and Wifi router. I believe I read somewhere that locating the hub that close to the Wifi router is not recommended. In other words locating the hub centrally in the home and away from the router may preclude the use of a UPS. I am using a 26FT Flat Power Extension USB Cable to plug my HE into the UPS.
I have read that too and I have chosen to ignore it as I have had zero issues. I have my Wifi router and 2 HE hubs within a few feet. The real answer in my opinion is having mains powered repeaters and a good mesh. Adjust channels of these hubs/routers so they don’t conflict.
Why not just buy a small UPS for the Hubitat? I use one of these for my cablemodem, router, and APs:
While I do have my equipment on a UPS, I completely agree with the OP.
We should not have to buy extra equipment to ensure the hub doesn't corrupt its own data base. If the database is that sensitive, then the hub should be designed such that it performs a safe shutdown on power loss.
Ultracapacitors are a mature technology which shouldn't have problems if designed in properly (I'm a career electrical engineer with a lifetime of experience in power electronics). Small batteries like the CR2032 have very low output current capability and would not be suitable. My HE hub is the only thing in my house that needs UPS. My network otherwise has nearly 30 devices on it that work without a need for UPS. For an industry example, see the difference between Unbiquiti's Cloud Key Gen1 and Gen2 - the Gen2 added 10 seconds worth of ultracapacitor backup to eliminate the need for UPS.
Likely just to avoid interference on the zigbee radio... If the wifi channels are non-overlapping with the zigbee channel, it shouldn't be much of an issue.
I have all my sensitive equipment on 3 UPS's in different areas of the house. I'm well aware of the potential for database corruption due to power loss and having spent half my career working a machine room floor I know you just can't pull the plug.
I've experienced more than a few power outages and the scenario often plays out like it did this past Halloween: I wake up in the middle of the night to the the sound of a raging windstorm and creeking roof, wondering if the power will stay up. When the multiple obnoxious UPS alarms all start, my thoughts are focused on how many tree limbs I'll be dragging away the next morning, how long to wait before starting up the generator... and how to silence those damn alarms. Hubitat and its fragile database never come to mind. It is only when I manage to find the silence button and shut the UPS down, tiptoeing around in the dark, I remember what I should have done....
Ironically, I resolved to put a huge 'SHUT DOWN HUBITAT FIRST' label on my UPS ... it is only now I'm remembering that I forgot to do that.
Like everyone else who has posted, I too am concerned about a sudden shutdown and HE database corruption. And I agree with @deane.gardner that there should be a mechanism for graceful shutdown built into the hardware.
That being said, I use an APC UPS, which is also connected to my Odroid XU4 (an SBC like an RPi). I use apcupsd on the Odroid to shutdown both my Hubitats before power runs out.
You can create a script called doshutdown that is placed in /etc/apcupsd/. The contents of this script should contain shutdown commands for the Hubitat. If you do not have a hub login, then the relevant command would be:
curl -X POST http://he-ip-addr/hub/shutdown
If you use a hub login, you will have to provide a login cookie along with the rest of this command.
Hope this helps someone until there's a hardware revision with a built-in solution.
Agree with the op for this request as well. I do have my equipments on UPS but more concern about database corruption which I see too often on this forum now. This is not the same as the ST internal backup batteries.
We will look into this. I should say that lead time on hardware changes is pretty long.
My idea isn't to run the hub, but more like a CMOS battery in a desktop computer. I have seen the battery last many years if not close to a decade in a wide variety of computers I have owned.
I would have a "monitor" that if the line voltage goes away, stop all automations, and shut down ASAP. The hub draws very little, and even if you had to replace this battery every year, it would be cheap and easy enough to do.
You can say ultracapacitors are mature, and they could be if specced correctly, but most of the cheap ones used in consumer electronics seem to have an abysmal record so far. Heck, look at the mature technology used in regular capacitors that are failing like crazy. I don't see them using a premium ultracapacitor in a sub-$90 retail hub that likely costs closer to $20 to manufacture.
Whatever power-holdup technology is used, it would have to last at least long enough to complete any queued-up file / database transactions, possibly while the radios are in the middle of transmitting. It's also possible this could be "fixed in software" by changing to a fault-tolerant filesystem / database, if available for the platform and if there are enough hardware resources (ram/flash) already present to support it.
I will add my vote to this suggestion as well. My Ubiquiti Cloud Key Gen2 has an internal battery feature to ensure the device powers off properly if power (or PoE) fail.