- ioBroker Community Home
- Deutsch
- Einsteigerfragen
- Blockly Script Fensterkontakt .... ich stehe auf'm Schlauch
Blockly Script Fensterkontakt .... ich stehe auf'm Schlauch
-
Hallo,
ich versuche mich gerade an Blockly, hab' schon wieder gleich zu Beginn mal ein Problem...
Ich möchte mir ein Script erstellen, welches mir eine pushover-Mitteilung sendet, wenn das Fenster 5 Minuten geöffnet ist, die Meldung dann alle 5 Minuten wiederholt, bis das Fenster geschlossen wird.
Allerdings scheitere ich schon daran, dass ich die Meldung ĂŒber pushover beim Ăffnen UND SchlieĂen bekomme.
Ăber die Objekt-ID des Sensors bekomme ich zwar die ZustĂ€nde bei Ănderung als "DoorWindowContact.Closed" oder "DoorWindowContact.Open" im Wechsel angezeigt, aber alle Versuche, das mit wenn/falls, dann zu realisieren, sind bisher klĂ€glich gescheitert.
Wer kann helfen ?
-
Hallo,
ich versuche mich gerade an Blockly, hab' schon wieder gleich zu Beginn mal ein Problem...
Ich möchte mir ein Script erstellen, welches mir eine pushover-Mitteilung sendet, wenn das Fenster 5 Minuten geöffnet ist, die Meldung dann alle 5 Minuten wiederholt, bis das Fenster geschlossen wird.
Allerdings scheitere ich schon daran, dass ich die Meldung ĂŒber pushover beim Ăffnen UND SchlieĂen bekomme.
Ăber die Objekt-ID des Sensors bekomme ich zwar die ZustĂ€nde bei Ănderung als "DoorWindowContact.Closed" oder "DoorWindowContact.Open" im Wechsel angezeigt, aber alle Versuche, das mit wenn/falls, dann zu realisieren, sind bisher klĂ€glich gescheitert.
Wer kann helfen ?
-
Hi vielleicht hilft dir das etwas, bei mir wird ĂŒber Alexa nach 10 Minuten Bescheid gesagt das die TĂŒr offen steht:

