Exemple #1
0
 def test_alarm(self, entity, attribute, old, new, kwargs):
     if new != old:
         message = "Probealarm!"
         self.fire_event("custom_notify",
                         message=message,
                         target="telegram_jo")
         #            self.fire_event("custom_notify", message=message, target="telegram_ma")
         # alarm message via separate notify_when_status_matched app
         #            try:
         #                requests.get("http://192.168.178.42:2323/?cmd=textToSpeech&text=Probealarm&password=nopw", timeout=5)
         #            except:
         #            	pass
         fc = FritzCall(address=self.args["fritz_address"],
                        password=self.args["fritz_pw"])
         fc.dial(self.args["phone_jo_handy"])
Exemple #2
0
 def sicherung_hebeanlage_raus(self, entity, attribute, old, new, kwargs):
     if new != old:
         self.turn_off("switch.waschmaschine")
         message = "Sicherung Keller-Steckdosen (Hebeanlage!) rausgeflogen - habe die Waschmaschinen-Steckdose ausgeschalten!"
         self.fire_event("custom_notify",
                         message=message,
                         target="telegram_jo")
         self.fire_event("custom_notify",
                         message=message,
                         target="telegram_ma")
         # alarm message via separate notify_when_status_matched app
         try:
             requests.get(
                 "http://192.168.178.42:2323/?cmd=textToSpeech&text=Achtung%20Hebeanlage%20hat%20keinen%20Strom&password=nopw",
                 timeout=5)
         except:
             pass
         fc = FritzCall(address=self.args["fritz_address"],
                        password=self.args["fritz_pw"])
         fc.dial(self.args["phone_jo_handy"])
Exemple #3
0
 def wasser_boden_hebeanlage(self, entity, attribute, old, new, kwargs):
     if new != old:
         self.turn_off("switch.waschmaschine")
         message = "Wasser auf dem Boden bei der Hebeanlage - habe die Waschmaschinen-Steckdose ausgeschalten!"
         self.fire_event("custom_notify",
                         message=message,
                         target="telegram_jo")
         self.fire_event("custom_notify",
                         message=message,
                         target="telegram_ma")
         # alarm message via separate notify_when_status_matched app
         try:
             requests.get(
                 "http://192.168.178.42:2323/?cmd=textToSpeech&text=Alarm%20Wasser%20auf%20dem%20Boden%20bei%20der%20Hebeanlage&password=nopw",
                 timeout=5)
         except:
             pass
         fc = FritzCall(address=self.args["fritz_address"],
                        password=self.args["fritz_pw"])
         fc.dial(self.args["phone_jo_handy"])