Event in rule if public power failure in the house

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.