Hier das Script dazu:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="on_ext" id="T|Pl~9R,:{Wu-OmSZ#};" x="263" y="-12">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="fq@G~|@QysKVaR,}[c9">
<field name="oid">deconz.0.Sensors.38.open</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="XQ|=xs_m%a#Y^Y]/1$=e">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="UW0YDKx^VUE%QwuL1XBT">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="+m5nm^/u8n=lQk)Ozy.#">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.38.open</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="jmDl!QylOg.dX)8S2QM">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="debug" id="{A2}k#|,|GF!q#O/Cyd~">
<field name="Severity">debug</field>
<value name="TEXT">
<shadow type="text" id="JD)zDl)lO)K/1DJ-6E">
<field name="TEXT">PrĂŒfung 1 KellertĂŒr auf</field>
</shadow>
</value>
<next>
<block type="timeouts_settimeout" id="qO6Gab,|$@5nZ0MEn8VP">
<field name="NAME">timeout</field>
<field name="DELAY">10</field>
<field name="UNIT">min</field>
<statement name="STATEMENT">
<block type="comment" id="dGtdlV+[##cdyvkT~{gi">
<field name="COMMENT">Hobbyraum</field>
<next>
<block type="control" id="oSPxWE19ojTrV%fDG*:+">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.c9d487971e914e939baad79585dd7b2e.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="cqOm9lfUM6biy5ORUa$C">
<field name="NUM">30</field>
</block>
</value>
<next>
<block type="control" id="zE@S{T~qS,RvWw.%+B6r">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.c9d487971e914e939baad79585dd7b2e.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="gjctANi:,4lb1fp|,+l-">
<field name="TEXT">Die KellertĂŒr ist auf</field>
</block>
</value>
<next>
<block type="comment" id="]fsXIfCRIIeZKNwo=/zt">
<field name="COMMENT">Wohnzimmer</field>
<next>
<block type="control" id="OnMN;m:uX${gvwVdok"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.d5794400dafd4c2cb0c8889fc15f0653.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="DF!zV8XkB[7PE,t,%8Y5"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="e,)K_WqJjj$UaJQXMg9r"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.d5794400dafd4c2cb0c8889fc15f0653.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="-*RCYuc1eC(}eZm?e;X!"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="weBBn!G4[/X!HPs$aa4">
<field name="COMMENT">KĂŒche</field>
<next>
<block type="control" id="cZ[z}qRoIZ]Fk(?z9:vF">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.661b5e9aa0b24161a4ec52b340173846.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="tf9v(Iv(IX@_CH/$}Jl"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="j[2ZBqYKwpHhYe]KXAOF"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.661b5e9aa0b24161a4ec52b340173846.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="I0e..M|)q.4f!90/#fd{"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="L}_sKs,aq@PV|a![n~MR"> <field name="COMMENT">Badezimmer</field> <next> <block type="control" id="k#O3;!Wr}L!ywN4Pi-*N"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.eba89b7180384792a24f92847baea082.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="3MT4W@_e[+8AZqnTMt~N"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="0nSYz8~,hJYK}O3(@/{~"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.eba89b7180384792a24f92847baea082.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">3</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="B6QqekE|Q0d#Z9@,SEE!"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="2K?2QO*TFto1V.OVwiD}"> <field name="COMMENT">Spielzimmer</field> <next> <block type="control" id="9@oX@+lF$.dhG+oWfO:f" disabled-reasons="MANUALLY_DISABLED"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G2A0P3077407031K.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="CBP^iF0yf9IZujLDzGZd"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="ij9sG,Ibz^3bA?~j,5@#" disabled-reasons="MANUALLY_DISABLED"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G2A0P3077407031K.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="|uyc@a+mb]c_ZxTd%|JP"> <field name="TEXT">Lena bitte die KellertĂŒr wieder schlieĂen</field> </block> </value> <next> <block type="debug" id="r#1uHqjHc:wS+@T6:hq;" disabled-reasons="MANUALLY_DISABLED"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="](;1HmcdNX,r;}:-rs8e"> <field name="TEXT">PrĂŒfung 2 KellertĂŒr auf</field> </shadow> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="Z4;E1~KxZ}k-UmtkQ1">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="gn@U,}]+K,u}#xLp:L7^">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.38.open</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="!b#_+*mF!@.G=dONbA8K">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="timeouts_cleartimeout" id="|3fmCN,P@Z.Y[PB{NdK+">
<field name="NAME">timeout</field>
<next>
<block type="debug" id="PPfu-8riRfrZ#):ftC~F">
<field name="Severity">debug</field>
<value name="TEXT">
<shadow type="text" id="/Y@nZZbJ|-oC(yp%-|JD">
<field name="TEXT">PrĂŒfung KellertĂŒr zu</field>
</shadow>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
Intel NUC mit Iobroker
-
Hi vielleicht hilft dir das etwas, bei mir wird ĂŒber Alexa nach 10 Minuten Bescheid gesagt das die TĂŒr offen steht:

