NEWS
Außenbeleuchtungs Steuerung
-
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: Jetzt ist er konstant (0)
Dann gib mal manuell einen anderen Wert (1) ein.
Ich habe den LUX-Wert geändert, aber es passiert nichts. Meine Rollos sind nach oben gefahren.
-
@hicki sagte: es passiert nichts.
Poste bitte den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: es passiert nichts.
Poste bitte den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.
var licht; licht = getState("meross.0.2103167712159190845648e1e962ef89.2").val; on({id: 'hm-rpc.0.PEQ1447187.1.LUX', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; if (compareTime("6:00", "16:00", "between")) { if ((obj.state ? obj.state.val : "") < 900) { licht = true; } else if ((obj.state ? obj.state.val : "") > 1200) { licht = false; } } else if (compareTime("16:00", "null", ">") && (obj.state ? obj.state.val : "") < 900) { licht = true; } if (licht != getState("meross.0.2103167712159190845648e1e962ef89.2").val) { setState("meross.0.2103167712159190845648e1e962ef89.2"/*Außenbeleuchtung 2*/, licht); } }); schedule("0 3 * * *", async function () { setState("meross.0.2103167712159190845648e1e962ef89.2"/*Außenbeleuchtung 2*/, false); }); -
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: es passiert nichts.
Poste bitte den erzeugten Javascript-Code ohne die letzte Zeile in Code tags.
var licht; licht = getState("meross.0.2103167712159190845648e1e962ef89.2").val; on({id: 'hm-rpc.0.PEQ1447187.1.LUX', change: "ne"}, async function (obj) { var value = obj.state.val; var oldValue = obj.oldState.val; if (compareTime("6:00", "16:00", "between")) { if ((obj.state ? obj.state.val : "") < 900) { licht = true; } else if ((obj.state ? obj.state.val : "") > 1200) { licht = false; } } else if (compareTime("16:00", "null", ">") && (obj.state ? obj.state.val : "") < 900) { licht = true; } if (licht != getState("meross.0.2103167712159190845648e1e962ef89.2").val) { setState("meross.0.2103167712159190845648e1e962ef89.2"/*Außenbeleuchtung 2*/, licht); } }); schedule("0 3 * * *", async function () { setState("meross.0.2103167712159190845648e1e962ef89.2"/*Außenbeleuchtung 2*/, false); }); -
@hicki
Der Code ist in Ordnung. Bau mal eine Log-Ausgabe ein, um zu sehen, ob getriggert wird.
-
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: ist das richtig so?
Passt.
Der Meross-Aktor wird mit true/false gesteuert?ja
@hicki ```
2.12.2021, 23:15:43.690 [info ]: javascript.0 (418) Stop script script.js.Scripte_-Andreas.Test_2_3
2.12.2021, 23:15:43.693 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:15:43.699 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:16:54.533 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:19:17.041 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:20:03.651 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.653 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.659 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:20:23.689 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.480 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.482 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:21:25.302 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:24:23.060 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:29:35.332 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:31:49.840 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:33:49.851 [info ]: javascript.0 (418) script.js.Scripte-_Andreas.Test_2_3: Außenbeleuchtung:true -
@hicki ```
2.12.2021, 23:15:43.690 [info ]: javascript.0 (418) Stop script script.js.Scripte_-Andreas.Test_2_3
2.12.2021, 23:15:43.693 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:15:43.699 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:16:54.533 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:19:17.041 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:20:03.651 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.653 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.659 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:20:23.689 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.480 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.482 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:21:25.302 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:24:23.060 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:29:35.332 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:31:49.840 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:33:49.851 [info ]: javascript.0 (418) script.js.Scripte-_Andreas.Test_2_3: Außenbeleuchtung:true -
@hicki ```
2.12.2021, 23:15:43.690 [info ]: javascript.0 (418) Stop script script.js.Scripte_-Andreas.Test_2_3
2.12.2021, 23:15:43.693 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:15:43.699 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:16:54.533 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:19:17.041 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:20:03.651 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.653 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:03.659 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:20:23.689 [info ]: javascript.0 (418) Stop script script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.480 [info ]: javascript.0 (418) Start javascript script.js.Scripte-Andreas.Test_2_3
2.12.2021, 23:20:24.482 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: registered 1 subscription and 1 schedule
2.12.2021, 23:21:25.302 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:24:23.060 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:29:35.332 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:31:49.840 [info ]: javascript.0 (418) script.js.Scripte-Andreas.Test_2_3: Außenbeleuchtung:true
2.12.2021, 23:33:49.851 [info ]: javascript.0 (418) script.js.Scripte-_Andreas.Test_2_3: Außenbeleuchtung:true -
@hicki
Getriggert wird offenbar und die Variable licht ist true. Also sollte auch die Beleuchtung einschalten, wenn sie aus (false) ist. -
@hicki
Wenn das Licht aus ist, und ich ändere die Helligkeit am Sensor, dann schaltet sich das Licht ein, aber bei viel Licht nicht aus.
Ich habe mal den Zeit im Zeitplan geändert, um zu sehen ob ausgeschaltet wird, aber ohne Erfolg. -
@paul53 Wie schon gesagt, die Zeitplansteuerung funktioniert nicht. Gerade noch einmal getestet.
-
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: die Zeitplansteuerung funktioniert nicht.
Stimmt die Systemzeit des OS (Log)?

Da ist das Problem. Es ist eine STunde zurück. wie kann ich das ändern?
Mit verschobener Zeit war ich erfolgreich.Ich habe es selbst hin bekommen
-
@paul53 sagte in Außenbeleuchtungs Steuerung:
@hicki sagte: die Zeitplansteuerung funktioniert nicht.
Stimmt die Systemzeit des OS (Log)?

Da ist das Problem. Es ist eine STunde zurück. wie kann ich das ändern?
Mit verschobener Zeit war ich erfolgreich.Ich habe es selbst hin bekommen
-
@hicki Eine Frage habe ich noch, wenn ich zwei Objekte schalten möchte, wie löse ich das?
Vielen Dank
@hicki Hallo,
ich habe das Script richtig getestet, ich muss leider feststellen, es funktioniert nicht richtig.
Es schaltet 3Uhr nachts nicht aus, und früh morgens nicht ein. Kann es daran liegen, das nicht getriggert wird, da Sich um diese Zeit die Helligkeit noch nicht ändert.
Wie kann ich das Problem lösen?
<xml xmlns="https://developers.google.com/blockly/xml"> <variables> <variable id="aL_X)*sBl03%NEW0`$16">licht</variable> </variables> <block type="variables_set" id="nAb*8A.{e9B7yRo7Vp4$" x="-312" y="-13"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> <value name="VALUE"> <block type="get_value" id="5osR!02k6g`HA4bCFFc3"> <field name="ATTR">val</field> <field name="OID">meross.0.2103167712159190845648e1e962ef89.0</field> </block> </value> <next> <block type="variables_set" id="vX/BL$D=G4zM-=q#c?7l"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> <value name="VALUE"> <block type="get_value" id=".T]Sw9hWk^IKZp9?XWaS"> <field name="ATTR">val</field> <field name="OID">meross.0.2103167712159190845648e1e962ef89.2</field> </block> </value> <next> <block type="on_ext" id="{C!-q#5L0R;9f?kYAsry"> <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="E`(8h#e|S}7v|r5d0.Mc"> <field name="oid">hm-rpc.0.PEQ1447187.1.LUX</field> </shadow> </value> <statement name="STATEMENT"> <block type="controls_if" id=";}+3f,3x_YBFZFD~i@.Y"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="time_compare" id="b^e@Rw{#Wsk;K#:VY3;#"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="true"></mutation> <field name="OPTION">between</field> <field name="START_TIME">6:00</field> <field name="END_TIME">23:00</field> </block> </value> <statement name="DO0"> <block type="controls_if" id="k8[AgF/[JSB1N9snP|FH"> <mutation elseif="1"></mutation> <value name="IF0"> <block type="logic_compare" id="_#buL5doh#t/okTN*!a6"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id=":]atgQ[@ogPRqll!g}p."> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.PEQ1447187.1.LUX</field> </block> </value> <value name="B"> <block type="math_number" id="V!?+lG#2|7VQ-dgnn?4|"> <field name="NUM">350</field> </block> </value> </block> </value> <statement name="DO0"> <block type="variables_set" id="VbB+lbG|FS58Fk3H5vcH"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> <value name="VALUE"> <block type="logic_boolean" id="i|H]SprtQli!f:CnpYu_"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <value name="IF1"> <block type="logic_compare" id="o.`rp8p.@`HM2,a599DA"> <field name="OP">GT</field> <value name="A"> <block type="get_value" id=":6-SL[6XES|DFD3WBbE^"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.PEQ1447187.1.LUX</field> </block> </value> <value name="B"> <block type="math_number" id="r-@aBH$C:8-56O@AY6k)"> <field name="NUM">350</field> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="30a+4?8xa:3gcnvfJ1!z"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> <value name="VALUE"> <block type="logic_boolean" id="arJ~Lc@ADNS7PRY89u[}"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> </block> </statement> <value name="IF1"> <block type="logic_operation" id="IC)`}jgNen5F1N#Qjb:~" inline="false"> <field name="OP">AND</field> <value name="A"> <block type="time_compare" id="qhQ*DY~ZoD9U*WJiSE.8"> <mutation xmlns="http://www.w3.org/1999/xhtml" end_time="false"></mutation> <field name="OPTION">></field> <field name="START_TIME">23:00</field> </block> </value> <value name="B"> <block type="logic_compare" id="FeHt$8yMCXvUq$5ye-RE"> <field name="OP">LT</field> <value name="A"> <block type="get_value" id="/L$dV!Np}A:^AOY@jaPx"> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.PEQ1447187.1.LUX</field> </block> </value> <value name="B"> <block type="math_number" id="lIx1BP/VE)`}t!k!U4r|"> <field name="NUM">350</field> </block> </value> </block> </value> </block> </value> <statement name="DO1"> <block type="variables_set" id="L+4Ku-/v|69KE0nD7Pb7"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> <value name="VALUE"> <block type="logic_boolean" id="W,a2FN}d^%PaI]hyCYkK"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <next> <block type="controls_if" id="_qgWF*jdZ/QKfr9POs0L"> <value name="IF0"> <block type="logic_compare" id="X7KYR)Q6|-QL@=*ZWTBD"> <field name="OP">NEQ</field> <value name="A"> <block type="variables_get" id="[-Bv!#,hV:Yz8I53N2Y~"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> </block> </value> <value name="B"> <block type="get_value" id="kD~ukn|f|d@uo5#GX.y}"> <field name="ATTR">val</field> <field name="OID">meross.0.2103167712159190845648e1e962ef89.0</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="w.%$^mNIRkE/BvQ_kibz"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">meross.0.2103167712159190845648e1e962ef89.0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="_b]p1k!)%d}f%ykWXd=4"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> </block> </value> <next> <block type="control" id="fT~xYZ|F)+1p)_rAB}a,"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">meross.0.2103167712159190845648e1e962ef89.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="y8rYr_L_eWEvAR[d$pG_"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> </block> </value> </block> </next> </block> </statement> <next> <block type="debug" id=":;07tr72fVw{?`HNic(q"> <field name="Severity">log</field> <value name="TEXT"> <shadow type="text" id="3P6x:CGgrB2V^fsr0hn0"> <field name="TEXT">test</field> </shadow> <block type="text_join" id="!E[?o{_K5c3tfHgAa+6O"> <mutation items="4"></mutation> <value name="ADD0"> <block type="text" id=":,psL={k/UsAtc1$,U=1"> <field name="TEXT">Außenbeleuchtung:</field> </block> </value> <value name="ADD1"> <block type="variables_get" id="(ybtL.qIEg()hW:uHkyH"> <field name="VAR" id="aL_X)*sBl03%NEW0`$16">licht</field> </block> </value> <value name="ADD2"> <block type="text" id="gmO[[Owfys^]w}t]IQTL"> <field name="TEXT"> und Helligkeit:</field> </block> </value> <value name="ADD3"> <block type="get_value" id="~7fMP8j.GBv_e,jA{XD["> <field name="ATTR">val</field> <field name="OID">hm-rpc.0.PEQ1447187.1.LUX</field> </block> </value> </block> </value> </block> </next> </block> </next> </block> </statement> <next> <block type="schedule" id="EF?3)TIqPV%Jq)SG/g|P"> <field name="SCHEDULE">0 3 * * *</field> <statement name="STATEMENT"> <block type="control" id="e$Hyu9Sa.Sz9/5=Ma4TE"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">meross.0.2103167712159190845648e1e962ef89.0</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="Y9SG.fNG@^=%Y+$@ow|)"> <field name="BOOL">FALSE</field> </block> </value> <next> <block type="control" id="$s!n*t`o@*j$ZrYUGcZx"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">meross.0.2103167712159190845648e1e962ef89.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="d*lQAX^al7xdtMDpqP%A"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>Gruß Hicki
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
