NEWS
OpenDTU - falls DTU "falsch", dann Fritz Dect Steckdose aus!
-
@knopers1 sagte: Falls Ping auf die DTU länger als 30min "falsch" ist, und die Fritz Deckt 200 (wahr) ist, steuere Fritz Deckt auf "falsch". sonst, falls Ping auf die DTU "wahr" ist, steuere Fritz Deck 200 auf "wahr)
-
Danke @paul53 ,
leider komme ich noch nicht zum Ziel, da ich das Script nicht ganz verstehe!
Was genau kommt beim "Wert"? Der Ping Adapter liefert true oder false.....<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="on_ext" id="13k~%BXuW:dn^bzTXH?t" x="-87" y="-462"> <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="D%+u;:[j;Ls5e|sffdom"> <field name="oid">ping.0.raspberrypi.192_168_1_155</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="phJQ_1$Tx1t|~O@|IdMI"> <field name="NAME">timeout</field> <next> <block type="controls_if" id="Cv|YRH`Ln_h)X$$,+C^p"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_negate" id="b/xvU,[jSe?PlbIJ.Hg8"> <value name="BOOL"> <block type="on_source" id="eI4nb`bgI/y6:[^d%ANF"> <field name="ATTR">state.val</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="u9Zdd7N0rtv9+/:wI]++"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="Z!^ByDqmlh]b`?B(dved"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="mTwv!d5NuFJbke$wy$Rd"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_negate" id="-.T5a%R-(wNX+|xaH7CG"> <value name="BOOL"> <block type="get_value" id="s*{{?xWUr3q}]sxG0vqq"> <field name="ATTR">val</field> <field name="OID">ping.0.raspberrypi.192_168_1_155</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="QF2_R8$?nn313/.]nPj6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="|tvtV_^FI_kfm|TdD.K)"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml>
-
@knopers1 sagte in OpenDTU - falls DTU "falsch", dann Fritz Dect Steckdose aus!:
Was genau kommt beim "Wert"?
der Wert des Triggerdatenpunkts
-
@knopers1 sagte: Was genau kommt beim "Wert"?
Wert
enthält den Wert des Trigger-Datenpunktes "ping.0.raspberrypi.192_168_1_155".
Es muss der richtigetimeout2
gestoppt werden. Bei "sonst falls" muss die Steckdose geprüft werden. -
okay, demnach sollte das Blockly doch laufen! Habe ich es richtig verstanden?
-
@knopers1 sagte: demnach sollte das Blockly doch laufen! Habe ich es richtig verstanden?
Ja, nachdem die beiden Korrekturen erfolgt sind.
-
puhh ,
Bei "sonst falls" muss die Steckdose geprüft werden - habe verstanden und abgeändert!
Jetzt noch mal zum Wert! Schaust Du nach? Die zwei " nicht" Bausteine machen für mich keinen Sinn! Kann es so funktionieren? Sorry Paul, habe mich damit zu wenig befasst
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="on_ext" id="13k~%BXuW:dn^bzTXH?t" x="-87" y="-462"> <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="D%+u;:[j;Ls5e|sffdom"> <field name="oid">ping.0.raspberrypi.192_168_1_155</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="phJQ_1$Tx1t|~O@|IdMI"> <field name="NAME">timeout2</field> <next> <block type="controls_if" id="Cv|YRH`Ln_h)X$$,+C^p"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="[6cMqYlc3#7E)Aqo@v})"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="?vm|uWEZ/|M_%JctG[9!"> <field name="ATTR">val</field> <field name="OID">ping.0.raspberrypi.192_168_1_155</field> </block> </value> <value name="B"> <block type="logic_boolean" id="!TBMhH{RAeGShuQPH4.?"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="u9Zdd7N0rtv9+/:wI]++"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="Z!^ByDqmlh]b`?B(dved"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="mTwv!d5NuFJbke$wy$Rd"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_compare" id="FyjQ4z/2$!p;s^zeEXl~"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="F88jE*;R.|KIds;n[v_L"> <field name="ATTR">val</field> <field name="OID">fritzdect.0.DECT_116570570860.state</field> </block> </value> <value name="B"> <block type="logic_boolean" id="M+8{#_W$41=p!),Fc]3%"> <field name="BOOL">FALSE</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="QF2_R8$?nn313/.]nPj6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="|tvtV_^FI_kfm|TdD.K)"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> <block type="logic_negate" id="b/xvU,[jSe?PlbIJ.Hg8" x="588" y="-462"></block> <block type="logic_negate" id="-.T5a%R-(wNX+|xaH7CG" x="638" y="-387"></block> </xml>
-
@knopers1 sagte: Kann es so funktionieren?
Ja.
@knopers1 sagte in OpenDTU - falls DTU "falsch", dann Fritz Dect Steckdose aus!:
Die zwei " nicht" Bausteine machen für mich keinen Sinn!
"nicht x" entspricht "x = falsch" bei Logikwerten (true / false).
Wenn der
Wert
schon als Variable vorliegt, vermeidet man das Einlesen des Datenpunktes: -
@paul53
okay, wieder etwas dazu gelernt. Danke vielmals für deine Zeit! Auf Dich ist immer Verlass...
Dann lasse ich jetzt die letzte Scriptversion stehen, die ich da mit deiner Hilfe umgebaut habe!
Ich hoffe, sie läuft...... -
@paul53
jetzt leuchtet es mir ein.... Ich habe die Variable nicht wahr genommen !
Dein Hinweis mit der Variablen und dem erneuten Einlesen des Datenpunktes hat bei mir klick gemachtSomit passe ich nochmal das Script nach deiner Version an!
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="on_ext" id="13k~%BXuW:dn^bzTXH?t" x="-87" y="-462"> <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="D%+u;:[j;Ls5e|sffdom"> <field name="oid">ping.0.raspberrypi.192_168_1_155</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="phJQ_1$Tx1t|~O@|IdMI"> <field name="NAME">timeout2</field> <next> <block type="controls_if" id="Cv|YRH`Ln_h)X$$,+C^p"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_negate" id="kCrhu_a0f%ly@+J[o9UI"> <value name="BOOL"> <block type="on_source" id="PfW^]VSV37G+NvLcZH{s"> <field name="ATTR">state.val</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="u9Zdd7N0rtv9+/:wI]++"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="Z!^ByDqmlh]b`?B(dved"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="mTwv!d5NuFJbke$wy$Rd"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_negate" id="rXLteYmHZ8gBR95GQ2xv"> <value name="BOOL"> <block type="get_value" id="F88jE*;R.|KIds;n[v_L"> <field name="ATTR">val</field> <field name="OID">fritzdect.0.DECT_116570570860.state</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="QF2_R8$?nn313/.]nPj6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="|tvtV_^FI_kfm|TdD.K)"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml> <xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout2">timeout2</variable> </variables> <block type="on_ext" id="13k~%BXuW:dn^bzTXH?t" x="-87" y="-462"> <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="D%+u;:[j;Ls5e|sffdom"> <field name="oid">ping.0.raspberrypi.192_168_1_155</field> </shadow> </value> <statement name="STATEMENT"> <block type="timeouts_cleartimeout" id="phJQ_1$Tx1t|~O@|IdMI"> <field name="NAME">timeout2</field> <next> <block type="controls_if" id="Cv|YRH`Ln_h)X$$,+C^p"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_negate" id="kCrhu_a0f%ly@+J[o9UI"> <value name="BOOL"> <block type="on_source" id="PfW^]VSV37G+NvLcZH{s"> <field name="ATTR">state.val</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_settimeout" id="u9Zdd7N0rtv9+/:wI]++"> <field name="NAME">timeout2</field> <field name="DELAY">30</field> <field name="UNIT">min</field> <statement name="STATEMENT"> <block type="control" id="Z!^ByDqmlh]b`?B(dved"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="mTwv!d5NuFJbke$wy$Rd"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_negate" id="rXLteYmHZ8gBR95GQ2xv"> <value name="BOOL"> <block type="get_value" id="F88jE*;R.|KIds;n[v_L"> <field name="ATTR">val</field> <field name="OID">fritzdect.0.DECT_116570570860.state</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="QF2_R8$?nn313/.]nPj6"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT_116570570860.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="|tvtV_^FI_kfm|TdD.K)"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> </block> </next> </block> </statement> </block> </xml>