Hi zusammen!
Ich habe folgendes Script für meinen 3D-Drucker laufen.
Seitdem ich den Sonoff-Pow auf die neue Tasmota-Version upgedatet habe bringt er mir mitten im Druck die Meldung, dass er fertig ist und schaltet den Drucke raus so wie er es eigentlich auch tun soll wenn er dann fertig wäre.
Meine Idee ist jetzt, dass der Wert mit den 5W länger als 2 Minuten vorhanden sein muss, damit er den "Drucker fertig"-Prozess startet.
Wie kann ich das einbinden?
Code
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="on_ext" id="+A7wlutQO8gBfqosc.y3" x="-387" y="13">
<mutation 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">sonoff.0.Sonoff-Pow-3D.ENERGY_Power</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_compare" id="YL]^MiM0C_d90EjXd7qr">
<field name="OP">GT</field>
<value name="A">
<block type="get_value" id="yM=9zWrslsViHeXAVGm6">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Sonoff-Pow-3D.ENERGY_Power</field>
</block>
</value>
<value name="B">
<block type="text" id="H=g~S*6(?G/uCr~jDdCp">
<field name="TEXT">50</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="control" id="vs.J|^}}{M%%SJ1bpk;V">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Sonoff-Pow-3D.3D-Drucker-fertig</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="gvfoVV5t!!Us3^C~!w.H">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="M~uV)}gj0R1:#*W8;u|_">
<field name="OP">LT</field>
<value name="A">
<block type="get_value" id=";C4ZX5Zy!7cKvi8im7j~">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Sonoff-Pow-3D.ENERGY_Power</field>
</block>
</value>
<value name="B">
<block type="text" id="qZr5=RgO[|.`JAG]=%:e">
<field name="TEXT">5</field>
</block>
</value>
</block>
</value>
<statement name="DO1">
<block type="control" id="W@d-F3O_9HHWW#dCNkL=">
<mutation delay_input="false"></mutation>
<field name="OID">sonoff.0.Sonoff-Pow-3D.3D-Drucker-fertig</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="A4H}`x`xaT~u.qw:OMjO">
<field name="BOOL">TRUE</field>
</block>
</value>
</block>
</statement>
</block>
</statement>
<next>
<block type="on_ext" id="u:R0u7j.Y,8EdsUCK6kQ">
<mutation items="1"></mutation>
<field name="CONDITION">ne</field>
<field name="ACK_CONDITION"></field>
<value name="OID0">
<shadow type="field_oid" id="jgpdw:j!HF59WUplmK}~">
<field name="oid">sonoff.0.Sonoff-Pow-3D.3D-Drucker-fertig</field>
</shadow>
</value>
<statement name="STATEMENT">
<block type="controls_if" id="0KU30/v2h#W(!`#[gp76">
<mutation elseif="1"></mutation>
<value name="IF0">
<block type="logic_compare" id="]-Zb+?Hn_!lMC-aT9alk">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="ln#_*!,/omF%2!L4WRp-">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Sonoff-Pow-3D.3D-Drucker-fertig</field>
</block>
</value>
<value name="B">
<block type="logic_boolean" id="pSN^b91_Se1kc2o;W4J^">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</value>
<statement name="DO0">
<block type="telegram" id="i||{vH9*ebG3rYojyq#~">
<field name="INSTANCE">.0</field>
<field name="LOG"></field>
<value name="MESSAGE">
<shadow type="text" id="U][E8N^7Bu/+`G(NxN}#">
<field name="TEXT">Der 3D-Druck hat begonnen</field>
</shadow>
</value>
</block>
</statement>
<value name="IF1">
<block type="logic_compare" id="21(9~CU|XRCn:EOXk2/@">
<field name="OP">EQ</field>
<value name="A">
<block type="get_value" id="TSvo:2H{H+}IE{#M1`FO">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Sonoff-Pow-3D.3D-Drucker-fertig</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>
<statement name="DO1">
<block type="telegram" id="ed05d|bQf^sw*MK?SR-6">
<field name="INSTANCE">.0</field>
<field name="LOG"></field>
<value name="MESSAGE">
<shadow type="text" id="sKyyX,f?IkAZP`RFQReF">
<field name="TEXT">Die Waschmaschine ist fertig :)</field>
</shadow>
<block type="text_join" id=":?(LV%}eMmeGg5)=s63{">
<mutation items="4"></mutation>
<value name="ADD0">
<block type="text" id="Me[sfL:79y?isrCAn~-e">
<field name="TEXT">Der 3D-Drucker ist fertig :) </field>
</block>
</value>
<value name="ADD1">
<block type="text" id="0bN](j4?-62PDxGTFs`K">
<field name="TEXT">Und du hast heute </field>
</block>
</value>
<value name="ADD2">
<block type="get_value" id="5nYhH(Z-[f`G*,+qIZ;H">
<field name="ATTR">val</field>
<field name="OID">sonoff.0.Sonoff-Pow-3D.ENERGY_Today</field>
</block>
</value>
<value name="ADD3">
<block type="text" id=",nn}rYrBfCaxgJPdJkp7">
<field name="TEXT"> kWh beim Drucken verbraucht.</field>
</block>
</value>
</block>
</value>
<next>
<block type="debug" id="[(7M1^8%c/%.+}W!IP`}">
<field name="Severity">log</field>
<value name="TEXT">
<shadow type="text" id="S]faZ4vFq=2#t_?cFb,Z">
<field name="TEXT">SONOFF-POW 3D-Drucker test</field>
</shadow>
</value>
<next>
<block type="control" id="z@Aqt7j}X+?({ZYhK,8T">
<mutation delay_input="true"></mutation>
<field name="OID">sonoff.0.Sonoff-Pow-3D.POWER</field>
<field name="WITH_DELAY">TRUE</field>
<field name="DELAY_MS">15</field>
<field name="UNIT">min</field>
<field name="CLEAR_RUNNING">FALSE</field>
<value name="VALUE">
<block type="logic_boolean" id="obR{9,z;0+fiKP4Ax01l">
<field name="BOOL">FALSE</field>
</block>
</value>
</block>
</next>
</block>
</next>
</block>
</statement>
</block>
</statement>
</block>
</next>
</block>
</xml>
Alles anzeigen