Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Keine Übergabe von Variablen als Parameter an Funktion

NEWS

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    16
    1
    1.1k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    702

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.0k

Keine Übergabe von Variablen als Parameter an Funktion

Geplant Angeheftet Gesperrt Verschoben Blockly
7 Beiträge 4 Kommentatoren 540 Aufrufe 3 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • P Offline
    P Offline
    PRozAC
    schrieb am zuletzt editiert von PRozAC
    #1

    Hallo,

    da ich ohne Probleme ein Blockly script für meine Waschmaschine nutze, wollte ich es jetzt auch für weitere Geräte übernehmen.
    Nachdem ich das script nun kopiert und die Variablen zur Sicherheit umbenannt hatte musste ich feststellen, dass es nicht funktioniert. Ich habe das script nochmal händisch komplett neu erstellt und auch das funktioniert nicht. Aus irgendeinem Grund werden die Variablen nicht als Parameter an die separaten Funktionen übergeben (undefinded). Somit sagt Pushover zurecht, dass die Nachricht nicht leer sein darf und die Funktion für den Check ob sie fertig ist auch nicht.

    Engine Version ist 4.9.8
    Kann da mal bitte jemand drüber schauen, was das sein kann?

    Originalscript der Waschmaschine (alles funktioniert)

    wasch block.png

    <block xmlns="https://developers.google.com/blockly/xml" type="procedures_defnoreturn" id="sDP?w~)oJD}Z95[_?EY0" x="537.3554187499999" y="737.4805640625003">
      <mutation>
        <arg name="parameter" varid="3z#w#7|%-~CQJWh4DB~T"></arg>
      </mutation>
      <field name="NAME">checkFertig</field>
      <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
      <statement name="STACK">
        <block type="comment" id="V2@7jqv5RTl+}q}xfEsZ">
          <field name="COMMENT">Timer stoppen</field>
          <next>
            <block type="timeouts_cleartimeout" id="y7iPL;/^^,*);q|%Pk6;">
              <field name="NAME">timeout</field>
              <next>
                <block type="debug" id="Wa8UWcO8~gsdL_4axEHz">
                  <field name="Severity">log</field>
                  <value name="TEXT">
                    <shadow type="text" id="P.IHoLz}~UbVN2/CdYxL">
                      <field name="TEXT">Timer stop </field>
                    </shadow>
                  </value>
                  <next>
                    <block type="controls_if" id="*DX-*|5t*M5.|5Qw0p76">
                      <value name="IF0">
                        <block type="logic_compare" id="[-Hs2uzeFf6L7XO4:d6g">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="variables_get" id="uT*6f!Y:?Sivq1F-y;7_">
                              <field name="VAR" id="3z#w#7|%-~CQJWh4DB~T">parameter</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="w?1)4.uK{/ey3NJ)NjH:">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <statement name="DO0">
                        <block type="debug" id="_{I(En9-bizofxnJu!fP">
                          <field name="Severity">log</field>
                          <value name="TEXT">
                            <shadow type="text" id="*Np7`%r:w_KK%5=Q]dsc">
                              <field name="TEXT">Timer start</field>
                            </shadow>
                          </value>
                          <next>
                            <block type="comment" id="fU`TRz:h*y1K[t@GmyY:">
                              <field name="COMMENT">Timer starten</field>
                              <next>
                                <block type="timeouts_settimeout" id="k%sy5:QdTn+3f@{OZshs">
                                  <field name="NAME">timeout</field>
                                  <field name="DELAY">40</field>
                                  <field name="UNIT">sec</field>
                                  <statement name="STATEMENT">
                                    <block type="control" id="UOquZ.)w|Dv~5_@iC*HO">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">javascript.0.WaschmaschineAN</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="ttQizIf!/AB*HLfb9Kw1">
                                          <field name="BOOL">FALSE</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="HHrpaU=vtt6v1JInTG~l">
                                          <mutation name="Melden">
                                            <arg name="Meldetext"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="text_join" id="6ZYBq%T:J%aM12xmW:%m">
                                              <mutation items="4"></mutation>
                                              <value name="ADD0">
                                                <block type="text" id="|qXKN;1,|eLZs95?h7P!">
                                                  <field name="TEXT">Die Waschmaschine ist fertig </field>
                                                </block>
                                              </value>
                                              <value name="ADD1">
                                                <block type="text" id="{K%p#9xB|%HJJ#Pu8U@W">
                                                  <field name="TEXT">und hat </field>
                                                </block>
                                              </value>
                                              <value name="ADD2">
                                                <block type="math_rndfixed" id="lklP,[Fs5u@|{X$`[$h]">
                                                  <field name="n">3</field>
                                                  <value name="x">
                                                    <shadow type="math_number" id="Qx6PR=Va0C,*6XsGIa|b">
                                                      <field name="NUM">3.1234</field>
                                                    </shadow>
                                                    <block type="math_arithmetic" id="`FIgNelEa]Ta8-Fzli;z">
                                                      <field name="OP">MINUS</field>
                                                      <value name="A">
                                                        <shadow type="math_number" id="se:q;TI,U.)6w@,Yo-a6">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="get_value" id="./RB~Nkyx,w@|@eT5$Q:">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">sonoff.0.sonoff-waschmaschine.ENERGY_Total</field>
                                                        </block>
                                                      </value>
                                                      <value name="B">
                                                        <shadow type="math_number" id="{(xNAw3x5XW[-EP]rlP=">
                                                          <field name="NUM">1</field>
                                                        </shadow>
                                                        <block type="variables_get" id=".H27~yaQacy5XJ9Z28gL">
                                                          <field name="VAR" id=";f}gx0d_.Q9J{N(/~b?s">leistung</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="ADD3">
                                                <block type="text" id="leE4:W;JI@,LD;n0Gs6r">
                                                  <field name="TEXT"> kW/h verbraucht.</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="variables_set" id="On1YrpU!83Ke6%x=0YGu">
                                              <field name="VAR" id=";f}gx0d_.Q9J{N(/~b?s">leistung</field>
                                              <value name="VALUE">
                                                <block type="get_value" id="a5]m4HaZ5W^ss3D@_Q?2">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">sonoff.0.sonoff-waschmaschine.ENERGY_Total</field>
                                                </block>
                                              </value>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </next>
        </block>
      </statement>
    </block>
    

    Script des Geschirrspülers (Variablen werden nicht übergeben)

    geschirr block.png

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</variable>
        <variable id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</variable>
        <variable id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</variable>
        <variable id="xC5@G,_.m=LKNd-FZ,zm">debug</variable>
        <variable id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</variable>
        <variable id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</variable>
        <variable type="timeout" id="timeout">timeout</variable>
      </variables>
      <block type="variables_set" id="lx^3/~E|:fUO4j=$.lFv" x="-788" y="158">
        <field name="VAR" id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</field>
        <value name="VALUE">
          <block type="logic_boolean" id="xlr$q1}2q%G#%Zj9GZ)1">
            <field name="BOOL">FALSE</field>
          </block>
        </value>
        <next>
          <block type="variables_set" id="B;u1htcUB|4soHQxmj(c">
            <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
            <value name="VALUE">
              <block type="logic_boolean" id="P39r`wj@/rQ;V4aydE[G">
                <field name="BOOL">TRUE</field>
              </block>
            </value>
            <next>
              <block type="variables_set" id="UipN4O+nSP}Z~Q|7//hp">
                <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                <value name="VALUE">
                  <block type="math_number" id="Rgn%[}sNvn~U43L}^MR0">
                    <field name="NUM">0</field>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="qksAQ,8kCdvP6?#,+[!$">
                    <field name="VAR" id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</field>
                    <value name="VALUE">
                      <block type="get_value" id="sbX(^pQ~qgK%m!OAguO,">
                        <field name="ATTR">val</field>
                        <field name="OID">sonoff.0.esp-geschirr.ENERGY_Total</field>
                      </block>
                    </value>
                    <next>
                      <block type="update" id="#oi4YN16Z??zP]ICUz(q">
                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                        <field name="OID">javascript.0.GeschirrAN</field>
                        <field name="WITH_DELAY">FALSE</field>
                        <value name="VALUE">
                          <block type="logic_boolean" id="oK=pHb;%ql?tXd`P}|ND">
                            <field name="BOOL">FALSE</field>
                          </block>
                        </value>
                        <next>
                          <block type="on_ext" id="#YO)gWFv`/p~7wc=-/jr">
                            <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="V#YMlyCV}drPoR[uZulK">
                                <field name="oid">sonoff.0.esp-geschirr.ENERGY_Power</field>
                              </shadow>
                            </value>
                            <statement name="STATEMENT">
                              <block type="controls_if" id="/CM^BBMl8]zsd$yy;uHg">
                                <mutation elseif="2"></mutation>
                                <value name="IF0">
                                  <block type="logic_operation" id="iQNnq=)dnr$j:UTQOZVX" inline="false">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="logic_compare" id="gVsz2Ct#t*p`z:U:Ln3E">
                                        <field name="OP">GT</field>
                                        <value name="A">
                                          <block type="get_value" id="`[X1*JWww)!7hR7LKr-C">
                                            <field name="ATTR">val</field>
                                            <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="variables_get" id="_w{t9*!CSex)8q)v[La%">
                                            <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_operation" id="y45O6ZAfh#mn[YO|O,K2" inline="false">
                                        <field name="OP">AND</field>
                                        <value name="A">
                                          <block type="logic_compare" id="b*X7);8~wz(t+k;MWg%p">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="get_value" id="#8PT[,xE#!O_P3Qj{Apu">
                                                <field name="ATTR">val</field>
                                                <field name="OID">javascript.0.GeschirrAN</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="q]YVIn+RX.r;KB;]U)s$">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_compare" id="O/g#x}|zSd[DJYO_$}{!">
                                            <field name="OP">EQ</field>
                                            <value name="A">
                                              <block type="variables_get" id="fKmNrZ2JIw}%whI?YHQu">
                                                <field name="VAR" id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <block type="logic_boolean" id="BR6Qzeo/4]01:(Gf-`^D">
                                                <field name="BOOL">FALSE</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO0">
                                  <block type="update" id="ojhHxBGps9JXCxb5:k8C">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">javascript.0.GeschirrAN</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="logic_boolean" id="?ny:H9Y}Y7AB|NfaV`}?">
                                        <field name="BOOL">TRUE</field>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="procedures_callnoreturn" id="eYzV:^zYCy#{}*;R0}Fn" inline="false">
                                        <mutation name="MeldungGeschirrspueler">
                                          <arg name="MeldetextGeschirrspueler"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="text" id="!IvV/+3%;HhS:H#S9$Nz">
                                            <field name="TEXT">Test</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="controls_if" id="}PNx(sa%gVaK:85;d|;|">
                                            <value name="IF0">
                                              <block type="logic_compare" id="/:0N:VVJHcL/_oSkx.*9">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="variables_get" id="G!YY(3m8]@owUu1;2ILx">
                                                    <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="Ew.s$s5g2AR%#k=H4B(R">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="debug" id="M6p~WS,`Uze^qXDii~z}">
                                                <field name="Severity">warn</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="N@!52j~`_k(+2/jQ?kIU">
                                                    <field name="TEXT">Spüler gestartet</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <value name="IF1">
                                  <block type="logic_compare" id="x8PHiEY1^~m_(JD8f#(4">
                                    <field name="OP">GT</field>
                                    <value name="A">
                                      <block type="get_value" id="VGspp{O4inEIXH/IU0UP">
                                        <field name="ATTR">val</field>
                                        <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="variables_get" id="m+3xG_Y{E8[i,Q^i}2?d">
                                        <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO1">
                                  <block type="comment" id="#A.3t@uY:wy_f[=r_^5#">
                                    <field name="COMMENT">Timer stoppen</field>
                                    <next>
                                      <block type="procedures_callnoreturn" id="_h|uV?OXs4cBnD.F#gV(">
                                        <mutation name="FertigCheckGeschirr">
                                          <arg name="ParameterGeschirr"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="logic_boolean" id="Dt73+QxwM^pYb=FxKVg}">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="controls_if" id="*[?tf%:[wkK9y+S2+c_1">
                                            <value name="IF0">
                                              <block type="logic_compare" id="T*{/pPM-gJ%xJZ_!UexJ">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="variables_get" id="?]_B%s~fEcA)vvMFV4;#">
                                                    <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="s^J0~YHo`=De*q~RNpMg">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="debug" id="5ZOuwA(A7)3er0il#?H|">
                                                <field name="Severity">warn</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="Am%OJk2poU)C[J5Lyr,:">
                                                    <field name="TEXT">Timer stop 1</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                                <value name="IF2">
                                  <block type="logic_operation" id="9E09u6_c!]S%uK][GxZT" inline="false">
                                    <field name="OP">AND</field>
                                    <value name="A">
                                      <block type="logic_compare" id="|FQyNnNf.;C?Bf57#(k)">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="get_value" id="F)r$MFwv%V_s/}ICNh@!">
                                            <field name="ATTR">val</field>
                                            <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="variables_get" id="??Q-;*%n_!Ll[^3~m3dL">
                                            <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="B">
                                      <block type="logic_compare" id="?a`h-5Hy#T8P@1;1*@+^">
                                        <field name="OP">EQ</field>
                                        <value name="A">
                                          <block type="get_value" id="!nKAF.N%q57;zxT-/(w)">
                                            <field name="ATTR">val</field>
                                            <field name="OID">javascript.0.GeschirrAN</field>
                                          </block>
                                        </value>
                                        <value name="B">
                                          <block type="logic_boolean" id="5b8Z:D*a#-jCb|PUpHz+">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <statement name="DO2">
                                  <block type="comment" id="/7!997Z,F^FbfW~F=c=[">
                                    <field name="COMMENT">Timer starten</field>
                                    <next>
                                      <block type="procedures_callnoreturn" id="-]2O!g]IA`flk5z_!i7p">
                                        <mutation name="FertigCheckGeschirr">
                                          <arg name="ParameterGeschirr"></arg>
                                        </mutation>
                                        <value name="ARG0">
                                          <block type="logic_boolean" id="RP`80nF1[mMAa%oBokFW">
                                            <field name="BOOL">TRUE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="controls_if" id="e[E[!RxQ,h7d44,d=uz!">
                                            <value name="IF0">
                                              <block type="logic_compare" id="@l{W:i(VTt#X:%j.PH`~">
                                                <field name="OP">EQ</field>
                                                <value name="A">
                                                  <block type="variables_get" id="g}px(%_ABElaoiISKm0b">
                                                    <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                  </block>
                                                </value>
                                                <value name="B">
                                                  <block type="logic_boolean" id="qTj-.U}PL5$0}D]ioz@X">
                                                    <field name="BOOL">TRUE</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <statement name="DO0">
                                              <block type="debug" id="zMY,w4h*XXqtEM3srwvH">
                                                <field name="Severity">warn</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="kcaZqD!OxBFLV$X;wWSf">
                                                    <field name="TEXT">Timer start 1</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </statement>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </statement>
                              </block>
                            </statement>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </next>
      </block>
      <block type="procedures_defnoreturn" id="v~yF@}3|Cz*|DRanQJ3E" x="163" y="237">
        <mutation>
          <arg name="MeldetextGeschirrspueler" varid="r%-J*h%5tS#4F{]Qs|ie"></arg>
        </mutation>
        <field name="NAME">MeldungGeschirrspueler</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="controls_if" id="jhj!Cl7MKA=-I`##WQ/u">
            <value name="IF0">
              <block type="logic_compare" id="~3NiT]j!?JC?:hOWlXlI">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="variables_get" id="noox7i6lNy!L@%}2id/#">
                    <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="ozB=gWahs5amQuQtDE}*">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="debug" id="mjJb[n:y/j5jIR7NuuH9">
                <field name="Severity">warn</field>
                <value name="TEXT">
                  <shadow type="text" id="x6?2gN^$gPoi-]}2DQ|R">
                    <field name="TEXT">Meldung test</field>
                  </shadow>
                  <block type="variables_get" id="Di[D^m6W$X}cHxJ)gqp4">
                    <field name="VAR" id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</field>
                  </block>
                </value>
              </block>
            </statement>
            <next>
              <block type="pushover" id="=UkSukTZRxC?o$H]^~8Y">
                <field name="INSTANCE"></field>
                <field name="SOUND"></field>
                <field name="PRIORITY">0</field>
                <field name="LOG"></field>
                <value name="MESSAGE">
                  <shadow type="text" id="sullr6+u[X?0+[9TUN_Y">
                    <field name="TEXT">text</field>
                  </shadow>
                  <block type="variables_get" id="qNmv(cwN{511k]p/h?u8">
                    <field name="VAR" id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</field>
                  </block>
                </value>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="procedures_defnoreturn" id="1~WDN$W1oZ~,.o3}[NKZ" x="663" y="238">
        <mutation>
          <arg name="ParameterGeschirr" varid="w2-Nu8N87+33+q6KGyC5"></arg>
        </mutation>
        <field name="NAME">FertigCheckGeschirr</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="controls_if" id="*fM_68Etb4-4nK]{S,Mh">
            <mutation elseif="1"></mutation>
            <value name="IF0">
              <block type="logic_compare" id="~lmv4?iRN}.7R1?F4u{c">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="variables_get" id="#FZ413Q}S*[Y~uuUieE`">
                    <field name="VAR" id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="zPF2eBXhV;P^$?fr#{gM">
                    <field name="BOOL">TRUE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO0">
              <block type="controls_if" id="EwVn55ln`P|ZA8K+=7.|">
                <value name="IF0">
                  <block type="logic_compare" id="lSS8x_tiWmQmO[wQ7K}:">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="jf`D546Gw;dESK^m[VG`">
                        <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="m3~N90XUy9rD%C5lnX_H">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="1lgZ7%!vy2|@Qgy_%X+D">
                    <field name="Severity">warn</field>
                    <value name="TEXT">
                      <shadow type="text" id="c^tktb9U?i=A[N|?#^,n">
                        <field name="TEXT">Timer start 2</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
                <next>
                  <block type="comment" id="I4S%kpUq5t3O:B/JyJ^8">
                    <field name="COMMENT">Timer starten</field>
                    <next>
                      <block type="timeouts_settimeout" id="V)~?NBS4^PWExZ@d*iZI">
                        <field name="NAME">timeout</field>
                        <field name="DELAY">40</field>
                        <field name="UNIT">sec</field>
                        <statement name="STATEMENT">
                          <block type="update" id="},P:kNo]]fa),9TSOIZD">
                            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                            <field name="OID">javascript.0.GeschirrAN</field>
                            <field name="WITH_DELAY">FALSE</field>
                            <value name="VALUE">
                              <block type="logic_boolean" id="ZEURV(Tk)#0#q]exJY%0">
                                <field name="BOOL">FALSE</field>
                              </block>
                            </value>
                            <next>
                              <block type="procedures_callnoreturn" id="C[mTr}mv4aHWy)A`fd0r">
                                <mutation name="MeldungGeschirrspueler">
                                  <arg name="MeldetextGeschirrspueler"></arg>
                                </mutation>
                                <next>
                                  <block type="variables_set" id="3+4dl8kul/@gq9i|$ev=">
                                    <field name="VAR" id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</field>
                                    <value name="VALUE">
                                      <block type="get_value" id="=+]nR{I|1MX@*,}eCGhH">
                                        <field name="ATTR">val</field>
                                        <field name="OID">sonoff.0.esp-geschirr.ENERGY_Total</field>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
            <value name="IF1">
              <block type="logic_compare" id="7S|nTJdw|I%xMC~l!V3_">
                <field name="OP">EQ</field>
                <value name="A">
                  <block type="variables_get" id="Ji7]E`4LDDXI,Y#(-Y,v">
                    <field name="VAR" id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</field>
                  </block>
                </value>
                <value name="B">
                  <block type="logic_boolean" id="T?R580i]FH~sx~%yyneM">
                    <field name="BOOL">FALSE</field>
                  </block>
                </value>
              </block>
            </value>
            <statement name="DO1">
              <block type="controls_if" id=":Vp!ebln!WPo7zhRpeGl">
                <value name="IF0">
                  <block type="logic_compare" id="i)4O`=FB-{j0bW/bA8%6">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="qY#WnwD7c8Fi{I3vmw!%">
                        <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="*ymp/]p%q(a;xckSOQwP">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="`LB57#({H_;])h^!2QfM">
                    <field name="Severity">warn</field>
                    <value name="TEXT">
                      <shadow type="text" id=":8XD3)Gtu?y}Wh:#y=.=">
                        <field name="TEXT">Timer stop 2</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
                <next>
                  <block type="comment" id="k9$9]n~hY%;/hVKU?SL_">
                    <field name="COMMENT">Timer stoppen</field>
                    <next>
                      <block type="timeouts_cleartimeout" id="WCPp/Ps+20WyRD/;Q=Hr">
                        <field name="NAME">timeout</field>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </statement>
          </block>
        </statement>
      </block>
    </xml>
    
    paul53P 1 Antwort Letzte Antwort
    0
    • P PRozAC

      Hallo,

      da ich ohne Probleme ein Blockly script für meine Waschmaschine nutze, wollte ich es jetzt auch für weitere Geräte übernehmen.
      Nachdem ich das script nun kopiert und die Variablen zur Sicherheit umbenannt hatte musste ich feststellen, dass es nicht funktioniert. Ich habe das script nochmal händisch komplett neu erstellt und auch das funktioniert nicht. Aus irgendeinem Grund werden die Variablen nicht als Parameter an die separaten Funktionen übergeben (undefinded). Somit sagt Pushover zurecht, dass die Nachricht nicht leer sein darf und die Funktion für den Check ob sie fertig ist auch nicht.

      Engine Version ist 4.9.8
      Kann da mal bitte jemand drüber schauen, was das sein kann?

      Originalscript der Waschmaschine (alles funktioniert)

      wasch block.png

      <block xmlns="https://developers.google.com/blockly/xml" type="procedures_defnoreturn" id="sDP?w~)oJD}Z95[_?EY0" x="537.3554187499999" y="737.4805640625003">
        <mutation>
          <arg name="parameter" varid="3z#w#7|%-~CQJWh4DB~T"></arg>
        </mutation>
        <field name="NAME">checkFertig</field>
        <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
        <statement name="STACK">
          <block type="comment" id="V2@7jqv5RTl+}q}xfEsZ">
            <field name="COMMENT">Timer stoppen</field>
            <next>
              <block type="timeouts_cleartimeout" id="y7iPL;/^^,*);q|%Pk6;">
                <field name="NAME">timeout</field>
                <next>
                  <block type="debug" id="Wa8UWcO8~gsdL_4axEHz">
                    <field name="Severity">log</field>
                    <value name="TEXT">
                      <shadow type="text" id="P.IHoLz}~UbVN2/CdYxL">
                        <field name="TEXT">Timer stop </field>
                      </shadow>
                    </value>
                    <next>
                      <block type="controls_if" id="*DX-*|5t*M5.|5Qw0p76">
                        <value name="IF0">
                          <block type="logic_compare" id="[-Hs2uzeFf6L7XO4:d6g">
                            <field name="OP">EQ</field>
                            <value name="A">
                              <block type="variables_get" id="uT*6f!Y:?Sivq1F-y;7_">
                                <field name="VAR" id="3z#w#7|%-~CQJWh4DB~T">parameter</field>
                              </block>
                            </value>
                            <value name="B">
                              <block type="logic_boolean" id="w?1)4.uK{/ey3NJ)NjH:">
                                <field name="BOOL">TRUE</field>
                              </block>
                            </value>
                          </block>
                        </value>
                        <statement name="DO0">
                          <block type="debug" id="_{I(En9-bizofxnJu!fP">
                            <field name="Severity">log</field>
                            <value name="TEXT">
                              <shadow type="text" id="*Np7`%r:w_KK%5=Q]dsc">
                                <field name="TEXT">Timer start</field>
                              </shadow>
                            </value>
                            <next>
                              <block type="comment" id="fU`TRz:h*y1K[t@GmyY:">
                                <field name="COMMENT">Timer starten</field>
                                <next>
                                  <block type="timeouts_settimeout" id="k%sy5:QdTn+3f@{OZshs">
                                    <field name="NAME">timeout</field>
                                    <field name="DELAY">40</field>
                                    <field name="UNIT">sec</field>
                                    <statement name="STATEMENT">
                                      <block type="control" id="UOquZ.)w|Dv~5_@iC*HO">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                        <field name="OID">javascript.0.WaschmaschineAN</field>
                                        <field name="WITH_DELAY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="logic_boolean" id="ttQizIf!/AB*HLfb9Kw1">
                                            <field name="BOOL">FALSE</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="procedures_callnoreturn" id="HHrpaU=vtt6v1JInTG~l">
                                            <mutation name="Melden">
                                              <arg name="Meldetext"></arg>
                                            </mutation>
                                            <value name="ARG0">
                                              <block type="text_join" id="6ZYBq%T:J%aM12xmW:%m">
                                                <mutation items="4"></mutation>
                                                <value name="ADD0">
                                                  <block type="text" id="|qXKN;1,|eLZs95?h7P!">
                                                    <field name="TEXT">Die Waschmaschine ist fertig </field>
                                                  </block>
                                                </value>
                                                <value name="ADD1">
                                                  <block type="text" id="{K%p#9xB|%HJJ#Pu8U@W">
                                                    <field name="TEXT">und hat </field>
                                                  </block>
                                                </value>
                                                <value name="ADD2">
                                                  <block type="math_rndfixed" id="lklP,[Fs5u@|{X$`[$h]">
                                                    <field name="n">3</field>
                                                    <value name="x">
                                                      <shadow type="math_number" id="Qx6PR=Va0C,*6XsGIa|b">
                                                        <field name="NUM">3.1234</field>
                                                      </shadow>
                                                      <block type="math_arithmetic" id="`FIgNelEa]Ta8-Fzli;z">
                                                        <field name="OP">MINUS</field>
                                                        <value name="A">
                                                          <shadow type="math_number" id="se:q;TI,U.)6w@,Yo-a6">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="get_value" id="./RB~Nkyx,w@|@eT5$Q:">
                                                            <field name="ATTR">val</field>
                                                            <field name="OID">sonoff.0.sonoff-waschmaschine.ENERGY_Total</field>
                                                          </block>
                                                        </value>
                                                        <value name="B">
                                                          <shadow type="math_number" id="{(xNAw3x5XW[-EP]rlP=">
                                                            <field name="NUM">1</field>
                                                          </shadow>
                                                          <block type="variables_get" id=".H27~yaQacy5XJ9Z28gL">
                                                            <field name="VAR" id=";f}gx0d_.Q9J{N(/~b?s">leistung</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="ADD3">
                                                  <block type="text" id="leE4:W;JI@,LD;n0Gs6r">
                                                    <field name="TEXT"> kW/h verbraucht.</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="variables_set" id="On1YrpU!83Ke6%x=0YGu">
                                                <field name="VAR" id=";f}gx0d_.Q9J{N(/~b?s">leistung</field>
                                                <value name="VALUE">
                                                  <block type="get_value" id="a5]m4HaZ5W^ss3D@_Q?2">
                                                    <field name="ATTR">val</field>
                                                    <field name="OID">sonoff.0.sonoff-waschmaschine.ENERGY_Total</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </statement>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
      

      Script des Geschirrspülers (Variablen werden nicht übergeben)

      geschirr block.png

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</variable>
          <variable id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</variable>
          <variable id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</variable>
          <variable id="xC5@G,_.m=LKNd-FZ,zm">debug</variable>
          <variable id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</variable>
          <variable id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</variable>
          <variable type="timeout" id="timeout">timeout</variable>
        </variables>
        <block type="variables_set" id="lx^3/~E|:fUO4j=$.lFv" x="-788" y="158">
          <field name="VAR" id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</field>
          <value name="VALUE">
            <block type="logic_boolean" id="xlr$q1}2q%G#%Zj9GZ)1">
              <field name="BOOL">FALSE</field>
            </block>
          </value>
          <next>
            <block type="variables_set" id="B;u1htcUB|4soHQxmj(c">
              <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
              <value name="VALUE">
                <block type="logic_boolean" id="P39r`wj@/rQ;V4aydE[G">
                  <field name="BOOL">TRUE</field>
                </block>
              </value>
              <next>
                <block type="variables_set" id="UipN4O+nSP}Z~Q|7//hp">
                  <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                  <value name="VALUE">
                    <block type="math_number" id="Rgn%[}sNvn~U43L}^MR0">
                      <field name="NUM">0</field>
                    </block>
                  </value>
                  <next>
                    <block type="variables_set" id="qksAQ,8kCdvP6?#,+[!$">
                      <field name="VAR" id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</field>
                      <value name="VALUE">
                        <block type="get_value" id="sbX(^pQ~qgK%m!OAguO,">
                          <field name="ATTR">val</field>
                          <field name="OID">sonoff.0.esp-geschirr.ENERGY_Total</field>
                        </block>
                      </value>
                      <next>
                        <block type="update" id="#oi4YN16Z??zP]ICUz(q">
                          <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                          <field name="OID">javascript.0.GeschirrAN</field>
                          <field name="WITH_DELAY">FALSE</field>
                          <value name="VALUE">
                            <block type="logic_boolean" id="oK=pHb;%ql?tXd`P}|ND">
                              <field name="BOOL">FALSE</field>
                            </block>
                          </value>
                          <next>
                            <block type="on_ext" id="#YO)gWFv`/p~7wc=-/jr">
                              <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="V#YMlyCV}drPoR[uZulK">
                                  <field name="oid">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                </shadow>
                              </value>
                              <statement name="STATEMENT">
                                <block type="controls_if" id="/CM^BBMl8]zsd$yy;uHg">
                                  <mutation elseif="2"></mutation>
                                  <value name="IF0">
                                    <block type="logic_operation" id="iQNnq=)dnr$j:UTQOZVX" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_compare" id="gVsz2Ct#t*p`z:U:Ln3E">
                                          <field name="OP">GT</field>
                                          <value name="A">
                                            <block type="get_value" id="`[X1*JWww)!7hR7LKr-C">
                                              <field name="ATTR">val</field>
                                              <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="variables_get" id="_w{t9*!CSex)8q)v[La%">
                                              <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_operation" id="y45O6ZAfh#mn[YO|O,K2" inline="false">
                                          <field name="OP">AND</field>
                                          <value name="A">
                                            <block type="logic_compare" id="b*X7);8~wz(t+k;MWg%p">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="get_value" id="#8PT[,xE#!O_P3Qj{Apu">
                                                  <field name="ATTR">val</field>
                                                  <field name="OID">javascript.0.GeschirrAN</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="q]YVIn+RX.r;KB;]U)s$">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_compare" id="O/g#x}|zSd[DJYO_$}{!">
                                              <field name="OP">EQ</field>
                                              <value name="A">
                                                <block type="variables_get" id="fKmNrZ2JIw}%whI?YHQu">
                                                  <field name="VAR" id="9F.v-b=Y3~EW(+iHd-HA">VerzoegerungAktivGeschirrspueler</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="logic_boolean" id="BR6Qzeo/4]01:(Gf-`^D">
                                                  <field name="BOOL">FALSE</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO0">
                                    <block type="update" id="ojhHxBGps9JXCxb5:k8C">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">javascript.0.GeschirrAN</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="logic_boolean" id="?ny:H9Y}Y7AB|NfaV`}?">
                                          <field name="BOOL">TRUE</field>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="procedures_callnoreturn" id="eYzV:^zYCy#{}*;R0}Fn" inline="false">
                                          <mutation name="MeldungGeschirrspueler">
                                            <arg name="MeldetextGeschirrspueler"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="text" id="!IvV/+3%;HhS:H#S9$Nz">
                                              <field name="TEXT">Test</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="controls_if" id="}PNx(sa%gVaK:85;d|;|">
                                              <value name="IF0">
                                                <block type="logic_compare" id="/:0N:VVJHcL/_oSkx.*9">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="variables_get" id="G!YY(3m8]@owUu1;2ILx">
                                                      <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="Ew.s$s5g2AR%#k=H4B(R">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="debug" id="M6p~WS,`Uze^qXDii~z}">
                                                  <field name="Severity">warn</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="N@!52j~`_k(+2/jQ?kIU">
                                                      <field name="TEXT">Spüler gestartet</field>
                                                    </shadow>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF1">
                                    <block type="logic_compare" id="x8PHiEY1^~m_(JD8f#(4">
                                      <field name="OP">GT</field>
                                      <value name="A">
                                        <block type="get_value" id="VGspp{O4inEIXH/IU0UP">
                                          <field name="ATTR">val</field>
                                          <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="variables_get" id="m+3xG_Y{E8[i,Q^i}2?d">
                                          <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO1">
                                    <block type="comment" id="#A.3t@uY:wy_f[=r_^5#">
                                      <field name="COMMENT">Timer stoppen</field>
                                      <next>
                                        <block type="procedures_callnoreturn" id="_h|uV?OXs4cBnD.F#gV(">
                                          <mutation name="FertigCheckGeschirr">
                                            <arg name="ParameterGeschirr"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="logic_boolean" id="Dt73+QxwM^pYb=FxKVg}">
                                              <field name="BOOL">FALSE</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="controls_if" id="*[?tf%:[wkK9y+S2+c_1">
                                              <value name="IF0">
                                                <block type="logic_compare" id="T*{/pPM-gJ%xJZ_!UexJ">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="variables_get" id="?]_B%s~fEcA)vvMFV4;#">
                                                      <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="s^J0~YHo`=De*q~RNpMg">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="debug" id="5ZOuwA(A7)3er0il#?H|">
                                                  <field name="Severity">warn</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="Am%OJk2poU)C[J5Lyr,:">
                                                      <field name="TEXT">Timer stop 1</field>
                                                    </shadow>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                  <value name="IF2">
                                    <block type="logic_operation" id="9E09u6_c!]S%uK][GxZT" inline="false">
                                      <field name="OP">AND</field>
                                      <value name="A">
                                        <block type="logic_compare" id="|FQyNnNf.;C?Bf57#(k)">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="F)r$MFwv%V_s/}ICNh@!">
                                              <field name="ATTR">val</field>
                                              <field name="OID">sonoff.0.esp-geschirr.ENERGY_Power</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="variables_get" id="??Q-;*%n_!Ll[^3~m3dL">
                                              <field name="VAR" id="q=GxpUq(kxYM#9hpA}6A">GrenzwertInWattMinimalGeschirrspuel</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <value name="B">
                                        <block type="logic_compare" id="?a`h-5Hy#T8P@1;1*@+^">
                                          <field name="OP">EQ</field>
                                          <value name="A">
                                            <block type="get_value" id="!nKAF.N%q57;zxT-/(w)">
                                              <field name="ATTR">val</field>
                                              <field name="OID">javascript.0.GeschirrAN</field>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="logic_boolean" id="5b8Z:D*a#-jCb|PUpHz+">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <statement name="DO2">
                                    <block type="comment" id="/7!997Z,F^FbfW~F=c=[">
                                      <field name="COMMENT">Timer starten</field>
                                      <next>
                                        <block type="procedures_callnoreturn" id="-]2O!g]IA`flk5z_!i7p">
                                          <mutation name="FertigCheckGeschirr">
                                            <arg name="ParameterGeschirr"></arg>
                                          </mutation>
                                          <value name="ARG0">
                                            <block type="logic_boolean" id="RP`80nF1[mMAa%oBokFW">
                                              <field name="BOOL">TRUE</field>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="controls_if" id="e[E[!RxQ,h7d44,d=uz!">
                                              <value name="IF0">
                                                <block type="logic_compare" id="@l{W:i(VTt#X:%j.PH`~">
                                                  <field name="OP">EQ</field>
                                                  <value name="A">
                                                    <block type="variables_get" id="g}px(%_ABElaoiISKm0b">
                                                      <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                                                    </block>
                                                  </value>
                                                  <value name="B">
                                                    <block type="logic_boolean" id="qTj-.U}PL5$0}D]ioz@X">
                                                      <field name="BOOL">TRUE</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <statement name="DO0">
                                                <block type="debug" id="zMY,w4h*XXqtEM3srwvH">
                                                  <field name="Severity">warn</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="kcaZqD!OxBFLV$X;wWSf">
                                                      <field name="TEXT">Timer start 1</field>
                                                    </shadow>
                                                  </value>
                                                </block>
                                              </statement>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </statement>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </next>
        </block>
        <block type="procedures_defnoreturn" id="v~yF@}3|Cz*|DRanQJ3E" x="163" y="237">
          <mutation>
            <arg name="MeldetextGeschirrspueler" varid="r%-J*h%5tS#4F{]Qs|ie"></arg>
          </mutation>
          <field name="NAME">MeldungGeschirrspueler</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="jhj!Cl7MKA=-I`##WQ/u">
              <value name="IF0">
                <block type="logic_compare" id="~3NiT]j!?JC?:hOWlXlI">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="variables_get" id="noox7i6lNy!L@%}2id/#">
                      <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="ozB=gWahs5amQuQtDE}*">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="debug" id="mjJb[n:y/j5jIR7NuuH9">
                  <field name="Severity">warn</field>
                  <value name="TEXT">
                    <shadow type="text" id="x6?2gN^$gPoi-]}2DQ|R">
                      <field name="TEXT">Meldung test</field>
                    </shadow>
                    <block type="variables_get" id="Di[D^m6W$X}cHxJ)gqp4">
                      <field name="VAR" id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</field>
                    </block>
                  </value>
                </block>
              </statement>
              <next>
                <block type="pushover" id="=UkSukTZRxC?o$H]^~8Y">
                  <field name="INSTANCE"></field>
                  <field name="SOUND"></field>
                  <field name="PRIORITY">0</field>
                  <field name="LOG"></field>
                  <value name="MESSAGE">
                    <shadow type="text" id="sullr6+u[X?0+[9TUN_Y">
                      <field name="TEXT">text</field>
                    </shadow>
                    <block type="variables_get" id="qNmv(cwN{511k]p/h?u8">
                      <field name="VAR" id="r%-J*h%5tS#4F{]Qs|ie">MeldetextGeschirrspueler</field>
                    </block>
                  </value>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="procedures_defnoreturn" id="1~WDN$W1oZ~,.o3}[NKZ" x="663" y="238">
          <mutation>
            <arg name="ParameterGeschirr" varid="w2-Nu8N87+33+q6KGyC5"></arg>
          </mutation>
          <field name="NAME">FertigCheckGeschirr</field>
          <comment pinned="false" h="80" w="160">Beschreibe diese Funktion …</comment>
          <statement name="STACK">
            <block type="controls_if" id="*fM_68Etb4-4nK]{S,Mh">
              <mutation elseif="1"></mutation>
              <value name="IF0">
                <block type="logic_compare" id="~lmv4?iRN}.7R1?F4u{c">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="variables_get" id="#FZ413Q}S*[Y~uuUieE`">
                      <field name="VAR" id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="zPF2eBXhV;P^$?fr#{gM">
                      <field name="BOOL">TRUE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO0">
                <block type="controls_if" id="EwVn55ln`P|ZA8K+=7.|">
                  <value name="IF0">
                    <block type="logic_compare" id="lSS8x_tiWmQmO[wQ7K}:">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="jf`D546Gw;dESK^m[VG`">
                          <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="m3~N90XUy9rD%C5lnX_H">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="1lgZ7%!vy2|@Qgy_%X+D">
                      <field name="Severity">warn</field>
                      <value name="TEXT">
                        <shadow type="text" id="c^tktb9U?i=A[N|?#^,n">
                          <field name="TEXT">Timer start 2</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="I4S%kpUq5t3O:B/JyJ^8">
                      <field name="COMMENT">Timer starten</field>
                      <next>
                        <block type="timeouts_settimeout" id="V)~?NBS4^PWExZ@d*iZI">
                          <field name="NAME">timeout</field>
                          <field name="DELAY">40</field>
                          <field name="UNIT">sec</field>
                          <statement name="STATEMENT">
                            <block type="update" id="},P:kNo]]fa),9TSOIZD">
                              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                              <field name="OID">javascript.0.GeschirrAN</field>
                              <field name="WITH_DELAY">FALSE</field>
                              <value name="VALUE">
                                <block type="logic_boolean" id="ZEURV(Tk)#0#q]exJY%0">
                                  <field name="BOOL">FALSE</field>
                                </block>
                              </value>
                              <next>
                                <block type="procedures_callnoreturn" id="C[mTr}mv4aHWy)A`fd0r">
                                  <mutation name="MeldungGeschirrspueler">
                                    <arg name="MeldetextGeschirrspueler"></arg>
                                  </mutation>
                                  <next>
                                    <block type="variables_set" id="3+4dl8kul/@gq9i|$ev=">
                                      <field name="VAR" id="=YT[zFBDU,v1Zl^=yt=b">LeistungGeschirrspuel</field>
                                      <value name="VALUE">
                                        <block type="get_value" id="=+]nR{I|1MX@*,}eCGhH">
                                          <field name="ATTR">val</field>
                                          <field name="OID">sonoff.0.esp-geschirr.ENERGY_Total</field>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
              <value name="IF1">
                <block type="logic_compare" id="7S|nTJdw|I%xMC~l!V3_">
                  <field name="OP">EQ</field>
                  <value name="A">
                    <block type="variables_get" id="Ji7]E`4LDDXI,Y#(-Y,v">
                      <field name="VAR" id="w2-Nu8N87+33+q6KGyC5">ParameterGeschirr</field>
                    </block>
                  </value>
                  <value name="B">
                    <block type="logic_boolean" id="T?R580i]FH~sx~%yyneM">
                      <field name="BOOL">FALSE</field>
                    </block>
                  </value>
                </block>
              </value>
              <statement name="DO1">
                <block type="controls_if" id=":Vp!ebln!WPo7zhRpeGl">
                  <value name="IF0">
                    <block type="logic_compare" id="i)4O`=FB-{j0bW/bA8%6">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="qY#WnwD7c8Fi{I3vmw!%">
                          <field name="VAR" id="xC5@G,_.m=LKNd-FZ,zm">debug</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="*ymp/]p%q(a;xckSOQwP">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="`LB57#({H_;])h^!2QfM">
                      <field name="Severity">warn</field>
                      <value name="TEXT">
                        <shadow type="text" id=":8XD3)Gtu?y}Wh:#y=.=">
                          <field name="TEXT">Timer stop 2</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                  <next>
                    <block type="comment" id="k9$9]n~hY%;/hVKU?SL_">
                      <field name="COMMENT">Timer stoppen</field>
                      <next>
                        <block type="timeouts_cleartimeout" id="WCPp/Ps+20WyRD/;Q=Hr">
                          <field name="NAME">timeout</field>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </statement>
            </block>
          </statement>
        </block>
      </xml>
      
      paul53P Offline
      paul53P Offline
      paul53
      schrieb am zuletzt editiert von
      #2

      @prozac
      Was erwartest Du hier ?

      Bild_2021-01-25_211619.png

      Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
      Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

      P 1 Antwort Letzte Antwort
      0
      • paul53P paul53

        @prozac
        Was erwartest Du hier ?

        Bild_2021-01-25_211619.png

        P Offline
        P Offline
        PRozAC
        schrieb am zuletzt editiert von PRozAC
        #3

        @prozac
        Was erwartest Du hier ?

        Wenn du den Funktionsaufruf meinst... da kommt der Text mit der Fertigmeldung rein.
        Aber ich habe es jetzt hin bekommen. Entweder war der Name der Funktion und/oder der Name der Variable zu lang.
        Ich habe beide jetzt deutlich gekürzt und es geht.

        Da kommt mir gleich eine weitere Frage: kann ich bei mehreren verschiedenen blockly scripten dieselben Bezeichnungen für dir Variablen und Funktionen nehmen oder gelten sie global?

        Sprich: blockly kopieren, Datenpunkte anpassen und gut?
        Wäre praktisch als template für verschiedene Geräte.

        paul53P 1 Antwort Letzte Antwort
        0
        • P PRozAC

          @prozac
          Was erwartest Du hier ?

          Wenn du den Funktionsaufruf meinst... da kommt der Text mit der Fertigmeldung rein.
          Aber ich habe es jetzt hin bekommen. Entweder war der Name der Funktion und/oder der Name der Variable zu lang.
          Ich habe beide jetzt deutlich gekürzt und es geht.

          Da kommt mir gleich eine weitere Frage: kann ich bei mehreren verschiedenen blockly scripten dieselben Bezeichnungen für dir Variablen und Funktionen nehmen oder gelten sie global?

          Sprich: blockly kopieren, Datenpunkte anpassen und gut?
          Wäre praktisch als template für verschiedene Geräte.

          paul53P Offline
          paul53P Offline
          paul53
          schrieb am zuletzt editiert von
          #4

          @prozac sagte: kann ich bei mehreren verschiedenen blockly scripten dieselben Bezeichnungen für dir Variablen und Funktionen nehmen oder gelten sie global?

          Ja, der Gültigkeitsbereich ist maximal das Script, bei lokalen Variablen sogar nur die Funktion.

          Bitte verzichtet auf Chat-Nachrichten, denn die Handhabung ist grauenhaft !
          Produktiv: RPi 2 mit S.USV, HM-MOD-RPI und SLC-USB-Stick mit root fs

          1 Antwort Letzte Antwort
          1
          • XenonX Offline
            XenonX Offline
            Xenon
            Forum Testing Developer
            schrieb am zuletzt editiert von
            #5

            oder einfach den "device-reminder" Adapter nutzen und nicht ständig hier die gleichen Fragen zu den immer gleichen Themen stellen ...

            wenn euch mein Beitrag geholfen hat, bewertet ihn bitte unten rechts :)

            P Albert KA 2 Antworten Letzte Antwort
            -1
            • XenonX Xenon

              oder einfach den "device-reminder" Adapter nutzen und nicht ständig hier die gleichen Fragen zu den immer gleichen Themen stellen ...

              P Offline
              P Offline
              PRozAC
              schrieb am zuletzt editiert von
              #6

              @xenon
              Auch wenn mir nicht klar ist, welches Thema ich hier erneut aufgegriffen habe (mein blockly hatte ein Problem). Und ich brauch keinen weiteren Adapter wenn nun alles läuft :+1:

              1 Antwort Letzte Antwort
              0
              • XenonX Xenon

                oder einfach den "device-reminder" Adapter nutzen und nicht ständig hier die gleichen Fragen zu den immer gleichen Themen stellen ...

                Albert KA Offline
                Albert KA Offline
                Albert K
                schrieb am zuletzt editiert von
                #7

                @xenon

                also entschuldige bitte, das ist schon ein etwas komischer Kommentar.

                • Es gibt Leute die sehr viel und gerne aus diesen Fragen und Problemen lernen.
                • Es gibt Leute die offensichtlich gerne und fachmännisch helfen (z.B. @paul53 ) und dabei vielleicht auch noch was lernen
                • Es gibt Leute die sich das lieber selbst zusammenbauen möchten anstatt nur diverse Adapter zu installieren

                Und es wird niemand gezwungen die Posts zu lesen und zu beantworten.

                Daher empfinde ich Deinen Kommentar schon als sehr abwertend und fast schon arrogant, sorry.

                1 Antwort Letzte Antwort
                1
                Antworten
                • In einem neuen Thema antworten
                Anmelden zum Antworten
                • Älteste zuerst
                • Neuste zuerst
                • Meiste Stimmen


                Support us

                ioBroker
                Community Adapters
                Donate

                824

                Online

                32.6k

                Benutzer

                82.0k

                Themen

                1.3m

                Beiträge
                Community
                Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                ioBroker Community 2014-2025
                logo
                • Anmelden

                • Du hast noch kein Konto? Registrieren

                • Anmelden oder registrieren, um zu suchen
                • Erster Beitrag
                  Letzter Beitrag
                0
                • Home
                • Aktuell
                • Tags
                • Ungelesen 0
                • Kategorien
                • Unreplied
                • Beliebt
                • GitHub
                • Docu
                • Hilfe