Hier das Script dazu:
<xml xmlns="https://developers.google.com/blockly/xml">
<variables>
<variable type="timeout" id="timeout">timeout</variable>
</variables>
<block type="on_ext" id="T|Pl~9R,:{Wu-OmSZ#};" x="263" y="-12">
<mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="fq@G~|@QysKVaR,}[c9">
<field name="oid">deconz.0.Sensors.38.open</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="XQ|=xs_m%a#Y^Y]/1$=e">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="UW0YDKx^VUE%QwuL1XBT">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="+m5nm^/u8n=lQk)Ozy.#">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.38.open</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="jmDl!QylOg.dX)8S2QM">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="debug" id="{A2}k#|,|GF!q#O/Cyd~">
<field name="Severity">debug</field>
<value name="TEXT">
<shadow type="text" id="JD)zDl)lO)K/1DJ-6E">
<field name="TEXT">PrĂŒfung 1 KellertĂŒr auf</field>
</shadow>
</value>
<next>
<block type="timeouts_settimeout" id="qO6Gab,|$@5nZ0MEn8VP">
<field name="NAME">timeout</field>
<field name="DELAY">10</field>
<field name="UNIT">min</field>
<statement name="STATEMENT">
<block type="comment" id="dGtdlV+[##cdyvkT~{gi">
<field name="COMMENT">Hobbyraum</field>
<next>
<block type="control" id="oSPxWE19ojTrV%fDG*:+">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.c9d487971e914e939baad79585dd7b2e.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="cqOm9lfUM6biy5ORUa$C">
<field name="NUM">30</field>
</block>
</value>
<next>
<block type="control" id="zE@S{T~qS,RvWw.%+B6r">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.c9d487971e914e939baad79585dd7b2e.Commands.speak</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="text" id="gjctANi:,4lb1fp|,+l-">
<field name="TEXT">Die KellertĂŒr ist auf</field>
</block>
</value>
<next>
<block type="comment" id="]fsXIfCRIIeZKNwo=/zt">
<field name="COMMENT">Wohnzimmer</field>
<next>
<block type="control" id="OnMN;m:uX${gvwVdok"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.d5794400dafd4c2cb0c8889fc15f0653.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="DF!zV8XkB[7PE,t,%8Y5"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="e,)K_WqJjj$UaJQXMg9r"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.d5794400dafd4c2cb0c8889fc15f0653.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">1</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="-*RCYuc1eC(}eZm?e;X!"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="weBBn!G4[/X!HPs$aa4">
<field name="COMMENT">KĂŒche</field>
<next>
<block type="control" id="cZ[z}qRoIZ]Fk(?z9:vF">
<mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
<field name="OID">alexa2.0.Echo-Devices.661b5e9aa0b24161a4ec52b340173846.Commands.speak-volume</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="math_number" id="tf9v(Iv(IX@_CH/$}Jl"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="j[2ZBqYKwpHhYe]KXAOF"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.661b5e9aa0b24161a4ec52b340173846.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">2</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="I0e..M|)q.4f!90/#fd{"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="L}_sKs,aq@PV|a![n~MR"> <field name="COMMENT">Badezimmer</field> <next> <block type="control" id="k#O3;!Wr}L!ywN4Pi-*N"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.eba89b7180384792a24f92847baea082.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="3MT4W@_e[+8AZqnTMt~N"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="0nSYz8~,hJYK}O3(@/{~"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.eba89b7180384792a24f92847baea082.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">3</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="B6QqekE|Q0d#Z9@,SEE!"> <field name="TEXT">Die KellertĂŒr ist auf</field> </block> </value> <next> <block type="comment" id="2K?2QO*TFto1V.OVwiD}"> <field name="COMMENT">Spielzimmer</field> <next> <block type="control" id="9@oX@+lF$.dhG+oWfO:f" disabled-reasons="MANUALLY_DISABLED"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices.G2A0P3077407031K.Commands.speak-volume</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="math_number" id="CBP^iF0yf9IZujLDzGZd"> <field name="NUM">30</field> </block> </value> <next> <block type="control" id="ij9sG,Ibz^3bA?~j,5@#" disabled-reasons="MANUALLY_DISABLED"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation> <field name="OID">alexa2.0.Echo-Devices.G2A0P3077407031K.Commands.speak</field> <field name="WITH_DELAY">TRUE</field> <field name="DELAY_MS">4</field> <field name="UNIT">sec</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="VALUE"> <block type="text" id="|uyc@a+mb]c_ZxTd%|JP"> <field name="TEXT">Lena bitte die KellertĂŒr wieder schlieĂen</field> </block> </value> <next> <block type="debug" id="r#1uHqjHc:wS+@T6:hq;" disabled-reasons="MANUALLY_DISABLED"> <field name="Severity">debug</field> <value name="TEXT"> <shadow type="text" id="](;1HmcdNX,r;}:-rs8e"> <field name="TEXT">PrĂŒfung 2 KellertĂŒr auf</field> </shadow> </value> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </next> </block> </statement> <value name="IF1"> <block type="logic_compare" id="Z4;E1~KxZ}k-UmtkQ1">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="gn@U,}]+K,u}#xLp:L7^">
<field name="ATTR">val</field>
<field name="OID">deconz.0.Sensors.38.open</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="!b#_+*mF!@.G=dONbA8K">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="timeouts_cleartimeout" id="|3fmCN,P@Z.Y[PB{NdK+">
<field name="NAME">timeout</field>
<next>
<block type="debug" id="PPfu-8riRfrZ#):ftC~F">
<field name="Severity">debug</field>
<value name="TEXT">
<shadow type="text" id="/Y@nZZbJ|-oC(yp%-|JD">
<field name="TEXT">PrĂŒfung KellertĂŒr zu</field>
</shadow>
</value>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</xml>
@helfi9999
Danke, habe ich mir vorgemerkt.
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen BeitrĂ€ge zu scrollen? Wenn du dich fĂŒr ein Konto anmeldest, kommst du immer genau dorthin zurĂŒck, wo du zuvor warst, und kannst dich ĂŒber neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und BeitrĂ€ge positiv bewerten, um anderen Community-Mitgliedern deine WertschĂ€tzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden đ
Registrieren Anmelden
