NEWS
ich möchte am Abend ein am morgen ausschalten
-
Ich hab jetzt schon mal versucht mit
code_text<xml xmlns="https://developers.google.com/blockly/xml"> <block type="comment" id="WGn+t9~z{TAdt2o|4=mu" x="237" y="63"> <field name="COMMENT">Einschalten am Abend</field> <next> <block type="astro" id="n+y#T?X=;_CGI`o`GKl8"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> <statement name="STATEMENT"> <block type="control" id="PE(Z2Ybe6i8W3p}4NXw-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Bewaesserung.Bewaesserung_schalten</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="O-}ebdMRO)gQ6RBD{hV;"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <next> <block type="comment" id="C]EXNC=74Y10DtkLw{t4"> <field name="COMMENT">Ausschalten am Morgen</field> <next> <block type="astro" id="D@nC$uJ^ifxIxg}U+chl"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> <statement name="STATEMENT"> <block type="controls_if" id="Q,+/kQsTs3oZ}I*H2!te"> <value name="IF0"> <block type="logic_compare" id="fL=IfSNcVZ,Mf3ni}S+F"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="tLZn^|CPr?iR*4O)$dqW"> <field name="ATTR">val</field> <field name="OID">sonoff.0.Bewaesserung.POWER</field> </block> </value> <value name="B"> <block type="logic_boolean" id="X+@.m6qFN3EVJZ,cn,={"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Aj.QaG=?4;72rLN3t0jQ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Bewaesserung.Bewaesserung_schalten</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="92)HL=,PzJ7I;qh6K1pV"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="debug" id="cP9,GT/XZ974*:M6R+AJ"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="F?lqqW+[BnGp2b?5y0!d"> <field name="TEXT">testtt</field> </shadow> <block type="global_var" id="T(N4i`d$iL.|[`0LRl!E"> <field name="VAR">defaultDataDir</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>Bekomme aber diese Warnmeldung:
at processTimers (node:internal/timers:519:7) at listOnTimeout (node:internal/timers:581:17) at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:3185:34)MOD-EDIT: Code in code-tags gesetzt!

und keine Funktion.
Besten Dank für eure Hilfe -
Ich hab jetzt schon mal versucht mit
code_text<xml xmlns="https://developers.google.com/blockly/xml"> <block type="comment" id="WGn+t9~z{TAdt2o|4=mu" x="237" y="63"> <field name="COMMENT">Einschalten am Abend</field> <next> <block type="astro" id="n+y#T?X=;_CGI`o`GKl8"> <field name="TYPE">sunsetStart</field> <field name="OFFSET">0</field> <statement name="STATEMENT"> <block type="control" id="PE(Z2Ybe6i8W3p}4NXw-"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Bewaesserung.Bewaesserung_schalten</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="O-}ebdMRO)gQ6RBD{hV;"> <field name="BOOL">TRUE</field> </block> </value> </block> </statement> <next> <block type="comment" id="C]EXNC=74Y10DtkLw{t4"> <field name="COMMENT">Ausschalten am Morgen</field> <next> <block type="astro" id="D@nC$uJ^ifxIxg}U+chl"> <field name="TYPE">sunriseEnd</field> <field name="OFFSET">0</field> <statement name="STATEMENT"> <block type="controls_if" id="Q,+/kQsTs3oZ}I*H2!te"> <value name="IF0"> <block type="logic_compare" id="fL=IfSNcVZ,Mf3ni}S+F"> <field name="OP">EQ</field> <value name="A"> <block type="get_value" id="tLZn^|CPr?iR*4O)$dqW"> <field name="ATTR">val</field> <field name="OID">sonoff.0.Bewaesserung.POWER</field> </block> </value> <value name="B"> <block type="logic_boolean" id="X+@.m6qFN3EVJZ,cn,={"> <field name="BOOL">TRUE</field> </block> </value> </block> </value> <statement name="DO0"> <block type="control" id="Aj.QaG=?4;72rLN3t0jQ"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">0_userdata.0.Bewaesserung.Bewaesserung_schalten</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="92)HL=,PzJ7I;qh6K1pV"> <field name="BOOL">FALSE</field> </block> </value> </block> </statement> <next> <block type="debug" id="cP9,GT/XZ974*:M6R+AJ"> <field name="Severity">info</field> <value name="TEXT"> <shadow type="text" id="F?lqqW+[BnGp2b?5y0!d"> <field name="TEXT">testtt</field> </shadow> <block type="global_var" id="T(N4i`d$iL.|[`0LRl!E"> <field name="VAR">defaultDataDir</field> </block> </value> </block> </next> </block> </statement> </block> </next> </block> </next> </block> </next> </block> </xml>Bekomme aber diese Warnmeldung:
at processTimers (node:internal/timers:519:7) at listOnTimeout (node:internal/timers:581:17) at Timeout._onTimeout (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:3185:34)MOD-EDIT: Code in code-tags gesetzt!

und keine Funktion.
Besten Dank für eure Hilfe@christian-5 sagte in ich möchte am Abend ein am morgen ausschalten:
Bekomme aber diese Warnmeldung:
da fehlt die wichtigste Zeile, was in den angegebenen Zeilen zum Fehler führt
-
@christian-5 sagte in ich möchte am Abend ein am morgen ausschalten:
Bekomme aber diese Warnmeldung:
da fehlt die wichtigste Zeile, was in den angegebenen Zeilen zum Fehler führt
@homoran danke für die schnelle reaktion, ich habs schon, der fehler war der falsche datenpunkt. entschuldigt!
das Blockly passt ja, oder?
glg -
@christian-5 sagte in ich möchte am Abend ein am morgen ausschalten:
das Blockly passt ja, oder?
Jepp!
Kleiner Schönheitsfehler:
Ein "Falls" erwartet als Bedingung einen Ausdruck, der als Ganzestrueoderfalseliefert.
Der Gesamtausdruck "Wert von Objekt X = wahr" lieferttrue, wenn der State auftruesteht.
Und liefert logischerweise einfalse, wenn der State auffalse(genauer: nicht true) steht.Da das "Falls" aber einfach nur einen Wahrheitswert erwartet, kann man auch direkt den Inhalt des State da ranklöppeln.

Im State steht ja entweder nur
trueoderfalse.https://forum.iobroker.net/topic/70481/blockly-for-dummies-starthilfe-und-tipps/8
-
@codierknecht Besten Dank für die Erklärung. Für mich war halt "falls = wahr" irgendwie logischer.
glg Christian
-
@codierknecht Besten Dank für die Erklärung. Für mich war halt "falls = wahr" irgendwie logischer.
glg Christian
@christian-5
Programmierer sind von Haus aus faul - sonst wären sie ja nicht Programmierer geworden.
Also spart man sich einen Block
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