- Home
- Deutsch
- Skripten / Logik
- Blockly
- Präsenzmelder nach Tageszeit mit bestimmter Helligkeit
Präsenzmelder nach Tageszeit mit bestimmter Helligkeit
-
@dslraser
ja, genau -
eigentlich kann das so beim Blockly Start nur "zufällig" mal stimmen und dann erst wenn das nächste Mal eine dieser Zeiten zutrifft. (und steuere passt auch nicht, da der Datenpunkt nix steuert, da sollte aktualisiere rein) Wenn ich das jetzt so starten würde, dann würde in Deinem Datenpunkt jetzt gar nix passieren, da keine dieser Zeiten Zutrifft.
-
Wenn man es ganz genau nimmt, hast Du sicher recht. Aber nachdem ich die Astro-Datenpunkte das erste Mal mit Leben gefüllt habe, hat es eben noch 24 Stunden gedauert, bis der Datenpunkt mit den Tageszeiten erstmalig Daten gezogen hat. Und das aktualisiert sich eben mit den neuen Daten. Das Astro-Script läuft, wenn ich mich nicht irre alle 30 Minuten und wird mit aktuellen Daten gefüttert. Sollte es mal so sein, dass Datenpunkte nicht 100% stimmen, weil sich die Zeiten angepasst haben, kann ich damit um. Wir reden hier ja nur über maximal ein paar Minuten Differenz zum Vortag.
Weiterhin ist natürlich nochmal entscheidend, dass die Astrozeiten eh nie so genau sein können. Das werde ich noch zusätzlich mit HMIP Helligkeitssensoren oder eben auch Bewegungsmeldern koppeln.Erstmal geht es mir hier aber um das Grundverständnis und die Bedienbarkeit bevor wir den Neubau damit ausstatten. Wenn ich das später auf "blauen Dunst" kaufe und das klappt nicht, werde ich ein Problem mit meiner Frau bekommen.
-
@dslraser sagte: eigentlich kann das so beim Blockly Start nur "zufällig" mal stimmen
Richtig. Deshalb verwendet man keine Zeitpunkte, sondern Zeitspannen und geht auch nicht den "Umweg" über ein Astro-Skript und einen zusätzlichen Datenpunkt, da Blockly alles liefert
-
Da war ich gerade glücklich, dass es funktioniert und dann kommt schon eine neue Idee. Danke! Klingt logisch und ich spare mir ein paar Skripte bzw. Blocklys. Hab das direkt mal übernommen und ausgetauscht. Scheint bisher auch zu funktionieren.
-
@hinsen2k
Übrigens: Nacht(-18 °) wird im Sommer(21.6.) nur in Süddeutschland erreicht. Siehe Astrozeiten -
ich habe das Blockly von @paul53 mal für mich auf HUE_ command angepasst. Vielleicht kannst/willst Du es gebrauchen. @paul53 geht das auch noch kürzer, oder ist das okay ?
14:06:25.115 warn javascript.0 (321) script.js.99_Test.hinsen2k-BWM: Interval Kueche gestartet. Der Wert von bri ist: 254 14:07:29.767 warn javascript.0 (321) script.js.99_Test.hinsen2k-BWM: Das Licht in der Küche war für 64 Sekunden eingeschaltet.
@hinsen2k
Du brauchst zum testen nur diese 4 für Dich anpassen. (oder auch umbenennen)
In anderen Blocklys frage ich zusätzlich noch diesen DatenpunktPRESENCE_DETECTION_ACTIVE
mit ab, damit ist es dann auch möglich "Dauerlicht" zu schalten, wenn der Melder vorübergehend ausgeschaltet wird. (Das nutze ich manchmal im Bad, wenn ich in der Badewanne liege. Ich schalte dann per Sprache/Alexa den Bewegungsmelder aus und das Licht bleibt dann dauerhaft an. Bei mir wird dann der Melder spätestens nach einer Stunde wieder eingeschaltet, falls ich es vergesse)<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="{OcV;9JI[AK?VB^,6ay*">zaehler</variable> <variable id="=C.#MjA5Hx+2SR[8~+%V">idBri</variable> <variable id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</variable> <variable id="56jVkfRg7_;=([T5D@.(">idPRESENCE</variable> <variable id="2@A~O+K{.tV3zS;N`qAB">HUE_command</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="variables_set" id="CSo7=}pqPg@Q3ZAgjZny" x="12" y="-88"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="ev]Qo2PRH7pm|7Z@MSdG"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="$syTrXc/u:Kjh|6nGcmE"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> <value name="VALUE"> <block type="field_oid" id="{h*JQ-(=4N%VeeRU8SR{"> <field name="oid">hue.0.Küchenlampe.bri</field> </block> </value> <next> <block type="variables_set" id="GQmh|l;7~*pG}:S?~7^r"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> <value name="VALUE"> <block type="field_oid" id="K^@T*?Me;9*2Tkr{[mh#"> <field name="oid">hue.0.Küchenlampe.command</field> </block> </value> <next> <block type="variables_set" id="81IoUR6={LX+_w]n,kta"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> <value name="VALUE"> <block type="field_oid" id="MIY|+n}Ohw$2qK[k|nx^"> <field name="oid">hm-rpc.0.000C18A996B41F.1.PRESENCE_DETECTION_STATE</field> </block> </value> <next> <block type="on_ext" id=".*n{}kLu_EYHqWfSKNO9"> <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="}88$?|!MiHehDltyR=+y"> <field name="oid">default</field> </shadow> <block type="variables_get" id="hm_7vV!GL.;4#/``id9K"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="1*=gPs[40,=!N_0hRWc`"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="^5^qPS28Y:-wsVZwWvxU"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="WpBEaYZB0n9:9u)er:pI"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="qBw?hLwW:r[pq_^(K|.|"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="yteJQNfl1*r!1Rlf=A9:"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id=";w|LeCq`5=RJjGci]jD*"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="myBO9xgsi6VvFqHA1Wr%"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="qLYSb,JaJD|nTwX4LO^1"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="AaOsctCq6uDCy%}L=vVM"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="P|1@(GY)VnU.qH;Am(=7"> <field name="TEXT">{"on":true,"bri":254,"transitiontime":100}</field> </block> </value> </block> </statement> <value name="IF1"> <block type="time_compare_ex" id="d6fQytsi2Nsr6V1AzFF2"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id="X1rS1Nd/Zuz8HZFJu0*A"> <field name="TYPE">dawn</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="O--5yLhi;P=K)?e#h|S}"> <field name="TYPE">nauticalDusk</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="o-fM]-k5$T:m#dNFyYu)"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="V=-_HT-M*}hXbK5Zz2:["> <field name="TEXT">{"on":true,"bri":120,"transitiontime":100}</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Oz7fq-F+O@c}V[NY%2DY"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="gGupMQQz1#T$t=YL;e@U"> <field name="TEXT">{"on":true,"bri":10,"transitiontime":50}</field> </block> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="variables_set" id=",H!vbhEivaCe^vw0[UKi"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="Az6HQwwrxgR.SQWFG5)1"> <field name="TEXT">{"on":false,"bri":0,"transitiontime":100}</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="T?J!H$p.VDfAmZ6d8-7u"> <value name="IF0"> <block type="logic_compare" id="RgQ*U2XgU=+sUqm)jj3W"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="|U:sCp-Cnn_~tKC}K!),"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="B"> <block type="get_value_var" id="|~]+?LU3k!!?a#$wIno7"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="FvsZ~:xA-0WGv1?rVoWM"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="^0hysL4wSLTwF{EKcun$"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id="6zxVMf[6sS;BBuOgvJ*{" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="A#_aF,$?fY1-ek]a*J=h"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="0q#m[E|X0[?rJ./V9tv2"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="6pN|=hPQU^6D;3xGg])4"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="U:x3qE`$08H)#4+xUDTa"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="Ga{l)Eq]hZV.SF``:)gM"> <field name="NUM">0</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="Yf[w@OIVV/#hkZHY~sAm"> <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="w6l2B;m6E^2rD8pvp1jz"> <field name="oid">default</field> </shadow> <block type="variables_get" id="L[uz0A,8GP4mcuf%DAe2"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="g==GuTnIZb`|lRGG`ZM5"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="ef:-=UXYJy2:4[uS#@~2"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value_var" id="-TE~VCq.ip^1FYpk@8cR"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Y[3LbM(x^Xh*Xp|Eq#nK"> <field name="TEXT"></field> </shadow> <block type="variables_get" id=":OhK`clcF^yyJ#gZ%P=Z"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="Z|H$Sq3$*a~R)=dPeBIq"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="~F_s=Wf*]FL7_{}k^%OD"> <field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="math_change" id="6~OlY[q8VC@X:|jxDzu`"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="DELTA"> <shadow type="math_number" id="kh|G|Vj=nLzvt9YN2Y3P"> <field name="NUM">1</field> </shadow> </value> </block> </statement> <next> <block type="debug" id="H[1dF{ved!t]@]g2qB9|"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="pKWK-/qYaEKX]1)KTTbL"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="yiiw~5f+nx5w?K7^{]]]"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="4;[A-J8r:t6DJa`,L^X0"> <field name="TEXT">Interval Kueche gestartet. </field> </block> </value> <value name="ADD1"> <block type="text" id="K0^XK|:$Od1r-XfPNQiQ"> <field name="TEXT">Der Wert von bri ist: </field> </block> </value> <value name="ADD2"> <block type="get_value_var" id="Cbo|No=@lMa|T9;u1b0{"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="eVRjKG+OinA7].~9OX;G"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="`OYWq]o8YWI0RA)$0vd$"> <field name="NAME">Intervall</field> <next> <block type="debug" id="yI{#,$[w4sSQb4$,!flq"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="xEyYoMGlT,JGNHcP]/1M"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="ID@s6b@1Z0~c^5tAJyMl"> <field name="TEXT">Das Licht in der Küche war für </field> </block> </value> <value name="ADD1"> <block type="variables_get" id="TMK@?HrS6WCY?WeVv8o,"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> </block> </value> <value name="ADD2"> <block type="text" id="DbVAxZm(X?CV%$7d#[Dn"> <field name="TEXT"> Sekunden eingeschaltet.</field> </block> </value> </block> </value> <next> <block type="variables_set" id="qp$k(`+r=)fg!`{-s`cj"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="|4.1@jPli@YP_NO7,HSk"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </xml>
-
@dslraser sagte: geht das auch noch kürzer, oder ist das okay ?
"schreibe" sollte nur einmal (am Ende) ausgeführt werden, möglichst auch nur dann, wenn sich das Kommando geändert hat (Störpegel).
-
-
Das hatte ich, natürlich noch umständlicher, auch gerade gelöst.
Nun wollte ich aber statt dem Ergebnis in Sekunden das ganze in Stunden und Minuten haben, was sich entsprechend sekündlich aktualisiert.
Das Ziel ist, die laufende Zeit in Minuten und Sekunden in der Vis anzuzeigen. Ich hab den Timer in der VIS umgerechnet, was aber zur Folge hat, dass alles was <10 Sekunden ist, nur einstellig dargestellt wird. Ist noch suboptimal... -
@hinsen2k sagte in Präsenzmelder nach Tageszeit mit bestimmter Helligkeit:
Das Ziel ist, die laufende Zeit in Minuten und Sekunden
also Minuten und Sekunden (keine Stunden ? ) Ich frage nur zur Sicherheit. Welches Format ? getrennt als Zahlen oder mit : dazwischen, oder als Text ?
-
Erst hatte ich nur an Minuten und Sekunden gedacht. Jetzt wo Du von einer chilligen Zeit in der Badewanne gesprochen hast, könnte es auch mal ne Stunde sein.
Und die Darstellung dann mit :
Aber eben keine statische Zeit, sondern eine die sich in der VIS (oder dem Datenpunkt) sekündlich aktualisiert. -
@hinsen2k
JS-Funktion sec2string(s) mit Ergebnis. Inhaltreturn formatDate(1000 * s, 'h:mm:ss');
-
@paul53 sagte in Präsenzmelder nach Tageszeit mit bestimmter Helligkeit:
sec2string
Danke
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="{OcV;9JI[AK?VB^,6ay*">zaehler</variable> <variable id="Fj?b^GiMZ`!yB^^;6JeN">s</variable> <variable id="=C.#MjA5Hx+2SR[8~+%V">idBri</variable> <variable id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</variable> <variable id="56jVkfRg7_;=([T5D@.(">idPRESENCE</variable> <variable id="2@A~O+K{.tV3zS;N`qAB">HUE_command</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="variables_set" id="CSo7=}pqPg@Q3ZAgjZny" x="12" y="-88"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="ev]Qo2PRH7pm|7Z@MSdG"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="$syTrXc/u:Kjh|6nGcmE"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> <value name="VALUE"> <block type="field_oid" id="{h*JQ-(=4N%VeeRU8SR{"> <field name="oid">hue.0.Küchenlampe.bri</field> </block> </value> <next> <block type="variables_set" id="GQmh|l;7~*pG}:S?~7^r"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> <value name="VALUE"> <block type="field_oid" id="K^@T*?Me;9*2Tkr{[mh#"> <field name="oid">hue.0.Küchenlampe.command</field> </block> </value> <next> <block type="variables_set" id="81IoUR6={LX+_w]n,kta"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> <value name="VALUE"> <block type="field_oid" id="MIY|+n}Ohw$2qK[k|nx^"> <field name="oid">hm-rpc.0.000C18A996B41F.1.PRESENCE_DETECTION_STATE</field> </block> </value> <next> <block type="on_ext" id=".*n{}kLu_EYHqWfSKNO9"> <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="}88$?|!MiHehDltyR=+y"> <field name="oid">default</field> </shadow> <block type="variables_get" id="hm_7vV!GL.;4#/``id9K"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="1*=gPs[40,=!N_0hRWc`"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="^5^qPS28Y:-wsVZwWvxU"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="WpBEaYZB0n9:9u)er:pI"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="qBw?hLwW:r[pq_^(K|.|"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="yteJQNfl1*r!1Rlf=A9:"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id=";w|LeCq`5=RJjGci]jD*"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="myBO9xgsi6VvFqHA1Wr%"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="qLYSb,JaJD|nTwX4LO^1"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="AaOsctCq6uDCy%}L=vVM"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="P|1@(GY)VnU.qH;Am(=7"> <field name="TEXT">{"on":true,"bri":254,"transitiontime":100}</field> </block> </value> </block> </statement> <value name="IF1"> <block type="time_compare_ex" id="d6fQytsi2Nsr6V1AzFF2"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id="X1rS1Nd/Zuz8HZFJu0*A"> <field name="TYPE">dawn</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="O--5yLhi;P=K)?e#h|S}"> <field name="TYPE">nauticalDusk</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="o-fM]-k5$T:m#dNFyYu)"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="V=-_HT-M*}hXbK5Zz2:["> <field name="TEXT">{"on":true,"bri":120,"transitiontime":100}</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Oz7fq-F+O@c}V[NY%2DY"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="gGupMQQz1#T$t=YL;e@U"> <field name="TEXT">{"on":true,"bri":10,"transitiontime":50}</field> </block> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="variables_set" id=",H!vbhEivaCe^vw0[UKi"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="Az6HQwwrxgR.SQWFG5)1"> <field name="TEXT">{"on":false,"bri":0,"transitiontime":100}</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="T?J!H$p.VDfAmZ6d8-7u"> <value name="IF0"> <block type="logic_compare" id="RgQ*U2XgU=+sUqm)jj3W"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="|U:sCp-Cnn_~tKC}K!),"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="B"> <block type="get_value_var" id="|~]+?LU3k!!?a#$wIno7"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="FvsZ~:xA-0WGv1?rVoWM"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="^0hysL4wSLTwF{EKcun$"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id="6zxVMf[6sS;BBuOgvJ*{" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="A#_aF,$?fY1-ek]a*J=h"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="0q#m[E|X0[?rJ./V9tv2"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="6pN|=hPQU^6D;3xGg])4"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="U:x3qE`$08H)#4+xUDTa"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="Ga{l)Eq]hZV.SF``:)gM"> <field name="NUM">0</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="Yf[w@OIVV/#hkZHY~sAm"> <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="w6l2B;m6E^2rD8pvp1jz"> <field name="oid">default</field> </shadow> <block type="variables_get" id="L[uz0A,8GP4mcuf%DAe2"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="g==GuTnIZb`|lRGG`ZM5"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="ef:-=UXYJy2:4[uS#@~2"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value_var" id="-TE~VCq.ip^1FYpk@8cR"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Y[3LbM(x^Xh*Xp|Eq#nK"> <field name="TEXT"></field> </shadow> <block type="variables_get" id=":OhK`clcF^yyJ#gZ%P=Z"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="Z|H$Sq3$*a~R)=dPeBIq"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="~F_s=Wf*]FL7_{}k^%OD"> <field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="math_change" id="6~OlY[q8VC@X:|jxDzu`"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="DELTA"> <shadow type="math_number" id="kh|G|Vj=nLzvt9YN2Y3P"> <field name="NUM">1</field> </shadow> </value> </block> </statement> <next> <block type="debug" id="H[1dF{ved!t]@]g2qB9|"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text" id="pKWK-/qYaEKX]1)KTTbL"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="yiiw~5f+nx5w?K7^{]]]"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="4;[A-J8r:t6DJa`,L^X0"> <field name="TEXT">Interval Kueche gestartet. </field> </block> </value> <value name="ADD1"> <block type="text" id="K0^XK|:$Od1r-XfPNQiQ"> <field name="TEXT">Der Wert von bri ist: </field> </block> </value> <value name="ADD2"> <block type="get_value_var" id="Cbo|No=@lMa|T9;u1b0{"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="eVRjKG+OinA7].~9OX;G"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> </block> </value> </block> </value> </block> </next> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="`OYWq]o8YWI0RA)$0vd$"> <field name="NAME">Intervall</field> <next> <block type="debug" id="yI{#,$[w4sSQb4$,!flq"> <field name="Severity">warn</field> <value name="TEXT"> <shadow type="text"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="xEyYoMGlT,JGNHcP]/1M"> <mutation items="3"></mutation> <value name="ADD0"> <block type="text" id="ID@s6b@1Z0~c^5tAJyMl"> <field name="TEXT">Das Licht in der Küche war für </field> </block> </value> <value name="ADD1"> <block type="procedures_callcustomreturn" id="H09rTE~e-~eAQL-{ia/l"> <mutation name="sec2string"> <arg name="s"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="TMK@?HrS6WCY?WeVv8o,"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> </block> </value> </block> </value> <value name="ADD2"> <block type="text" id="DbVAxZm(X?CV%$7d#[Dn"> <field name="TEXT"> eingeschaltet.</field> </block> </value> </block> </value> <next> <block type="variables_set" id="qp$k(`+r=)fg!`{-s`cj"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="|4.1@jPli@YP_NO7,HSk"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id=";_1+?A#3w_u2L]X@Br_;" x="813" y="-37"> <mutation statements="false"> <arg name="s" varid="Fj?b^GiMZ`!yB^^;6JeN"></arg> </mutation> <field name="NAME">sec2string</field> <field name="SCRIPT">cmV0dXJuIGZvcm1hdERhdGUoMTAwMCAqIHMsICdoOm1tOnNzJyk7</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
-
@dslraser das ist eine statische Anzeige am Ende, nachdem das Licht wieder aus ist, richtig? Ich bekomme bei 4 Minuten Licht an eine Debugmeldung, dass das Licht 0:11:12 eingeschaltet war. Das stimmt nicht. Wo ist da wohl der Haken? Hast Du noch eine Idee für einen laufenden Timer, der sich sekündlich aktualisiert? Die zaehler-Variable kann ich ja nicht an die VIS übergeben, oder gibt es da doch ne Möglichkeit?
-
@hinsen2k sagte: laufenden Timer, der sich sekündlich aktualisiert?
Im Intervall in einen Datenpunkt für Vis schreiben:
-
@hinsen2k
ich habe mir mal 2 Datenpunkte zusätzlich gemacht.{ "_id": "0_userdata.0.Licht.Kueche.Einschaltdauer", "type": "state", "common": { "name": "Licht Kueche eingeschaltet seit...", "role": "text", "type": "string", "read": true, "write": false, "def": "0:00:00" }, "native": {}, "from": "system.adapter.admin.0", "user": "system.user.admin", "ts": 1632058900895, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }
{ "_id": "0_userdata.0.Licht.Kueche.letzte_Einschaltdauer", "type": "state", "common": { "name": "Licht Kueche letzte Einschaltdauer", "role": "text", "type": "string", "read": true, "write": false, "def": "0:00:00" }, "native": {}, "from": "system.adapter.admin.0", "user": "system.user.admin", "ts": 1632058900895, "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } }
Aber mit dem Intervall stimmt bei mir was noch nicht, das stoppt nicht immer zuverlässig, bzw. bri geht nicht immer direkt auf 0, das kann aber auch am Polling der HUE Bridge liegen. Ich probiere auch erst noch...
-
@dslraser stimmt...mit dem zaehler-Intervall stimmt was nicht. Der zählt zu schnell. 2 Sekunden in einer - zumindest ungefähr. Ärgerlich...in einer meiner vorheriger Timer Versionen hatte ich schon passende Zahlen.
-
keine Ahnung was los war, aber es läuft jetzt bei mir, obwohl ich nur das Blockly neu gestartet habe.
@paul53 siehst Du da noch einen Fehler, oder sollte das so passen ?
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="p]Q_9:^{p7_mr,W/%`1v">idLicht_Einschaltdauer</variable> <variable id="Fj?b^GiMZ`!yB^^;6JeN">s</variable> <variable id=":r5GqANK%Ej~131I)--3">idLicht_letzte_Einschaltdauer</variable> <variable id="{OcV;9JI[AK?VB^,6ay*">zaehler</variable> <variable id="=C.#MjA5Hx+2SR[8~+%V">idBri</variable> <variable id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</variable> <variable id="56jVkfRg7_;=([T5D@.(">idPRESENCE</variable> <variable id="2@A~O+K{.tV3zS;N`qAB">HUE_command</variable> <variable type="interval" id="Intervall">Intervall</variable> </variables> <block type="variables_set" id=",bx.3cM[,_8V[YvmD2Sb" x="13" y="-113"> <field name="VAR" id="p]Q_9:^{p7_mr,W/%`1v">idLicht_Einschaltdauer</field> <value name="VALUE"> <block type="field_oid" id="-=.BvR8stZdG8=MnsQ.R"> <field name="oid">0_userdata.0.Licht.Kueche.Einschaltdauer</field> </block> </value> <next> <block type="variables_set" id="6L-`{Q+yW^Q[?`xNY/pJ"> <field name="VAR" id=":r5GqANK%Ej~131I)--3">idLicht_letzte_Einschaltdauer</field> <value name="VALUE"> <block type="field_oid" id="Ip^#H6aRCS-xvtWWR!^C"> <field name="oid">0_userdata.0.Licht.Kueche.letzte_Einschaltdauer</field> </block> </value> <next> <block type="variables_set" id="CSo7=}pqPg@Q3ZAgjZny"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="ev]Qo2PRH7pm|7Z@MSdG"> <field name="NUM">0</field> </block> </value> <next> <block type="variables_set" id="$syTrXc/u:Kjh|6nGcmE"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> <value name="VALUE"> <block type="field_oid" id="{h*JQ-(=4N%VeeRU8SR{"> <field name="oid">hue.0.Küchenlampe.bri</field> </block> </value> <next> <block type="variables_set" id="GQmh|l;7~*pG}:S?~7^r"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> <value name="VALUE"> <block type="field_oid" id="K^@T*?Me;9*2Tkr{[mh#"> <field name="oid">hue.0.Küchenlampe.command</field> </block> </value> <next> <block type="variables_set" id="81IoUR6={LX+_w]n,kta"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> <value name="VALUE"> <block type="field_oid" id="MIY|+n}Ohw$2qK[k|nx^"> <field name="oid">hm-rpc.0.000C18A996B41F.1.PRESENCE_DETECTION_STATE</field> </block> </value> <next> <block type="control_ex" id="fLc1Q,{9n.tqgKsC%mg{" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="tE=s,5OJu+lDuMF9BWZ`"> <field name="VAR" id="p]Q_9:^{p7_mr,W/%`1v">idLicht_Einschaltdauer</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean"> <field name="BOOL">TRUE</field> </shadow> <block type="text" id="z5+B$(D=ja?hy_p8bcNv"> <field name="TEXT">0:00:00</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="u7rG;7:?l(zw^a]GEHYQ"> <field name="NUM">0</field> </shadow> </value> <next> <block type="on_ext" id=".*n{}kLu_EYHqWfSKNO9"> <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="}88$?|!MiHehDltyR=+y"> <field name="oid">default</field> </shadow> <block type="variables_get" id="hm_7vV!GL.;4#/``id9K"> <field name="VAR" id="56jVkfRg7_;=([T5D@.(">idPRESENCE</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="1*=gPs[40,=!N_0hRWc`"> <mutation else="1"></mutation> <value name="IF0"> <block type="on_source" id="^5^qPS28Y:-wsVZwWvxU"> <field name="ATTR">state.val</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="WpBEaYZB0n9:9u)er:pI"> <mutation elseif="1" else="1"></mutation> <value name="IF0"> <block type="time_compare_ex" id="qBw?hLwW:r[pq_^(K|.|"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text" id="yteJQNfl1*r!1Rlf=A9:"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id=";w|LeCq`5=RJjGci]jD*"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text" id="myBO9xgsi6VvFqHA1Wr%"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="qLYSb,JaJD|nTwX4LO^1"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="AaOsctCq6uDCy%}L=vVM"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="P|1@(GY)VnU.qH;Am(=7"> <field name="TEXT">{"on":true,"bri":254,"transitiontime":100}</field> </block> </value> </block> </statement> <value name="IF1"> <block type="time_compare_ex" id="d6fQytsi2Nsr6V1AzFF2"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true" actual_time="true"></mutation> <field name="USE_ACTUAL_TIME">TRUE</field> <field name="OPTION">between</field> <value name="START_TIME"> <shadow type="text"> <field name="TEXT">12:00</field> </shadow> <block type="time_astro" id="X1rS1Nd/Zuz8HZFJu0*A"> <field name="TYPE">dawn</field> <field name="OFFSET">0</field> </block> </value> <value name="END_TIME"> <shadow type="text"> <field name="TEXT">18:00</field> </shadow> <block type="time_astro" id="O--5yLhi;P=K)?e#h|S}"> <field name="TYPE">nauticalDusk</field> <field name="OFFSET">0</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="o-fM]-k5$T:m#dNFyYu)"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="V=-_HT-M*}hXbK5Zz2:["> <field name="TEXT">{"on":true,"bri":120,"transitiontime":100}</field> </block> </value> </block> </statement> <statement name="ELSE"> <block type="variables_set" id="Oz7fq-F+O@c}V[NY%2DY"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="gGupMQQz1#T$t=YL;e@U"> <field name="TEXT">{"on":true,"bri":10,"transitiontime":50}</field> </block> </value> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="variables_set" id=",H!vbhEivaCe^vw0[UKi"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> <value name="VALUE"> <block type="text" id="Az6HQwwrxgR.SQWFG5)1"> <field name="TEXT">{"on":false,"bri":0,"transitiontime":100}</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="T?J!H$p.VDfAmZ6d8-7u"> <value name="IF0"> <block type="logic_compare" id="RgQ*U2XgU=+sUqm)jj3W"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="|U:sCp-Cnn_~tKC}K!),"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="B"> <block type="get_value_var" id="|~]+?LU3k!!?a#$wIno7"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="FvsZ~:xA-0WGv1?rVoWM"> <field name="TEXT"></field> </shadow> <block type="variables_get" id="^0hysL4wSLTwF{EKcun$"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> </block> </value> </block> </value> <statement name="DO0"> <block type="control_ex" id="6zxVMf[6sS;BBuOgvJ*{" inline="true"> <field name="TYPE">false</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="A#_aF,$?fY1-ek]a*J=h"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="0q#m[E|X0[?rJ./V9tv2"> <field name="VAR" id="R[Tme+A4^8]zgN@T9eGi">idHUE_command</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="6pN|=hPQU^6D;3xGg])4"> <field name="BOOL">TRUE</field> </shadow> <block type="variables_get" id="U:x3qE`$08H)#4+xUDTa"> <field name="VAR" id="2@A~O+K{.tV3zS;N`qAB">HUE_command</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="Ga{l)Eq]hZV.SF``:)gM"> <field name="NUM">0</field> </shadow> </value> </block> </statement> </block> </next> </block> </statement> <next> <block type="on_ext" id="Yf[w@OIVV/#hkZHY~sAm"> <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="w6l2B;m6E^2rD8pvp1jz"> <field name="oid">default</field> </shadow> <block type="variables_get" id="L[uz0A,8GP4mcuf%DAe2"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> <statement name="STATEMENT"> <block type="controls_if" id="g==GuTnIZb`|lRGG`ZM5"> <mutation else="1"></mutation> <value name="IF0"> <block type="logic_compare" id="ef:-=UXYJy2:4[uS#@~2"> <field name="OP">NEQ</field> <value name="A"> <block type="get_value_var" id="-TE~VCq.ip^1FYpk@8cR"> <field name="ATTR">val</field> <value name="OID"> <shadow type="text" id="Y[3LbM(x^Xh*Xp|Eq#nK"> <field name="TEXT"></field> </shadow> <block type="variables_get" id=":OhK`clcF^yyJ#gZ%P=Z"> <field name="VAR" id="=C.#MjA5Hx+2SR[8~+%V">idBri</field> </block> </value> </block> </value> <value name="B"> <block type="math_number" id="Z|H$Sq3$*a~R)=dPeBIq"> <field name="NUM">0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="timeouts_setinterval" id="~F_s=Wf*]FL7_{}k^%OD"> <field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">sec</field> <statement name="STATEMENT"> <block type="math_change" id="6~OlY[q8VC@X:|jxDzu`"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="DELTA"> <shadow type="math_number" id="kh|G|Vj=nLzvt9YN2Y3P"> <field name="NUM">1</field> </shadow> </value> <next> <block type="control_ex" id="|qUBR7!y7YU!ZQQv14PC" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid" id="UCRPcfc(~SJ*-~2v197O"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="BAs]pv8jM?xm$ojU8_L5"> <field name="VAR" id="p]Q_9:^{p7_mr,W/%`1v">idLicht_Einschaltdauer</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="33f83ikZ4X?~IJ,RZ~dl"> <field name="BOOL">TRUE</field> </shadow> <block type="procedures_callcustomreturn" id="zs1uP7dC%p9@qx#X9uIi" inline="true"> <mutation name="sec2string"> <arg name="s"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="()0K]w6?1GChH6u`ZB5="> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="hBYn%e$vq7h#%kIO:,sz"> <field name="NUM">0</field> </shadow> </value> </block> </next> </block> </statement> </block> </statement> <statement name="ELSE"> <block type="timeouts_clearinterval" id="`OYWq]o8YWI0RA)$0vd$"> <field name="NAME">Intervall</field> <next> <block type="control_ex" id=",a$8A.qEVfCUlKqh~Xzk" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="|DE(?b#N7+W/0ZOt@C9w"> <field name="VAR" id=":r5GqANK%Ej~131I)--3">idLicht_letzte_Einschaltdauer</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="7#`88QrQL{dL[)L9W_LW"> <field name="BOOL">TRUE</field> </shadow> <block type="procedures_callcustomreturn" id="H09rTE~e-~eAQL-{ia/l" inline="true"> <mutation name="sec2string"> <arg name="s"></arg> </mutation> <value name="ARG0"> <block type="variables_get" id="TMK@?HrS6WCY?WeVv8o,"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> </block> </value> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="Sjc,M++AP)e4,OK9A8PD"> <field name="NUM">0</field> </shadow> </value> <next> <block type="control_ex" id="aMiW-z/%I.CuLA#,*|CI" inline="true"> <field name="TYPE">true</field> <field name="CLEAR_RUNNING">FALSE</field> <value name="OID"> <shadow type="field_oid"> <field name="oid">Object ID</field> </shadow> <block type="variables_get" id="YW)((OrQkiSL=hKN9CyY"> <field name="VAR" id="p]Q_9:^{p7_mr,W/%`1v">idLicht_Einschaltdauer</field> </block> </value> <value name="VALUE"> <shadow type="logic_boolean" id="@0ES5:;J3Y9t8VdvPj98"> <field name="BOOL">TRUE</field> </shadow> <block type="text" id="ZlL}e[e`gg?q|5MI?@Qm"> <field name="TEXT">0:00:00</field> </block> </value> <value name="DELAY_MS"> <shadow type="math_number" id="n_M4n`|RxOH(ktp|uO;:"> <field name="NUM">0</field> </shadow> </value> <next> <block type="variables_set" id="qp$k(`+r=)fg!`{-s`cj"> <field name="VAR" id="{OcV;9JI[AK?VB^,6ay*">zaehler</field> <value name="VALUE"> <block type="math_number" id="|4.1@jPli@YP_NO7,HSk"> <field name="NUM">0</field> </block> </value> </block> </next> </block> </next> </block> </next> </block> </statement> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> </next> </block> <block type="procedures_defcustomreturn" id=";_1+?A#3w_u2L]X@Br_;" x="687" y="-112"> <mutation statements="false"> <arg name="s" varid="Fj?b^GiMZ`!yB^^;6JeN"></arg> </mutation> <field name="NAME">sec2string</field> <field name="SCRIPT">cmV0dXJuIGZvcm1hdERhdGUoMTAwMCAqIHMsICdoOm1tOnNzJyk7</field> <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment> </block> </xml>
-
@dslraser sagte: siehst Du da noch einen Fehler, oder sollte das so passen ?
Es werden mehrere Intervalle gestartet, die sich dann nicht mehr stoppen lassen. Das muss verhindert werden: