NEWS
Hilfe für Schaltung von Lüfter
-
Hallo zusammen!
Ich brauche eure Hilfe bei meinem Skript.
Geschaltet werden soll ein Lüfter, der an einer Zigbee-Steckdose angeschlossen ist. Wenn die Temperatur des Sensor 1 größer ist als die von Sensor 2 und der Fenster-Kontakt geschlossen ist, schaltet sich die Steckdose ein.
Soweit funktioniert es auch. Jetzt möchte ich aber, dass die Temperatur um "2" höher sein soll. Und noch die Ergänzung, dass wenn der Fenster-Kontakt geöffnet wird, die Steckdose ausgeschaltet und nach 10 Minuten wieder eingeschaltet wird.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="+A7wlutQO8gBfqosc.y3" x="-412" y="-12"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="L[i=p{|ii-ai*/YAZ@8s"> <field name="oid">zigbee.0.7c31fafffef2a871.temperature</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="V6]e:v6u:?I_dnQ6L_VO"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="y6XsbJFW||8n^XIXv2Am"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="0I-}oq~+vce1x`rdNSyD"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="NZ%Nw#n=7gm@KIWDz{^m"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffef2a871.temperature</field> </block> </value> <value name="B"> <block type="get_value" id="n,c^xm8xgzA@tKlzq8n1"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffeff0fc1.temperature</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="HUF//aBlEzq8z.bBpY%Y"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="n}s`{AFuYXT}VyZj.PjJ"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d008b0b4383.contact</field> </block> </value> <value name="B"> <block type="logic_boolean" id="h=.8?l5o{aiN|)W)LXh@"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="vs.J|^}}{M%%SJ1bpk;V"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.a4c1380c6818dcc5.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="gvfoVV5t!!Us3^C~!w.H"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="YL]^MiM0C_d90EjXd7qr"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="yM=9zWrslsViHeXAVGm6"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffef2a871.temperature</field> </block> </value> <value name="B"> <block type="get_value" id="bu}baT1uUx7Vd5*V)Mua"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffeff0fc1.temperature</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="9:Ifbw?dafg,2}S%Wrux"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.a4c1380c6818dcc5.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="-Z^zo^NF!I#bIx6Fb+i:"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> </block> <block type="timeouts_settimeout" id="m8BV9!UXyNHrGQ_tsyG0" x="-12" y="613"> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">min</field> </block> </xml> -
Hallo zusammen!
Ich brauche eure Hilfe bei meinem Skript.
Geschaltet werden soll ein Lüfter, der an einer Zigbee-Steckdose angeschlossen ist. Wenn die Temperatur des Sensor 1 größer ist als die von Sensor 2 und der Fenster-Kontakt geschlossen ist, schaltet sich die Steckdose ein.
Soweit funktioniert es auch. Jetzt möchte ich aber, dass die Temperatur um "2" höher sein soll. Und noch die Ergänzung, dass wenn der Fenster-Kontakt geöffnet wird, die Steckdose ausgeschaltet und nach 10 Minuten wieder eingeschaltet wird.
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable type="timeout" id="timeout">timeout</variable> </variables> <block type="on_ext" id="+A7wlutQO8gBfqosc.y3" x="-412" y="-12"> <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation> <field name="CONDITION">any</field> <field name="ACK_CONDITION"></field> <value name="OID0"> <shadow type="field_oid" id="L[i=p{|ii-ai*/YAZ@8s"> <field name="oid">zigbee.0.7c31fafffef2a871.temperature</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id="V6]e:v6u:?I_dnQ6L_VO"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_operation" id="y6XsbJFW||8n^XIXv2Am"> <field name="OP">AND</field> <value name="A"> <block type="logic_compare" id="0I-}oq~+vce1x`rdNSyD"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id="NZ%Nw#n=7gm@KIWDz{^m"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffef2a871.temperature</field> </block> </value> <value name="B"> <block type="get_value" id="n,c^xm8xgzA@tKlzq8n1"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffeff0fc1.temperature</field> </block> </value> </block> </value> <value name="B"> <block type="logic_compare" id="HUF//aBlEzq8z.bBpY%Y"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="n}s`{AFuYXT}VyZj.PjJ"> <field name="ATTR">val</field> <field name="OID">zigbee.0.00158d008b0b4383.contact</field> </block> </value> <value name="B"> <block type="logic_boolean" id="h=.8?l5o{aiN|)W)LXh@"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="vs.J|^}}{M%%SJ1bpk;V"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.a4c1380c6818dcc5.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="gvfoVV5t!!Us3^C~!w.H"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="YL]^MiM0C_d90EjXd7qr"> <field name="OP">LTE</field> <value name="A"> <block type="get_value" id="yM=9zWrslsViHeXAVGm6"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffef2a871.temperature</field> </block> </value> <value name="B"> <block type="get_value" id="bu}baT1uUx7Vd5*V)Mua"> <field name="ATTR">val</field> <field name="OID">zigbee.0.7c31fafffeff0fc1.temperature</field> </block> </value> </block> </value> <statement name="DO1"> <block type="control" id="9:Ifbw?dafg,2}S%Wrux"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">zigbee.0.a4c1380c6818dcc5.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="-Z^zo^NF!I#bIx6Fb+i:"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> </block> <block type="timeouts_settimeout" id="m8BV9!UXyNHrGQ_tsyG0" x="-12" y="613"> <field name="NAME">timeout</field> <field name="DELAY">10</field> <field name="UNIT">min</field> </block> </xml>@martin sagte in Hilfe für Schaltung von Lüfter:
Jetzt möchte ich aber, dass die Temperatur um "2" höher sein soll
Wert von Temperatur1 > ((Wert von Temeratur1 -Wert von Temperatur2)*2)
@martin sagte in Hilfe für Schaltung von Lüfter:
Und noch die Ergänzung, dass wenn der Fenster-Kontakt geöffnet wird, die Steckdose ausgeschaltet und nach 10 Minuten wieder eingeschaltet wird.
dann 2. Trigger auf den Fensterkontakt mit ist kleiner als vorher
schalte an
und Timeout in 10 minuten
schalte ausggf. noch ein stop timeout wenn Fenster wieder auf.
Dann muss aber der Trigger auf Änderung und das größer/kleiner als vorher in einen Logikblock
-
Mach mal so:

Die roten Rahmen weisen auf den einen Temperatursensor hin
Die gelben auf den zweiten
Die logik ist Wert 2. Sensor > Wert 1. Sensor +1 (oder 2, 3, 4 - wieviel du willst)
Die grünen rahmen weisen auf den Kontaktsensor hin
Und die Blauen auf die Steckdose.A.
Nachtrag - so sendet das ganze relativ oft Schaltbefehle an die Steckdose. Das kann man verbessern:

A.
-
@Asgothian sorry, neue Brille kommt nächste Woche
-
Danke für die tollen Vorschläge.
Ich finde das Bauteil "setze" aber nicht. Wo im Blockly versteckt sich das denn?
Oder könnt ihr mir euren Vorschlag exportieren, so dass ich ihn importieren kann? -
Danke für die tollen Vorschläge.
Ich finde das Bauteil "setze" aber nicht. Wo im Blockly versteckt sich das denn?
Oder könnt ihr mir euren Vorschlag exportieren, so dass ich ihn importieren kann?

