NEWS
Sleeptimer wlan Steckdose
-
Hallo! Immer noch Neuling im iobroker und schon wieder ein Problem
Also das ist so
Im Schlafzimmer hab ich ein tv ohne Anbindung ins Internet. Dieser läuft über eine wlan Steckdose. Diese soll so als sleeptimer gesteuert werden. Soweit so gut. Das funzt. Also Alexa sleeptimer an dann läuft das 60 min und dann schaltet sich die Steckdose aus. So meine Überlegung ist wenn ich noch wach bin soll das Ding ja nicht aus gehen. Alexa soll mir eine Minute vorher sagen das der Fernseher aus geht und ich antworte darauf das das noch nicht geschehen soll und der sleeptimer neu gesetzt wird. Nur wenn ich nicht antworte soll das ausgehen
Hat jemand ein Script Beispiel
Der normale sleeptimer ist ja ein recht simpler das andere wahrscheinlich auch aber ich komme nicht weiter
Vielen Dank
-
<xml xmlns="http://www.w3.org/1999/xhtml"> <variables> <variable type="undefined" id="timeout5">timeout5</variable> <variable type="undefined" id="timeout2">timeout2</variable> </variables> <block type="on" id="N.Yjzv,-22g8T5V/5SH1" x="88" y="-562"> <field name="OID">0_userdata.0.Sleeptimer_test</field> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="6=9z$r0}`KW$E}xGQ0US"> <value name="IF0"> <block type="logic_compare" id="I8`U(ph~5l0xq{]U#G|t"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="c|[M.|-uEn?!#``tt|P-"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Sleeptimer_test</field> </block> </value> <value name="B"> <block type="logic_boolean" id=":3{w.`#B$?6P{@EuTb=f"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="/kJPbCcT$ObB^aG!m}9T"> <mutation delay_input="false"></mutation> <field name="OID">sonoff.0.Avatar3.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="!OG(f-kJA{9$X!20:uKE"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="timeouts_settimeout" id="sq5GiA+DcHdo-A=Mb8!x"> <field name="NAME">timeout5</field> <field name="DELAY">30</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="hzOxSz.K6B0OBN}sc!!E"> <mutation delay_input="false"></mutation> <field name="OID">sonoff.0.Avatar3.POWER</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="*/K6^$7?Isr{!])y_^yy"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </statement> <next> <block type="on" id="^0?K{~~frm+YAHI:lrs}"> <field name="OID">deconz.0.Sensors.2.buttonpressed</field> <field name="CONDITION">ne</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="controls_if" id="g%P8V(PWfus_|t_Ke1hq"> <value name="IF0"> <block type="logic_compare" id="L{mU@pe*m`1@`2,)a?!g"> <field name="OP">EQ</field> <value name="A"> <block type="on_source" id="?x7E4eAkfZU_N;_OVc73"> <field name="ATTR">state.val</field> </block> </value> <value name="B"> <block type="math_number" id="B_Z3jUa-Us|vDh9v8v9@"> <field name="NUM">1002</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="]fkbqXV.WMw3);:}=x4)"> <mutation delay_input="false"></mutation> <field name="OID">0_userdata.0.Sleeptimer_test</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="0V-r@#cGdR,9);A!v]Vq"> <field name="BOOL">TRUE</field> </block> </value> <next> <block type="timeouts_settimeout" id="lSnkBf$uV[K0pSx!L[0{"> <field name="NAME">timeout2</field> <field name="DELAY">10</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="control" id="WvCs7fYrtC8jPMOXAXPJ"> <mutation delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G090XG069225015Q.Commands.speak</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="L?G.sJOWI:XOJbcw9(vs"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="F!t#IiJm)@Oox9_KJ4H5"> <field name="TEXT">In ca. 5 Sekunden geht der Fernseher aus! ; </field> </block> </value> <value name="ADD1"> <block type="text" id="NrWH8W]H5GxSnAUpp]a,"> <field name="TEXT">Wenn der Fernseher an bleiben soll sage: </field> </block> </value> <value name="ADD2"> <block type="text" id="]WJJ|6.93-%JsQ5X;:Yx"> <field name="TEXT">Alexa, Fernseher soll anbleiben</field> </block> </value> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </xml>
Also das ist mein simple Blockly. Aber weiter weiß ich nicht und er geht bestimmt auch besser und anders.
Hier nochmal als Blockly Bild