I have a litte house in croatia and in this house I have a smarthome with OpenHAB2.
But there are always public power outages.
My main elements (Raspi, router, UMTS Stick) has a uninterruptible power supply.
Also I have a switch that I can read the voltage (230V). Now I store the volate all 5 minutes.
If I have no voltages on the switch, the public power is down and I need a massage over my telegram instance.
How can I do this?
Thank you for every hint!
If your UPS can interface with Network UPS Tools (NUT), then you can set up openHAB to monitor your UPS and create notification rules that fire when the UPS’s status changes. I wrote a guide for that, but it’s based on the 1.x NUT binding, which has been replaced in OH2.5.
I’ve just upgraded from OH2.4 to OH2.5 this week, and I’ll update the guide after I’ve gotten everything figured out.
If your switch is drawing from mains power (which I assume to be the case), it’s not going to be much help since it’ll just go offline. You could trigger notifications whenever it’s unreachable. But I think using your UPS with NUT would be more beneficial overall.
Of course, if your Internet access is down, none of this matters. I have my wifi router and cablemodem attached to my UPS so that OH can send me notifications (via the OH Android app), but if a public power outage also takes down my Internet provider, the notifications aren’t going to reach me.
(Stuart Hanlon, UK importer of Velbus hardware)
unfortunately, my UPS has no interface, so this solution is not possible.
I have also attached my Raspi, router and UMTS stick to the UPS. And my connection with the internet is not cable, it is wireless. And if the public power down, the send masts from the communication companies (normaly) has power (emergency power unit - I don’t know) - so I can send to internet.
Yes, but how must I configurate openHAB that this work?
I think normaly the switch send the information and not the Server ask “do you live”.
Find an old Ac/Dc power adapter (plugged into the same power source as your UPC) with output voltage small enough to use it as an input signal for RPi digital pin (use voltage divider if needed). Use the GPIO binding. When power drops your digital pin will go low. Now you can write a routine to send a notification.