Power outage

Hello! Theoretically, I would have done so:

or

flash:

+
check the availability of the Internet
http://docs.openhab.org/addons/bindings/network/readme.html
+
a rule that if the Internet outage will send a team sonoff off and after 10 seconds turn