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. Einfache Falls Abfrage geht nicht

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

Einfache Falls Abfrage geht nicht

Geplant Angeheftet Gesperrt Verschoben Blockly
6 Beiträge 3 Kommentatoren 346 Aufrufe 2 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.
  • K Offline
    K Offline
    krodon
    schrieb am zuletzt editiert von krodon
    #1

    Hallo,

    meine einfache Abfrage bekomme ich nicht zum Laufen und verstehe nicht warum, es wird nur ein Boolean abgefragt und die . Meldung kommt nicht.

    Forum1.JPG

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
      </variables>
      <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
        <value name="VALUE">
          <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
            <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
          </block>
        </value>
      </block>
      <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
        <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="IJiEC0UE3Hb:6sZ5ljpm">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
            <field name="Severity">warn</field>
            <value name="TEXT">
              <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                <field name="TEXT">gestartet</field>
              </shadow>
              <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                    <field name="TEXT">gestartet  </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                <value name="IF0">
                  <block type="get_value_var" id="YyS_*z_4YBs|685YIFfn">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="u{.YC(ln_Ug)igS%lGLQ">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                    <field name="Severity">error</field>
                    <value name="TEXT">
                      <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                        <field name="TEXT">Lampe</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">false</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
            <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
            <field name="WITH_DELAY">TRUE</field>
            <field name="DELAY_MS">2</field>
            <field name="UNIT">sec</field>
            <field name="CLEAR_RUNNING">FALSE</field>
            <value name="VALUE">
              <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </xml>
    
    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
      </variables>
      <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
        <value name="VALUE">
          <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
            <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
          </block>
        </value>
      </block>
      <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
        <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="IJiEC0UE3Hb:6sZ5ljpm">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
            <field name="Severity">warn</field>
            <value name="TEXT">
              <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                <field name="TEXT">gestartet</field>
              </shadow>
              <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                    <field name="TEXT">gestartet  </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                <value name="IF0">
                  <block type="get_value_var" id="YyS_*z_4YBs|685YIFfn">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="u{.YC(ln_Ug)igS%lGLQ">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                        <field name="OP">EQ</field>
                        <value name="A">
                          <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                          </block>
                        </value>
                        <value name="B">
                          <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                            <field name="BOOL">TRUE</field>
                          </block>
                        </value>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                    <field name="Severity">error</field>
                    <value name="TEXT">
                      <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                        <field name="TEXT">Lampe</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">false</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
            <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
            <field name="WITH_DELAY">TRUE</field>
            <field name="DELAY_MS">2</field>
            <field name="UNIT">sec</field>
            <field name="CLEAR_RUNNING">FALSE</field>
            <value name="VALUE">
              <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </xml>
    
    

    Fehlermeldung::

    javascript.0
    	2025-03-19 15:13:22.498	error	at process.processImmediate (node:internal/timers:483:21)
    javascript.0
    	2025-03-19 15:13:22.498	error	at Immediate.<anonymous> (file:///opt/iobroker/node_modules/@iobroker/db-states-redis/build/esm/lib/states/statesInRedisClient.js:291:37)
    javascript.0
    	2025-03-19 15:13:22.498	error	at change (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/cjs/lib/adapter/adapter.js:7312:31)
    javascript.0
    	2025-03-19 15:13:22.498	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:645:29)
    javascript.0
    	2025-03-19 15:13:22.498	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1452:38)
    javascript.0
    	2025-03-19 15:13:22.498	error	at Object.<anonymous> (script.js.Licht.Bad.V2_04:11:32)
    javascript.0
    	2025-03-19 15:13:22.498	error	script.js.Licht.Bad.V2_04: TypeError: Cannot read properties of undefined (reading 'val')
    javascript.0
    	2025-03-19 15:13:22.496	error	script.js.Licht.Bad.V2_04: getState has been called with id of type "boolean" but expects a string
    javascript.0
    	2025-03-19 15:13:22.496	warn	script.js.Licht.Bad.V2_04: gestartet true
    javascript.0
    	2025-03-19 15:13:15.148	info	script.js.Licht.Bad.V2_04: registered 1 subscription, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
    javascript.0
    	2025-03-19 15:13:15.145	info	Start JavaScript script.js.Licht.Bad.V2_04 (Blockly)
    javascript.0
    	2025-03-19 15:13:15.057	info	Stopping script script.js.Licht.Bad.V2_04
    

    Dann habe ich es so probiert::

    Forum2.JPG

    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
      </variables>
      <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
        <value name="VALUE">
          <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
            <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
          </block>
        </value>
      </block>
      <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
        <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="IJiEC0UE3Hb:6sZ5ljpm">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
            <field name="Severity">warn</field>
            <value name="TEXT">
              <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                <field name="TEXT">gestartet</field>
              </shadow>
              <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                    <field name="TEXT">gestartet  </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                <value name="IF0">
                  <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                    <field name="Severity">error</field>
                    <value name="TEXT">
                      <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                        <field name="TEXT">Lampe</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">false</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
            <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
            <field name="WITH_DELAY">TRUE</field>
            <field name="DELAY_MS">2</field>
            <field name="UNIT">sec</field>
            <field name="CLEAR_RUNNING">FALSE</field>
            <value name="VALUE">
              <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </xml>
    
    <xml xmlns="https://developers.google.com/blockly/xml">
      <variables>
        <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
      </variables>
      <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
        <value name="VALUE">
          <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
            <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
          </block>
        </value>
      </block>
      <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
        <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="IJiEC0UE3Hb:6sZ5ljpm">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
            <field name="Severity">warn</field>
            <value name="TEXT">
              <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                <field name="TEXT">gestartet</field>
              </shadow>
              <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                <mutation items="2"></mutation>
                <value name="ADD0">
                  <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                    <field name="TEXT">gestartet  </field>
                  </block>
                </value>
                <value name="ADD1">
                  <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                    <field name="ATTR">val</field>
                    <value name="OID">
                      <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                        <field name="oid">ID auswählen</field>
                      </shadow>
                      <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                <value name="IF0">
                  <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                    <field name="OP">EQ</field>
                    <value name="A">
                      <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                        <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                      </block>
                    </value>
                    <value name="B">
                      <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                        <field name="BOOL">TRUE</field>
                      </block>
                    </value>
                  </block>
                </value>
                <statement name="DO0">
                  <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                    <field name="Severity">error</field>
                    <value name="TEXT">
                      <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                        <field name="TEXT">Lampe</field>
                      </shadow>
                    </value>
                  </block>
                </statement>
              </block>
            </next>
          </block>
        </statement>
      </block>
      <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
        <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
        <field name="CONDITION">false</field>
        <field name="ACK_CONDITION"></field>
        <value name="OID0">
          <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
            <field name="oid">ID auswählen</field>
          </shadow>
          <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
            <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          </block>
        </value>
        <statement name="STATEMENT">
          <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
            <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
            <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
            <field name="WITH_DELAY">TRUE</field>
            <field name="DELAY_MS">2</field>
            <field name="UNIT">sec</field>
            <field name="CLEAR_RUNNING">FALSE</field>
            <value name="VALUE">
              <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                <field name="BOOL">FALSE</field>
              </block>
            </value>
          </block>
        </statement>
      </block>
    </xml>
    
    

    Fehlermeldung:

    avascript.0
    	2025-03-19 15:24:08.033	warn	script.js.Licht.Bad.V2_04: gestartet true
    

    Obwohl true angezeigt wird, wird es nicht ausgeführt.

    VG

    Krodon

    paul53P 1 Antwort Letzte Antwort
    0
    • K krodon

      Hallo,

      meine einfache Abfrage bekomme ich nicht zum Laufen und verstehe nicht warum, es wird nur ein Boolean abgefragt und die . Meldung kommt nicht.

      Forum1.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
        </variables>
        <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          <value name="VALUE">
            <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
              <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
            </block>
          </value>
        </block>
        <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
          <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="IJiEC0UE3Hb:6sZ5ljpm">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
              <field name="Severity">warn</field>
              <value name="TEXT">
                <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                  <field name="TEXT">gestartet</field>
                </shadow>
                <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                  <mutation items="2"></mutation>
                  <value name="ADD0">
                    <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                      <field name="TEXT">gestartet  </field>
                    </block>
                  </value>
                  <value name="ADD1">
                    <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                  <value name="IF0">
                    <block type="get_value_var" id="YyS_*z_4YBs|685YIFfn">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="u{.YC(ln_Ug)igS%lGLQ">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                      <field name="Severity">error</field>
                      <value name="TEXT">
                        <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                          <field name="TEXT">Lampe</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">false</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
              <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
              <field name="WITH_DELAY">TRUE</field>
              <field name="DELAY_MS">2</field>
              <field name="UNIT">sec</field>
              <field name="CLEAR_RUNNING">FALSE</field>
              <value name="VALUE">
                <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                  <field name="BOOL">FALSE</field>
                </block>
              </value>
            </block>
          </statement>
        </block>
      </xml>
      
      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
        </variables>
        <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          <value name="VALUE">
            <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
              <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
            </block>
          </value>
        </block>
        <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
          <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="IJiEC0UE3Hb:6sZ5ljpm">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
              <field name="Severity">warn</field>
              <value name="TEXT">
                <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                  <field name="TEXT">gestartet</field>
                </shadow>
                <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                  <mutation items="2"></mutation>
                  <value name="ADD0">
                    <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                      <field name="TEXT">gestartet  </field>
                    </block>
                  </value>
                  <value name="ADD1">
                    <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                  <value name="IF0">
                    <block type="get_value_var" id="YyS_*z_4YBs|685YIFfn">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="u{.YC(ln_Ug)igS%lGLQ">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                          <field name="OP">EQ</field>
                          <value name="A">
                            <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                            </block>
                          </value>
                          <value name="B">
                            <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                              <field name="BOOL">TRUE</field>
                            </block>
                          </value>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                      <field name="Severity">error</field>
                      <value name="TEXT">
                        <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                          <field name="TEXT">Lampe</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">false</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
              <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
              <field name="WITH_DELAY">TRUE</field>
              <field name="DELAY_MS">2</field>
              <field name="UNIT">sec</field>
              <field name="CLEAR_RUNNING">FALSE</field>
              <value name="VALUE">
                <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                  <field name="BOOL">FALSE</field>
                </block>
              </value>
            </block>
          </statement>
        </block>
      </xml>
      
      

      Fehlermeldung::

      javascript.0
      	2025-03-19 15:13:22.498	error	at process.processImmediate (node:internal/timers:483:21)
      javascript.0
      	2025-03-19 15:13:22.498	error	at Immediate.<anonymous> (file:///opt/iobroker/node_modules/@iobroker/db-states-redis/build/esm/lib/states/statesInRedisClient.js:291:37)
      javascript.0
      	2025-03-19 15:13:22.498	error	at change (/opt/iobroker/node_modules/@iobroker/js-controller-adapter/build/cjs/lib/adapter/adapter.js:7312:31)
      javascript.0
      	2025-03-19 15:13:22.498	error	at Object.stateChange (/opt/iobroker/node_modules/iobroker.javascript/main.js:645:29)
      javascript.0
      	2025-03-19 15:13:22.498	error	at Object.callback (/opt/iobroker/node_modules/iobroker.javascript/lib/sandbox.js:1452:38)
      javascript.0
      	2025-03-19 15:13:22.498	error	at Object.<anonymous> (script.js.Licht.Bad.V2_04:11:32)
      javascript.0
      	2025-03-19 15:13:22.498	error	script.js.Licht.Bad.V2_04: TypeError: Cannot read properties of undefined (reading 'val')
      javascript.0
      	2025-03-19 15:13:22.496	error	script.js.Licht.Bad.V2_04: getState has been called with id of type "boolean" but expects a string
      javascript.0
      	2025-03-19 15:13:22.496	warn	script.js.Licht.Bad.V2_04: gestartet true
      javascript.0
      	2025-03-19 15:13:15.148	info	script.js.Licht.Bad.V2_04: registered 1 subscription, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
      javascript.0
      	2025-03-19 15:13:15.145	info	Start JavaScript script.js.Licht.Bad.V2_04 (Blockly)
      javascript.0
      	2025-03-19 15:13:15.057	info	Stopping script script.js.Licht.Bad.V2_04
      

      Dann habe ich es so probiert::

      Forum2.JPG

      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
        </variables>
        <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          <value name="VALUE">
            <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
              <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
            </block>
          </value>
        </block>
        <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
          <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="IJiEC0UE3Hb:6sZ5ljpm">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
              <field name="Severity">warn</field>
              <value name="TEXT">
                <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                  <field name="TEXT">gestartet</field>
                </shadow>
                <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                  <mutation items="2"></mutation>
                  <value name="ADD0">
                    <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                      <field name="TEXT">gestartet  </field>
                    </block>
                  </value>
                  <value name="ADD1">
                    <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                  <value name="IF0">
                    <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                      <field name="Severity">error</field>
                      <value name="TEXT">
                        <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                          <field name="TEXT">Lampe</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">false</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
              <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
              <field name="WITH_DELAY">TRUE</field>
              <field name="DELAY_MS">2</field>
              <field name="UNIT">sec</field>
              <field name="CLEAR_RUNNING">FALSE</field>
              <value name="VALUE">
                <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                  <field name="BOOL">FALSE</field>
                </block>
              </value>
            </block>
          </statement>
        </block>
      </xml>
      
      <xml xmlns="https://developers.google.com/blockly/xml">
        <variables>
          <variable id="Py[rK)6s1i[2500)].{r">Lampe</variable>
        </variables>
        <block type="variables_set" id="l_VdLKv1l~xL,gMm6-gY" x="-1637" y="463">
          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
          <value name="VALUE">
            <block type="text" id="gPDfvyl8PJ/,XCbRt/B{">
              <field name="TEXT">alias.0.Bad.Licht.Licht_Decke.ON</field>
            </block>
          </value>
        </block>
        <block type="on_ext" id="EUlhAA(rO@4E]G9~Vu(U" inline="true" x="-1687" y="538">
          <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="IJiEC0UE3Hb:6sZ5ljpm">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="QpCku!u~FRi{m.Y;aHQh">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="debug" id="=w+SwR7e-fAhAXM7^TFf">
              <field name="Severity">warn</field>
              <value name="TEXT">
                <shadow type="text" id="I)KvULNvf!l]}O+kj.a0">
                  <field name="TEXT">gestartet</field>
                </shadow>
                <block type="text_join" id="ocfs|Gy}5CnOnPc!q|0L">
                  <mutation items="2"></mutation>
                  <value name="ADD0">
                    <block type="text" id="}43%zl%Y#6/pe:*%O*N:">
                      <field name="TEXT">gestartet  </field>
                    </block>
                  </value>
                  <value name="ADD1">
                    <block type="get_value_var" id="+bE5|Af;3wvG6dd6h#|}">
                      <field name="ATTR">val</field>
                      <value name="OID">
                        <shadow type="field_oid" id="Ro3Sc4:!_v!6z,_?VsLk">
                          <field name="oid">ID auswählen</field>
                        </shadow>
                        <block type="variables_get" id="g$[23}9Dn;`%]U55:)`N">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="controls_if" id="YQY8`XBixA7?kv*6c]02">
                  <value name="IF0">
                    <block type="logic_compare" id="Bv+tvIFrGo}F_%y72vLL">
                      <field name="OP">EQ</field>
                      <value name="A">
                        <block type="variables_get" id="CKsKU6mZQ-Teat(mGnyS">
                          <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
                        </block>
                      </value>
                      <value name="B">
                        <block type="logic_boolean" id="SA/BdyPxcmvfZ!Q%xn-}">
                          <field name="BOOL">TRUE</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <statement name="DO0">
                    <block type="debug" id="id]hyxW+^/~(T9${lP[N">
                      <field name="Severity">error</field>
                      <value name="TEXT">
                        <shadow type="text" id="!w(ktF{EE9v[o=G/*:9M">
                          <field name="TEXT">Lampe</field>
                        </shadow>
                      </value>
                    </block>
                  </statement>
                </block>
              </next>
            </block>
          </statement>
        </block>
        <block type="on_ext" id="/b{BPf+oYaoK.QmF?8Bo" inline="true" collapsed="true" disabled="true" x="-1412" y="538">
          <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
          <field name="CONDITION">false</field>
          <field name="ACK_CONDITION"></field>
          <value name="OID0">
            <shadow type="field_oid" id="?//+uI=~Tq7~oEf[8o2%">
              <field name="oid">ID auswählen</field>
            </shadow>
            <block type="variables_get" id="W,I26JNu$GH:fq3rwjHS">
              <field name="VAR" id="Py[rK)6s1i[2500)].{r">Lampe</field>
            </block>
          </value>
          <statement name="STATEMENT">
            <block type="control" id="QKJkdy?!@~ELkZ[!}avy">
              <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="true"></mutation>
              <field name="OID">0_userdata.0.Bad.Licht.Bewegungsmelder_disable</field>
              <field name="WITH_DELAY">TRUE</field>
              <field name="DELAY_MS">2</field>
              <field name="UNIT">sec</field>
              <field name="CLEAR_RUNNING">FALSE</field>
              <value name="VALUE">
                <block type="logic_boolean" id="##Qupd]K{nfN5kE0KTlz">
                  <field name="BOOL">FALSE</field>
                </block>
              </value>
            </block>
          </statement>
        </block>
      </xml>
      
      

      Fehlermeldung:

      avascript.0
      	2025-03-19 15:24:08.033	warn	script.js.Licht.Bad.V2_04: gestartet true
      

      Obwohl true angezeigt wird, wird es nicht ausgeführt.

      VG

      Krodon

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

      @krodon sagte: wird es nicht ausgeführt.

      Du vergleichst die ID (String) mit wahr. Dabei ist es ganz einfach:

      Blockly_temp.JPG

      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

      K 1 Antwort Letzte Antwort
      0
      • paul53P paul53

        @krodon sagte: wird es nicht ausgeführt.

        Du vergleichst die ID (String) mit wahr. Dabei ist es ganz einfach:

        Blockly_temp.JPG

        K Offline
        K Offline
        krodon
        schrieb am zuletzt editiert von
        #3

        @paul53 ich wollte es aber mit der Variablen machen, damit ich den String nicht an allen Stellen, bei einer Änderung neu eintragen muss, gibt es hierzu eine Lösung?

        VG

        Krodon

        AsgothianA paul53P 2 Antworten Letzte Antwort
        0
        • K krodon

          @paul53 ich wollte es aber mit der Variablen machen, damit ich den String nicht an allen Stellen, bei einer Änderung neu eintragen muss, gibt es hierzu eine Lösung?

          VG

          Krodon

          AsgothianA Offline
          AsgothianA Offline
          Asgothian
          Developer
          schrieb am zuletzt editiert von
          #4

          @krodon Du hast einen Systematischen Fehler in deinem ersten Versuch:

          Screenshot 2025-03-19 at 16.49.12.png

          Da passt im falls die Reihenfolge der Blöcke nicht:
          Screenshot 2025-03-19 at 16.50.10.png
          muss so aussehen:
          Screenshot 2025-03-19 at 16.52.01.png

          Dann macht das ganze mehr Sinn.

          Allerdings ist die Optimierung die @paul53 geschrieben hat Sinnvoll. Auch da musst du die ID des DP nur einmal angeben. Du kannst natürlich an der mit X bezeichneten Stelle einfach die Variable Lampe andocken.Screenshot 2025-03-19 at 16.54.35.png

          A.

          ioBroker auf RPi4 - Hardware soweit wie möglich via Zigbee.
          "Shit don't work" ist keine Fehlermeldung, sondern ein Fluch.

          K 1 Antwort Letzte Antwort
          0
          • K krodon

            @paul53 ich wollte es aber mit der Variablen machen, damit ich den String nicht an allen Stellen, bei einer Änderung neu eintragen muss, gibt es hierzu eine Lösung?

            VG

            Krodon

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

            @krodon sagte: ich wollte es aber mit der Variablen machen

            Blockly_temp.JPG

            Variablen verwendet man dann, wenn ein Wert / String mehr als einmal verwendet wird.

            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
            2
            • AsgothianA Asgothian

              @krodon Du hast einen Systematischen Fehler in deinem ersten Versuch:

              Screenshot 2025-03-19 at 16.49.12.png

              Da passt im falls die Reihenfolge der Blöcke nicht:
              Screenshot 2025-03-19 at 16.50.10.png
              muss so aussehen:
              Screenshot 2025-03-19 at 16.52.01.png

              Dann macht das ganze mehr Sinn.

              Allerdings ist die Optimierung die @paul53 geschrieben hat Sinnvoll. Auch da musst du die ID des DP nur einmal angeben. Du kannst natürlich an der mit X bezeichneten Stelle einfach die Variable Lampe andocken.Screenshot 2025-03-19 at 16.54.35.png

              A.

              K Offline
              K Offline
              krodon
              schrieb am zuletzt editiert von
              #6

              @asgothian herzlichen Dank, ich kannte den Baustein Wert nicht, mit ihm ist vieles einfacher :-)

              VG

              Krodon

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


              Support us

              ioBroker
              Community Adapters
              Donate

              551

              Online

              32.7k

              Benutzer

              82.4k

              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