NEWS
Steuerung Poolpumpe
-
Nimm die beiden Böcke aus dem 5-Minuten-Zeitplan raus und lösche dann den 5-Minuten-Zeitplan !
-
Auch versuch ohne Erfolg
Kann es sein, dass das Problem bei den in der Liste "uhrzeit" nimm das "x". Element "X" ist ein Mathematik Block?
7208_1.png -
Auch versuch ohne Erfolg
Kann es sein, dass das Problem bei den in der Liste "uhrzeit" nimm das "x". Element "X" ist ein Mathematik Block? `
Nein, das ist korrekt.Gehe mal auf "Zeige Code" und poste den Javascript-Code ohne die letzte Zeile in Code tags.
-
Auch versuch ohne Erfolg
Kann es sein, dass das Problem bei den in der Liste "uhrzeit" nimm das "x". Element "X" ist ein Mathematik Block? `
Nein, das ist korrekt.Gehe mal auf "Zeige Code" und poste den Javascript-Code ohne die letzte Zeile in Code tags. `
! ````
<xml xmlns="http://www.w3.org/1999/xhtml"><block type="on_ext" id="Ho}{E7]v|11A@#,,{R;X" x="-337" y="238"><mutation items="1"></mutation>
<field name="CONDITION">ne</field><value name="OID0"><shadow type="field_oid" id=":q5=lHsO](F;AWud(hn5"><field name="oid">javascript.0.Pool.Filteranlage.Startzeit_1</field></shadow></value> <statement name="STATEMENT"><block type="variables_set" id=":TM{I_9V?m1Ee_.hPN{H"><field name="VAR">uhrzeit</field> <value name="VALUE"><block type="lists_split" id=",ZR]bZp7s68icCbFu}r{"><mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"><block type="variables_get" id="a,4v0{aljbRgEH~[lV1g"><field name="VAR">Wert</field></block></value> <value name="DELIM"><shadow type="text" id="Z_uEO+Fh)/BJmRl[klKf"><field name="TEXT">:</field></shadow> <block type="text" id="EK0BSe78ZX-?A2~fDl8{"><field name="TEXT">:</field></block></value></block></value> <next><block type="schedule_clear" id="9KnW0{[3G~MIYO?l8f?f"><field name="NAME">schedule</field> <next><block type="schedule_create" id="wCivpX31v44lJw7_xJDu"><field name="NAME">schedule</field> <value name="SCHEDULE"><shadow type="field_cron" id="+8y!j8q]Sur^hPyYtgi%"><field name="CRON">* * * * *</field></shadow> <block type="cron_builder" id="^UHwrC*c(v|w]C-+#GkF"><mutation seconds="false" as_line="false"></mutation> <field name="LINE">FALSE</field> <field name="WITH_SECONDS">FALSE</field> <value name="DOW"><shadow type="text" id="k+`0Up{NX:8#}^/@./N5"><field name="TEXT">*</field></shadow></value> <value name="MONTHS"><shadow type="text" id="ewTOM~F/WOLpE-a0lnUL"><field name="TEXT">*</field></shadow></value> <value name="DAYS"><shadow type="text" id="w,T#?S|GH8/Xf6XudwO("><field name="TEXT">*</field></shadow></value> <value name="HOURS"><shadow type="text" id="j309ka}l3JS9(WQTbwRH"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="jMrWMISH#4TF1wTzs4pv"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id=".(30DCd,DMb:?A_6HyOd"><field name="VAR">uhrzeit</field></block></value> <value name="AT"><block type="math_number" id="Gl}%9i=g-b)xymxGs4iC"><field name="NUM">1</field></block></value></block></value> <value name="MINUTES"><shadow type="text" id="F|J7hB8y*-y{mO8it;7A"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="g./,PD`-SgU8u.FSm)u4"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="wbp}06P,).t[ZUoj!(h1"><field name="VAR">uhrzeit</field></block></value> <value name="AT"><block type="math_number" id="e[|}CD;gH`11o-@dHS|L"><field name="NUM">2</field></block></value></block></value></block></value> <statement name="STATEMENT"><block type="controls_if" id="%^~t=c|M8s.h8g/J}wgQ"><value name="IF0"><block type="logic_compare" id="UQety?LU4%o.,Bb!QerE"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="tZsLmoA54T2U[FT@lqol"><field name="ATTR">val</field> <field name="OID">javascript.0.Pool.Filteranlage.Automatik_an_aus</field></block></value> <value name="B"><block type="logic_boolean" id="kn1R#)VS,DPaw%{%+#;4"><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO0"><block type="variables_set" id="`7)^4Io3e`Zrq-kGd~Qj"><field name="VAR">cnt</field> <value name="VALUE"><block type="math_number" id="1Kj|oil3plRrR]s0NPd)"><field name="NUM">0</field></block></value> <next><block type="control" id="ben}AEk{jucTv9a4]l/K"><mutation delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT200_087610446720.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="dJp+,[-fIDuMe_YQo,ox"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_setinterval" id="/[Nu7w?[nEsQGqozYz=m"><field name="NAME">Intervall</field> <field name="INTERVAL">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="math_change" id="r~n}#k],X4[F]!,n_)=_"><field name="VAR">cnt</field> <value name="DELTA"><shadow type="math_number" id="C}F]WEMTQ~EhL[0o8ih|"><field name="NUM">1</field></shadow></value> <next><block type="controls_if" id="xB!NUsb#R5BJqkLe0]|9"><value name="IF0"><block type="logic_compare" id="/1i(aPh}KZRqi^qOI#t3"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="]v},qw4o{KvMdFdL6+*}"><field name="VAR">cnt</field></block></value> <value name="B"><block type="get_value" id="IBU)^98k6^Tb~ECDm37q"><field name="ATTR">val</field> <field name="OID">javascript.0.Pool.Filteranlage.Laufzeit_1</field></block></value></block></value> <statement name="DO0"><block type="control" id="U*oxjrCm~3MpaX.crkAy"><mutation delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT200_087610446720.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="(JNXSu!TbE3*?sYQ+eSy"><field name="BOOL">FALSE</field></block></value> <next><block type="timeouts_clearinterval" id="?jnoAd7epof4w?49i/7K"><field name="NAME">Intervall</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement></block>
<block type="on_ext" id="tzEakSYvsczBQKTDZ*#H" x="438" y="237"><mutation items="1"></mutation>
<field name="CONDITION">ne</field><value name="OID0"><shadow type="field_oid" id="b];8{DmYj]w|gNQv=w,2"><field name="oid">javascript.0.Pool.Filteranlage.Startzeit_2</field></shadow></value> <statement name="STATEMENT"><block type="variables_set" id=",S;J8_Zn={+~=0T)FtnH"><field name="VAR">uhrzeit2</field> <value name="VALUE"><block type="lists_split" id="f,p24^vaq7ACQ(30=^Yx"><mutation mode="SPLIT"></mutation> <field name="MODE">SPLIT</field> <value name="INPUT"><block type="variables_get" id="(OX63@E;DTci{r{(`#|q"><field name="VAR">Wert</field></block></value> <value name="DELIM"><shadow type="text" id="Z_uEO+Fh)/BJmRl[klKf"><field name="TEXT">:</field></shadow> <block type="text" id="^)3qEBA)f8,^4!F,+28:"><field name="TEXT">:</field></block></value></block></value> <next><block type="schedule_clear" id="{V|FbXQ{(rj.j1bU(|Su"><field name="NAME">schedule2</field> <next><block type="schedule_create" id="3Me4AcS^}8KXC)SX:?^J"><field name="NAME">schedule2</field> <value name="SCHEDULE"><shadow type="field_cron" id="+8y!j8q]Sur^hPyYtgi%"><field name="CRON">* * * * *</field></shadow> <block type="cron_builder" id="p~d##YJBzxZ[Oe}k@rUn"><mutation seconds="false" as_line="false"></mutation> <field name="LINE">FALSE</field> <field name="WITH_SECONDS">FALSE</field> <value name="DOW"><shadow type="text" id="os?i*i*Xk-Z{9)Q^k,8o"><field name="TEXT">*</field></shadow></value> <value name="MONTHS"><shadow type="text" id="z_YotHQUg:!EQjBCL%*b"><field name="TEXT">*</field></shadow></value> <value name="DAYS"><shadow type="text" id="P4YD,5]m3Sw*i=fw;0aw"><field name="TEXT">*</field></shadow></value> <value name="HOURS"><shadow type="text" id="+]);N_B:0lC*+,!zT],4"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="eQO9RUa89Yaoy%#fzUdJ"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="M;le9OQQd;Z.%x/LC^3]"><field name="VAR">uhrzeit2</field></block></value> <value name="AT"><block type="math_number" id="DJI4!uu1/9!WROzf+7e}"><field name="NUM">1</field></block></value></block></value> <value name="MINUTES"><shadow type="text" id="qH/DZyR_*_lg*L*:|uEC"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="H_kg+B7w]d{wo}U!a6|%"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="F9P*b,`pOXA8a!=-ZA!?"><field name="VAR">uhrzeit2</field></block></value> <value name="AT"><block type="math_number" id="65b0xa{ifhW(@QjmGzeO"><field name="NUM">2</field></block></value></block></value></block></value> <statement name="STATEMENT"><block type="controls_if" id="/~-#8xq~{1hw,CPypwWY"><value name="IF0"><block type="logic_compare" id="sbT~+5Py)d:Sg3!{^d:G"><field name="OP">EQ</field> <value name="A"><block type="get_value" id="/guqKmfGo[qUc;?oQZoC"><field name="ATTR">val</field> <field name="OID">javascript.0.Pool.Filteranlage.Automatik_an_aus</field></block></value> <value name="B"><block type="logic_boolean" id="drW]vr[bm45cG)H*P3J*"><field name="BOOL">TRUE</field></block></value></block></value> <statement name="DO0"><block type="variables_set" id="Bk%G[nETvPp.*;[jkJwb"><field name="VAR">cnt1</field> <value name="VALUE"><block type="math_number" id=":OQyJiPaj{f49C0bDhO#"><field name="NUM">0</field></block></value> <next><block type="control" id="JNd/uAUOp;4An8ale=8S"><mutation delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT200_087610446720.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id=":Wl~-[W7C?+vLjl~4m:K"><field name="BOOL">TRUE</field></block></value> <next><block type="timeouts_setinterval" id="Jo,9{RFHlwHB7c:hsm]w"><field name="NAME">Intervall2</field> <field name="INTERVAL">1</field> <field name="UNIT">min</field> <statement name="STATEMENT"><block type="math_change" id="GOO~-!Wv-*`BG6lpQ(js"><field name="VAR">cnt1</field> <value name="DELTA"><shadow type="math_number" id="?v%)-9T?:)2^S)qrM~,*"><field name="NUM">1</field></shadow></value> <next><block type="controls_if" id="/.RfPCKQDpMj~(h550|j"><value name="IF0"><block type="logic_compare" id="4=rUb=SED~!1@^rN9ppx"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="94n=MgN@*p={Nf|5%Ef2"><field name="VAR">cnt1</field></block></value> <value name="B"><block type="get_value" id="wj~sm?xxSPsu~AI|v_Jd"><field name="ATTR">val</field> <field name="OID">javascript.0.Pool.Filteranlage.Laufzeit_2</field></block></value></block></value> <statement name="DO0"><block type="control" id="8B3Bd*XF*,:C30c2jN}-"><mutation delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT200_087610446720.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="-w6Q@}l15W3/H@{@-]Su"><field name="BOOL">FALSE</field></block></value> <next><block type="timeouts_clearinterval" id="tr!(S]0g/n3)9|aLn9-N"><field name="NAME">Intervall</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement></block></xml>
Hier mal der Log 19:18:10.338 [info] javascript.0 Stop script script.js.common.Pool.Filterpumpe 19:18:10.358 [info] javascript.0 Start javascript script.js.common.Pool.Filterpumpe 19:18:10.358 [info] javascript.0 script.js.common.Pool.Filterpumpe: registered 0 subscriptions and 1 schedule 19:24:33.834 [info] javascript.0 Stop script script.js.common.Pool.Filterpumpe 19:24:33.854 [info] javascript.0 Start javascript script.js.common.Pool.Filterpumpe 19:24:33.854 [info] javascript.0 script.js.common.Pool.Filterpumpe: registered 2 subscriptions and 0 schedules 19:39:09.283 [error] javascript.0 at Object. (script.js.common.Pool.Filterpumpe:7:18)
-
Ich habe an 3 Stellen geändert:
-
zweimal Wert: geändert von Variable in Datenpunkt-Eigenschaft
-
stop zyklische Ausführung Intervall2: im 2. Block
! ````
<block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="tzEakSYvsczBQKTDZ*#H" x="488" y="238"><mutation items="1"></mutation>
<field name="CONDITION">ne</field><value name="OID0"><shadow type="field_oid" id="b];8{DmYj]w|gNQv=w,2"><field name="oid">javascript.0.Pool.Filteranlage.Startzeit_2</field></shadow></value>
<statement name="STATEMENT"><block type="variables_set" id=",S;J8_Zn={+~=0T)FtnH"><field name="VAR">uhrzeit</field>
<value name="VALUE"><block type="lists_split" id="f,p24^vaq7ACQ(30=^Yx"><mutation mode="SPLIT"></mutation>
<field name="MODE">SPLIT</field>
<value name="INPUT"><block type="on_source" id="0HGo.JkI^mkRAU#i*e4"><field name="ATTR">state.val</field></block></value> <value name="DELIM"><shadow type="text" id="Z_uEO+Fh)/BJmRl[klKf"><field name="TEXT">:</field></shadow> <block type="text" id="^)3qEBA)f8,^4!F,+28:"><field name="TEXT">:</field></block></value></block></value> <next><block type="schedule_clear" id="{V|FbXQ{(rj.j1bU(|Su"><field name="NAME">schedule2</field> <next><block type="schedule_create" id="3Me4AcS^}8KXC)SX:?^J"><field name="NAME">schedule2</field> <value name="SCHEDULE"><shadow type="field_cron" id="+8y!j8q]Sur^hPyYtgi%"><field name="CRON">* * * * *</field></shadow> <block type="cron_builder" id="p~d##YJBzxZ[Oe}k@rUn"><mutation seconds="false" as_line="false"></mutation> <field name="LINE">FALSE</field> <field name="WITH_SECONDS">FALSE</field> <value name="DOW"><shadow type="text" id="os?i*i*Xk-Z{9)Q^k,8o"><field name="TEXT">*</field></shadow></value> <value name="MONTHS"><shadow type="text" id="z_YotHQUg:!EQjBCL%*b"><field name="TEXT">*</field></shadow></value> <value name="DAYS"><shadow type="text" id="P4YD,5]m3Sw*i=fw;0aw"><field name="TEXT">*</field></shadow></value> <value name="HOURS"><shadow type="text" id="y^toRZqL/!F:IrwUX~P5"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="eQO9RUa89Yaoy%#fzUdJ"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="M;le9OQQd;Z.%x/LC^3]"><field name="VAR">uhrzeit</field></block></value> <value name="AT"><block type="math_number" id="DJI4!uu1/9!WROzf+7e}"><field name="NUM">1</field></block></value></block></value> <value name="MINUTES"><shadow type="text" id="*XJ_AGS|ga_k?kCmlZ9g"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="H_kg+B7w]d{wo}U!a6|%"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="F9P*b,
pOXA8a!=-ZA!?"><field name="VAR">uhrzeit</field></block></value>
<value name="AT"><block type="math_number" id="65b0xa{ifhW(@QjmGzeO"><field name="NUM">2</field></block></value></block></value></block></value>
<statement name="STATEMENT"><block type="controls_if" id="/~-#8xq~{1hw,CPypwWY"><value name="IF0"><block type="logic_compare" id="sbT~+5Py)d:Sg3!{^d:G"><field name="OP">EQ</field>
<value name="A"><block type="get_value" id="/guqKmfGo[qUc;?oQZoC"><field name="ATTR">val</field>
<field name="OID">javascript.0.Pool.Filteranlage.Automatik_an_aus</field></block></value>
<value name="B"><block type="logic_boolean" id="drW]vr[bm45cG)HP3J"><field name="BOOL">TRUE</field></block></value></block></value>
<statement name="DO0"><block type="variables_set" id="Bk%G[nETvPp.;[jkJwb"><field name="VAR">cnt1</field>
<value name="VALUE"><block type="math_number" id=":OQyJiPaj{f49C0bDhO#"><field name="NUM">0</field></block></value>
<next><block type="control" id="JNd/uAUOp;4An8ale=8S"><mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.DECT200_087610446720.state</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE"><block type="logic_boolean" id=":Wl~-[W7C?+vLjl~4m:K"><field name="BOOL">TRUE</field></block></value>
<next><block type="timeouts_setinterval" id="Jo,9{RFHlwHB7c:hsm]w"><field name="NAME">Intervall2</field>
<field name="INTERVAL">1</field>
<field name="UNIT">min</field>
<statement name="STATEMENT"><block type="math_change" id="GOO~-!Wv-`BG6lpQ(js"><field name="VAR">cnt1</field>
<value name="DELTA"><shadow type="math_number" id="?v%)-9T?:)2^S)qrM~,"><field name="NUM">1</field></shadow></value>
<next><block type="controls_if" id="/.RfPCKQDpMj~(h550|j"><value name="IF0"><block type="logic_compare" id="4=rUb=SED~!1@^rN9ppx"><field name="OP">EQ</field>
<value name="A"><block type="variables_get" id="94n=MgN@p={Nf|5%Ef2"><field name="VAR">cnt1</field></block></value>
<value name="B"><block type="get_value" id="wj~sm?xxSPsu~AI|v_Jd"><field name="ATTR">val</field>
<field name="OID">javascript.0.Pool.Filteranlage.Laufzeit_2</field></block></value></block></value>
<statement name="DO0"><block type="control" id="8B3BdXF,:C30c2jN}-"><mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.DECT200_087610446720.state</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE"><block type="logic_boolean" id="-w6Q@}l15W3/H@{@-]Su"><field name="BOOL">FALSE</field></block></value>
<next><block type="timeouts_clearinterval" id="tr!(S]0g/n3)9|aLn9-N"><field name="NAME">Intervall2</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement></block> -
-
Ich habe an 3 Stellen geändert:
-
zweimal Wert: geändert von Variable in Datenpunkt-Eigenschaft
-
stop zyklische Ausführung Intervall2: im 2. Block `
leider funktioniert es immer noch nicht
er will einfach meine pumpe nicht anmachen
-
-
Damit das Schedule gesetzt wird, muss die Startzeit einmal verändert werden, da ohne diese Änderung nicht getriggert wird. `
Diese Änderung der Startzeit muss nach dem Starten des Skriptes erfolgen ! -
ja das ist mir klar, ich ändere ja auch die Zeit um zu Testen ob es geht immer so um 5min der aktuellen Zeit
-
Dann bau mal ein Log ein.
-
Wo sehe ich den Debug dann bis jetzt wurde nix ausgegeben
-
Wo sehe ich den Debug `
Im Reiter "Log" sollte zum Zeitpunkt der Änderung die Uhrzeit (Startzeit) erscheinen. -
So siehtr der Log ich jetzt… Die Zeit wird erstellt
javascript.0 2018-06-12 20:52:15.304 info script.js.common.Pool.Filterpumpe: schedule(cron=55 20 * * *)
javascript.0 2018-06-12 20:52:15.303 info script.js.common.Pool.Filterpumpe: 20:55
javascript.0 2018-06-12 18:46:51.298 info script.js.common.Pool.Filterpumpe: registered 2 subscriptions and 0 schedules
javascript.0 2018-06-12 18:46:51.297 info script.js.common.Pool.Filterpumpe: subscribe: {"pattern":{"id":"javascript.0.Pool.Filteranlage.Startzeit_2","change":"ne"},"name":"script.js.common.Pool.Filterpumpe"}
javascript.0 2018-06-12 18:46:51.297 info script.js.common.Pool.Filterpumpe: subscribe: {"pattern":{"id":"javascript.0.Pool.Filteranlage.Startzeit_1","change":"ne"},"name":"script.js.common.Pool.Filterpumpe"}
javascript.0 2018-06-12 18:46:51.281 info Start javascript script.js.common.Pool.Filterpumpe
javascript.0 2018-06-12 18:46:51.276 info Stop script script.js.common.Pool.Filterpumpe
javascript.0 2018-06-12 18:46:05.942 info script.js.common.Pool.Filterpumpe: 20:50
javascript.0 2018-06-12 18:45:54.851 info script.js.common.Pool.Filterpumpe: registered 2 subscriptions and 0 schedules
javascript.0 2018-06-12 18:45:54.836 info Start javascript script.js.common.Pool.Filterpumpe
javascript.0 2018-06-12 18:45:53.099 info Stop script script.js.common.Pool.Filterpumpe
javascript.0 2018-06-12 18:45:51.073 info script.js.common.Pool.Filterpumpe: registered 2 subscriptions and 0 schedules
javascript.0 2018-06-12 18:45:51.058 info Start javascript script.js.common.Pool.Filterpumpe
javascript.0 2018-06-12 18:45:51.053 info Stop script script.js.common.Pool.Filterpumpe
-
Habe mal getestet: Datenpunkt "Test.Schalter" (anstelle DECT) ging um 21:08 Uhr auf "Ein" (true) und um 21:10 Uhr auf "Aus" (false).
-
Da werde ich morgen noch mal das ganze versuchen und melde mich dann
bin nämlich auf Arbeit
Aber danke für die Hilfe
Gesendet von iPhone mit Tapatalk
-
Wenn das Schedule auch bei Skriptstart gesetzt werden soll, ohne dass man anschließend den Zeitpunkt ändern muss, pacck man das ganze in eine Funktion, die sowohl bei Skriptstart als auch bei Startzeitänderung aufgerufen wird. Beispiel für Schedule1:
-
Ich habe an 3 Stellen geändert:
-
zweimal Wert: geändert von Variable in Datenpunkt-Eigenschaft
-
stop zyklische Ausführung Intervall2: im 2. Block
! ````
<block xmlns="http://www.w3.org/1999/xhtml" type="on_ext" id="tzEakSYvsczBQKTDZ*#H" x="488" y="238"><mutation items="1"></mutation>
<field name="CONDITION">ne</field><value name="OID0"><shadow type="field_oid" id="b];8{DmYj]w|gNQv=w,2"><field name="oid">javascript.0.Pool.Filteranlage.Startzeit_2</field></shadow></value>
<statement name="STATEMENT"><block type="variables_set" id=",S;J8_Zn={+~=0T)FtnH"><field name="VAR">uhrzeit</field>
<value name="VALUE"><block type="lists_split" id="f,p24^vaq7ACQ(30=^Yx"><mutation mode="SPLIT"></mutation>
<field name="MODE">SPLIT</field>
<value name="INPUT"><block type="on_source" id="0HGo.JkI^mkRAU#i*e4"><field name="ATTR">state.val</field></block></value> <value name="DELIM"><shadow type="text" id="Z_uEO+Fh)/BJmRl[klKf"><field name="TEXT">:</field></shadow> <block type="text" id="^)3qEBA)f8,^4!F,+28:"><field name="TEXT">:</field></block></value></block></value> <next><block type="schedule_clear" id="{V|FbXQ{(rj.j1bU(|Su"><field name="NAME">schedule2</field> <next><block type="schedule_create" id="3Me4AcS^}8KXC)SX:?^J"><field name="NAME">schedule2</field> <value name="SCHEDULE"><shadow type="field_cron" id="+8y!j8q]Sur^hPyYtgi%"><field name="CRON">* * * * *</field></shadow> <block type="cron_builder" id="p~d##YJBzxZ[Oe}k@rUn"><mutation seconds="false" as_line="false"></mutation> <field name="LINE">FALSE</field> <field name="WITH_SECONDS">FALSE</field> <value name="DOW"><shadow type="text" id="os?i*i*Xk-Z{9)Q^k,8o"><field name="TEXT">*</field></shadow></value> <value name="MONTHS"><shadow type="text" id="z_YotHQUg:!EQjBCL%*b"><field name="TEXT">*</field></shadow></value> <value name="DAYS"><shadow type="text" id="P4YD,5]m3Sw*i=fw;0aw"><field name="TEXT">*</field></shadow></value> <value name="HOURS"><shadow type="text" id="y^toRZqL/!F:IrwUX~P5"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="eQO9RUa89Yaoy%#fzUdJ"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="M;le9OQQd;Z.%x/LC^3]"><field name="VAR">uhrzeit</field></block></value> <value name="AT"><block type="math_number" id="DJI4!uu1/9!WROzf+7e}"><field name="NUM">1</field></block></value></block></value> <value name="MINUTES"><shadow type="text" id="*XJ_AGS|ga_k?kCmlZ9g"><field name="TEXT">*</field></shadow> <block type="lists_getIndex" id="H_kg+B7w]d{wo}U!a6|%"><mutation statement="false" at="true"></mutation> <field name="MODE">GET</field> <field name="WHERE">FROM_START</field> <value name="VALUE"><block type="variables_get" id="F9P*b,
pOXA8a!=-ZA!?"><field name="VAR">uhrzeit</field></block></value>
<value name="AT"><block type="math_number" id="65b0xa{ifhW(@QjmGzeO"><field name="NUM">2</field></block></value></block></value></block></value>
<statement name="STATEMENT"><block type="controls_if" id="/~-#8xq~{1hw,CPypwWY"><value name="IF0"><block type="logic_compare" id="sbT~+5Py)d:Sg3!{^d:G"><field name="OP">EQ</field>
<value name="A"><block type="get_value" id="/guqKmfGo[qUc;?oQZoC"><field name="ATTR">val</field>
<field name="OID">javascript.0.Pool.Filteranlage.Automatik_an_aus</field></block></value>
<value name="B"><block type="logic_boolean" id="drW]vr[bm45cG)HP3J"><field name="BOOL">TRUE</field></block></value></block></value>
<statement name="DO0"><block type="variables_set" id="Bk%G[nETvPp.;[jkJwb"><field name="VAR">cnt1</field>
<value name="VALUE"><block type="math_number" id=":OQyJiPaj{f49C0bDhO#"><field name="NUM">0</field></block></value>
<next><block type="control" id="JNd/uAUOp;4An8ale=8S"><mutation delay_input="false"></mutation>
<field name="OID">fritzdect.0.DECT200_087610446720.state</field>
<field name="WITH_DELAY">FALSE</field>
<value name="VALUE"><block type="logic_boolean" id=":Wl~-[W7C?+vLjl~4m:K"><field name="BOOL">TRUE</field></block></value>
<next><block type="timeouts_setinterval" id="Jo,9{RFHlwHB7c:hsm]w"><field name="NAME">Intervall2</field>
<field name="INTERVAL">1</field>
<field name="UNIT">min</field>
<statement name="STATEMENT"><block type="math_change" id="GOO~-!Wv-BG6lpQ(js"><field name="VAR">cnt1</field> <value name="DELTA"><shadow type="math_number" id="?v%)-9T?:)2^S)qrM~,*"><field name="NUM">1</field></shadow></value> <next><block type="controls_if" id="/.RfPCKQDpMj~(h550|j"><value name="IF0"><block type="logic_compare" id="4=rUb=SED~!1@^rN9ppx"><field name="OP">EQ</field> <value name="A"><block type="variables_get" id="94n=MgN@*p={Nf|5%Ef2"><field name="VAR">cnt1</field></block></value> <value name="B"><block type="get_value" id="wj~sm?xxSPsu~AI|v_Jd"><field name="ATTR">val</field> <field name="OID">javascript.0.Pool.Filteranlage.Laufzeit_2</field></block></value></block></value> <statement name="DO0"><block type="control" id="8B3Bd*XF*,:C30c2jN}-"><mutation delay_input="false"></mutation> <field name="OID">fritzdect.0.DECT200_087610446720.state</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"><block type="logic_boolean" id="-w6Q@}l15W3/H@{@-]Su"><field name="BOOL">FALSE</field></block></value> <next><block type="timeouts_clearinterval" id="tr!(S]0g/n3)9|aLn9-N"><field name="NAME">Intervall2</field></block></next></block></statement></block></next></block></statement></block></next></block></next></block></statement></block></statement></block></next></block></next></block></statement></block> ````
Ich habe zum Test ein neues Skript erstellt und nur diesen Teil eingefügt. Um zu versucht diesen zu Starten ohne Erfolg. Entwerder stimmt was mit meinem io nicht oder ich weiß auch nicht was ich falsch machen
-
-
Wird die Poolpumpe nicht eingeschaltet ? Dann teste bitte, ob es am Skript oder am Datenpunkt "Switch on/off" liegt, indem Du vor beide steuere Switch on/off einen Debug-Baustein einfügst (Texte z.B. "Pumpe ein" und "Pumpe aus").
-
Also er setzt die Zeit aber danach passiert nix mehr. Habe es auch mal mit eionem Datenpunbkt wie du versucht auch den schaltet er nicht.
7208_1.png
7208_2.png -
Poste bitte den Javascript-Code (nicht den Blockly-Export) ohne die letzte Zeile.
-
Bitte
! ````
var uhrzeit, schedule2, cnt1, Intervall2;
! on({id: 'javascript.0.Pool.Filteranlage.Startzeit_2', change: "ne"}, function (obj) {
var value = obj.state.val;
var oldValue = obj.oldState.val;
console.log((obj.state ? obj.state.val : ""));
uhrzeit = (obj.state ? obj.state.val : "").split(':');
(function () {if (schedule2) {clearSchedule(schedule2); schedule2 = null;}})();
schedule2 = schedule((uhrzeit[1]).trim() + ' ' + (uhrzeit[0]).trim() + ' ' + ''.trim() + ' ' + ''.trim() + ' ' + '*'.trim(), function () {
if (getState("javascript.0.Pool.Filteranlage.Automatik_an_aus").val == true) {
cnt1 = 0;
setState("fritzdect.0.DECT200_087610446720.state"/Switch on/off/, true);
console.log('Pumpe an');
Intervall2 = setInterval(function () {
cnt1 = (typeof cnt1 == 'number' ? cnt1 : 0) + 1;
if (cnt1 == getState("javascript.0.Pool.Filteranlage.Laufzeit_2").val) {
setState("fritzdect.0.DECT200_087610446720.state"/Switch on/off/, false);
(function () {if (Intervall2) {clearInterval(Intervall2); Intervall2 = null;}})();
}
console.log('Pumpe aus');
}, 60000);
}
});
});