r/homeautomation • u/dJones176 • 20h ago
APPLICATION OF HA Monitor Power Cuts using Home Assistant
https://youtu.be/5GnrsrJmF5E2
1
u/silasmoeckel 17h ago
Does you UPS not publish this data somehow?
Mine does via MQTT so I just look at the status of one of the ones ending in <device_instance>/Ac/Power
1
u/dJones176 17h ago
Nope, mine doesn’t. The videos main audience are people from places that face frequent power cuts - I personally see 3-4 hours daily. We use an inverter for backup, which is kind of like a UPS but larger batteries, longer runtime, powers the entire home. It also doesn’t supply power from Batteries when mains is available. Also, very rarely you will any “smart” or network equipment in them
1
u/silasmoeckel 17h ago
Funny I use my victron inverters and it's an easy to get the status via MQTT (40kva and 90kwh of batteries). I mean a cheap APC ups will give you this info via the built in cable and existing module for it in home assistant.
1
u/dJones176 17h ago
APC are available here but anything with communication is very expensive. Some high end inverters also provide mobile apps for monitoring but nothing that can be used with HA
1
u/silasmoeckel 17h ago
The cheapest APC has wired status that works with the apc ups integration.
1
u/dJones176 17h ago
Where you live sure. Where I live, and possibly other countries, no.
2
u/silasmoeckel 17h ago
Sure, I don't see anything in their product line without basic communication.
In any event a device on the network not protected can be used in home assistant as a proxy for mains power. This really is not a hard thing to do.
1
u/dJones176 16h ago
it isn't but i have been messing around with this for over two years. simply relying on a single device isn't the best, and relying on them being available in HA is also wonky with some integrations. In the video I use Ping - which in my experience is more reliable, and i explain how to use multiple devices to ensure reliability
1
u/dJones176 16h ago
not sure if you saw the video or not, but i mentioned this isn't the most accurate way - but the easiest one to start with. I personally use a different approach using PZEM-004 and Esphome, which makes it more accurate.
I also show setting up some automations to calculate the duration of power cuts, number of power cuts, etc. Which aren't that difficult to do if you have experience with HA Automations, but might be useful for beginners
2
u/silasmoeckel 16h ago
No if people have anything useful to say they would write it up, videos are far to slow for most sorts of information transfer.
If I somehow had a device without the most basic of UPS functions (tell the computer to shut down cleanly) I would do similar to your esphome with a ct sensor. I went with a non backed up device as the cheapest method.
1
u/forcedfx 8h ago
I really need to get around to implementing something like this. I had alerts setup through my ups but it's really sensitive and when the voltage sags momentarily it kicks onto battery power for about 10 seconds and causes a false alarm.
3
u/JohnC53 18h ago
Um, wouldn't this require that your HA server have battery/UPS backup? That should be an initial preface in the video.
Good video though, nice demonstration and explanation, right to the point and no extra fluff.