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. [gelöst]Unterkategorien mit ID-Selector ansprechen

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.5k

[gelöst]Unterkategorien mit ID-Selector ansprechen

Geplant Angeheftet Gesperrt Verschoben Blockly
20 Beiträge 4 Kommentatoren 585 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.
  • M MeisterSchatten

    @codierknecht

    Bei den Fenstern klappt es. Da habe ich auch nicht so viele Ebenen.
    Bei den Energiezählern habe ich aber 3 Ebenen ( Hauptzähler, Unterzähler 1, …) da geht es nicht.
    Ich wollte auch „Ordnung“ haben und nicht alles unter „Functions“ gequetscht. Genaugenommen ist es ja auch keine Funktion.

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

    @meisterschatten sagte: Bei den Energiezählern habe ich aber 3 Ebenen ( Hauptzähler, Unterzähler 1, …) da geht es nicht.

    Unterebenen machen bei Enums keinen Sinn. Du kannst durchaus eine Kategorie "List_Meter" verwenden und direkt darunter die Aufzählungen erstellen. Beispiel:

    Enum_Meters.JPG

    Der Selektor wäre:

    var i_list = Array.prototype.slice.apply($('*(List_Meter=H00_cons_daily)'));
    

    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

    M 1 Antwort Letzte Antwort
    1
    • paul53P paul53

      @meisterschatten sagte: Bei den Energiezählern habe ich aber 3 Ebenen ( Hauptzähler, Unterzähler 1, …) da geht es nicht.

      Unterebenen machen bei Enums keinen Sinn. Du kannst durchaus eine Kategorie "List_Meter" verwenden und direkt darunter die Aufzählungen erstellen. Beispiel:

      Enum_Meters.JPG

      Der Selektor wäre:

      var i_list = Array.prototype.slice.apply($('*(List_Meter=H00_cons_daily)'));
      
      M Offline
      M Offline
      MeisterSchatten
      schrieb am zuletzt editiert von
      #6

      @paul53
      Erstmal Danke für die Hilfe!
      Ich habe es jetzt wie von Dir beschrieben aufgebaut (hätte es lieber geordneter - aber man passt sich ja an wo man kann :blush: ). Die Objekte werden gefunden, allerdings bekomme ich den Objektnamen nicht:

      // Verbrauchswerte aktuelle Zählerstände sammeln
          Nachrichtentext += String('------- Hauptzähler -------' + '\n');
          var i_list = Array.prototype.slice.apply($('*(List_Meter=meter_00_cons_daily)'));
          for (var i_index in i_list) {
            i = i_list[i_index];
            // Verbrauchswerte im Nachrichtentext verketten
            Nachrichtentext += String(('' + (await getObjectAsync(i)).common.name));
          }
      

      Wo ist mein Fehler?
      Das Abrufen von Objektwerten klappt dagegen...

      IOBroker, Raspberrymatic, Proxmox, Intel NUC

      paul53P 2 Antworten Letzte Antwort
      0
      • M MeisterSchatten

        @paul53
        Erstmal Danke für die Hilfe!
        Ich habe es jetzt wie von Dir beschrieben aufgebaut (hätte es lieber geordneter - aber man passt sich ja an wo man kann :blush: ). Die Objekte werden gefunden, allerdings bekomme ich den Objektnamen nicht:

        // Verbrauchswerte aktuelle Zählerstände sammeln
            Nachrichtentext += String('------- Hauptzähler -------' + '\n');
            var i_list = Array.prototype.slice.apply($('*(List_Meter=meter_00_cons_daily)'));
            for (var i_index in i_list) {
              i = i_list[i_index];
              // Verbrauchswerte im Nachrichtentext verketten
              Nachrichtentext += String(('' + (await getObjectAsync(i)).common.name));
            }
        

        Wo ist mein Fehler?
        Das Abrufen von Objektwerten klappt dagegen...

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

        @meisterschatten sagte: Wo ist mein Fehler?

        Poste bitte das Blockly, denn der gezeigte Javascript-Code ist unvollständig.

        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
        0
        • M Offline
          M Offline
          MeisterSchatten
          schrieb am zuletzt editiert von MeisterSchatten
          #8

          @paul53
          ok, hoffe ich mache das jetzt richtig:

          <xml xmlns="https://developers.google.com/blockly/xml">
            <variables>
              <variable id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</variable>
              <variable id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</variable>
              <variable id=";N8^1gRx_@Aa5kL6[*eO">i</variable>
              <variable id="[m1(zyS^FG5%]RKc$r/Q">n_</variable>
            </variables>
            <block type="comment" id="nEp+r#CjhA!8~fP$4kUE" x="-1337" y="-4513">
              <field name="COMMENT">Senden aller aktuellen Tagesverbrauchswerte an Telegram-Bot</field>
              <next>
                <block type="variables_set" id="O!~P;s0F8e%~j?wcjZQV">
                  <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                  <value name="VALUE">
                    <block type="text" id="*5Ki5kPJ-hQ(|m=iHTw]">
                      <field name="TEXT">Stromgestern</field>
                    </block>
                  </value>
                  <next>
                    <block type="on" id="^UswhH6fw_$gSUoS1Xqx">
                      <field name="OID">telegram.0.communicate.request</field>
                      <field name="CONDITION">any</field>
                      <field name="ACK_CONDITION"></field>
                      <statement name="STATEMENT">
                        <block type="controls_if" id=")R(r8N2xyM}?/HIv,:k!">
                          <value name="IF0">
                            <block type="logic_compare" id="!!3lc.kMJ!MGOs[j+7mR">
                              <field name="OP">GT</field>
                              <value name="A">
                                <block type="text_indexOf" id="#Qs+ACeVeoBqVu-2yp9~">
                                  <field name="END">FIRST</field>
                                  <value name="VALUE">
                                    <block type="convert_tostring" id="4`_kC@Dyg~.$(F!qQ@w8">
                                      <value name="VALUE">
                                        <block type="get_value" id="lhbt_QK$WSXv^vav._/c">
                                          <field name="ATTR">val</field>
                                          <field name="OID">telegram.0.communicate.request</field>
                                        </block>
                                      </value>
                                    </block>
                                  </value>
                                  <value name="FIND">
                                    <shadow type="text" id="s2-+](q-8WO(?7][4A(i">
                                      <field name="TEXT">abc</field>
                                    </shadow>
                                    <block type="variables_get" id="J}G!9gw:pOsY9_F7(2!b">
                                      <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <value name="B">
                                <block type="math_number" id="[7E){e[Ath2f;SG?xjA/">
                                  <field name="NUM">0</field>
                                </block>
                              </value>
                            </block>
                          </value>
                          <statement name="DO0">
                            <block type="debug" id="xgU.]_agzkK^kA3u@ms(" disabled="true">
                              <field name="Severity">info</field>
                              <value name="TEXT">
                                <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                  <field name="TEXT">test</field>
                                </shadow>
                                <block type="convert_tostring" id="4dsuJo$`Ql`m^rCY^9u-">
                                  <value name="VALUE">
                                    <block type="text" id="o}9t:W;#sBzi*5(]*KWU">
                                      <field name="TEXT">Stromgestern</field>
                                    </block>
                                  </value>
                                </block>
                              </value>
                              <next>
                                <block type="comment" id="~.#K~D%BUox8E-pqyh?3">
                                  <field name="COMMENT">Verbrauchswerte aktuelle Zählerstände sammeln</field>
                                  <next>
                                    <block type="text_append" id="B29v4,$onBh:7|/qAmj!">
                                      <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                      <value name="TEXT">
                                        <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                          <field name="TEXT"></field>
                                        </shadow>
                                        <block type="text_join" id="r)9=7|IxW~1j|*aplNtm">
                                          <mutation items="2"></mutation>
                                          <value name="ADD0">
                                            <block type="text" id="HUeSx:~leb^Yzd,cs[$[">
                                              <field name="TEXT">------- Hauptzähler -------</field>
                                            </block>
                                          </value>
                                          <value name="ADD1">
                                            <block type="text_newline" id="ea?YZMp~JSEm%]T#;t;B">
                                              <field name="Type">\n</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="controls_forEach" id="B_9uX!SZ`I#3f#5w;Y@|">
                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                          <value name="LIST">
                                            <block type="selector" id="=hweWaw/N.R7Gh]V+d.Q">
                                              <field name="TEXT">*(List_Meter=meter_00_cons_daily)</field>
                                            </block>
                                          </value>
                                          <statement name="DO">
                                            <block type="comment" id="e!~%@hHk/d7GsiauP)h%">
                                              <field name="COMMENT">Verbrauchswerte im Nachrichtentext verketten</field>
                                              <next>
                                                <block type="debug" id="gdohwz)57(uvo~10=E$=">
                                                  <field name="Severity">info</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                      <field name="TEXT">test</field>
                                                    </shadow>
                                                    <block type="text_join" id=":9~.R~9xi1]2O[2+Rohy">
                                                      <mutation items="2"></mutation>
                                                      <value name="ADD0">
                                                        <block type="convert_tostring" id="IS*d^)/c}}3jQ-QDR@|r">
                                                          <value name="VALUE">
                                                            <block type="get_value_var" id="g%SkC,ft}cmHyROv(/f0">
                                                              <field name="ATTR">common.name</field>
                                                              <value name="OID">
                                                                <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                  <field name="oid">Object ID</field>
                                                                </shadow>
                                                                <block type="variables_get" id="h1Y[:vxRijE.YlAWPQpu">
                                                                  <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <value name="ADD1">
                                                        <block type="text" id="a:`YTf984uH)Bj/8R/wt">
                                                          <field name="TEXT">meter_00</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="variables_set" id="0m_yT7o$1jra0qBVZ4WN">
                                                      <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                      <value name="VALUE">
                                                        <block type="text_indexOf" id="Jz#M56N8pL?GMh`3.Y44">
                                                          <field name="END">FIRST</field>
                                                          <value name="VALUE">
                                                            <block type="get_value_var" id="GIF^q(+K|Ow{[~xa+o}_">
                                                              <field name="ATTR">common.name</field>
                                                              <value name="OID">
                                                                <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                  <field name="oid">Object ID</field>
                                                                </shadow>
                                                                <block type="variables_get" id="r+{!0X[48U6I+Z%#XM~P">
                                                                  <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <value name="FIND">
                                                            <shadow type="text" id="[ve/id#fbF86Bz-1(D%5">
                                                              <field name="TEXT">==</field>
                                                            </shadow>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="text_append" id="8Dtb(5PbHn9;M$PxgfCh">
                                                          <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                          <value name="TEXT">
                                                            <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                              <field name="TEXT"></field>
                                                            </shadow>
                                                            <block type="text_join" id="rl)-ua=s:Ax;I]sn#Bpx">
                                                              <mutation items="8"></mutation>
                                                              <value name="ADD0">
                                                                <block type="text_newline" id="L3-RX.dM}fTqB#x:Ayn*">
                                                                  <field name="Type">\n</field>
                                                                </block>
                                                              </value>
                                                              <value name="ADD1">
                                                                <block type="text" id="Z.=Ri5[^Tg?C|D`y:]?D">
                                                                  <field name="TEXT">--------------</field>
                                                                </block>
                                                              </value>
                                                              <value name="ADD2">
                                                                <block type="text_getSubstring" id=".AG9W-3uHrOsT3ca-+3G">
                                                                  <mutation at1="true" at2="false"></mutation>
                                                                  <field name="WHERE1">FROM_START</field>
                                                                  <field name="WHERE2">LAST</field>
                                                                  <value name="STRING">
                                                                    <block type="get_value_var" id="an~;uAf`zPW5$[dA,%F9">
                                                                      <field name="ATTR">val</field>
                                                                      <value name="OID">
                                                                        <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                          <field name="oid">Object ID</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="HbcE8;0/K*Q`-bY?ap6/">
                                                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT1">
                                                                    <block type="variables_get" id="}GBn?G^e0L[q]?$z((?l">
                                                                      <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="ADD3">
                                                                <block type="text" id="(?rY8mY`@-DptNb0%Qh%">
                                                                  <field name="TEXT"> : </field>
                                                                </block>
                                                              </value>
                                                              <value name="ADD4">
                                                                <block type="math_rndfixed" id="q.#Bn0OAY$fRV$^F0t1w">
                                                                  <field name="n">1</field>
                                                                  <value name="x">
                                                                    <shadow type="math_number" id="Se6uPr:*{TW7|684JBU_">
                                                                      <field name="NUM">3.1234</field>
                                                                    </shadow>
                                                                    <block type="get_value_var" id="auDbYno,TTDpkC~*f;p9">
                                                                      <field name="ATTR">val</field>
                                                                      <value name="OID">
                                                                        <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                          <field name="oid">Object ID</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="U~VY|b#`N)MC=nU8R(tg">
                                                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="ADD5">
                                                                <block type="text" id="y(G5)Z+5@_w(~4)FJXA,">
                                                                  <field name="TEXT"> </field>
                                                                </block>
                                                              </value>
                                                              <value name="ADD6">
                                                                <block type="get_value_var" id="L$]4x,6bh0:QT7Z=(u6-">
                                                                  <field name="ATTR">common.unit</field>
                                                                  <value name="OID">
                                                                    <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                      <field name="oid">Object ID</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="zGpo9{wHg_udpwEs$jOU">
                                                                      <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <value name="ADD7">
                                                                <block type="text_newline" id="ng~fDWNVax{+^AcJ1xd.">
                                                                  <field name="Type">\n</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                          <next>
                                            <block type="debug" id="POq_S6.=i)!/i#9f|j=A">
                                              <field name="Severity">info</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                  <field name="TEXT">test</field>
                                                </shadow>
                                                <block type="variables_get" id="`UNVO8Cs^rGLF#P8CM3T">
                                                  <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="comment" id="R8)C|e5R4-E^hw2_3(YJ">
                                                  <field name="COMMENT">Telegramm Nachricht </field>
                                                  <next>
                                                    <block type="telegram" id="EMIP!a[rarr#6`mXn1z(">
                                                      <field name="INSTANCE"></field>
                                                      <field name="LOG"></field>
                                                      <field name="SILENT">FALSE</field>
                                                      <field name="PARSEMODE">default</field>
                                                      <field name="ESCAPING">FALSE</field>
                                                      <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                      <value name="MESSAGE">
                                                        <shadow type="text" id="Xl#pf^ttxsLfaOOsPgdg">
                                                          <field name="TEXT">/opt/iobroker/iobroker-data/echarts-temp-photo.jpg</field>
                                                        </shadow>
                                                        <block type="variables_get" id="4T8+]hO0:yE4y{,2NEu5">
                                                          <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </statement>
                        </block>
                      </statement>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </xml>
          


          614b548d-8bf6-451e-b061-126c27117a10-grafik.png

          IOBroker, Raspberrymatic, Proxmox, Intel NUC

          HomoranH 1 Antwort Letzte Antwort
          0
          • M MeisterSchatten

            @paul53
            ok, hoffe ich mache das jetzt richtig:

            <xml xmlns="https://developers.google.com/blockly/xml">
              <variables>
                <variable id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</variable>
                <variable id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</variable>
                <variable id=";N8^1gRx_@Aa5kL6[*eO">i</variable>
                <variable id="[m1(zyS^FG5%]RKc$r/Q">n_</variable>
              </variables>
              <block type="comment" id="nEp+r#CjhA!8~fP$4kUE" x="-1337" y="-4513">
                <field name="COMMENT">Senden aller aktuellen Tagesverbrauchswerte an Telegram-Bot</field>
                <next>
                  <block type="variables_set" id="O!~P;s0F8e%~j?wcjZQV">
                    <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                    <value name="VALUE">
                      <block type="text" id="*5Ki5kPJ-hQ(|m=iHTw]">
                        <field name="TEXT">Stromgestern</field>
                      </block>
                    </value>
                    <next>
                      <block type="on" id="^UswhH6fw_$gSUoS1Xqx">
                        <field name="OID">telegram.0.communicate.request</field>
                        <field name="CONDITION">any</field>
                        <field name="ACK_CONDITION"></field>
                        <statement name="STATEMENT">
                          <block type="controls_if" id=")R(r8N2xyM}?/HIv,:k!">
                            <value name="IF0">
                              <block type="logic_compare" id="!!3lc.kMJ!MGOs[j+7mR">
                                <field name="OP">GT</field>
                                <value name="A">
                                  <block type="text_indexOf" id="#Qs+ACeVeoBqVu-2yp9~">
                                    <field name="END">FIRST</field>
                                    <value name="VALUE">
                                      <block type="convert_tostring" id="4`_kC@Dyg~.$(F!qQ@w8">
                                        <value name="VALUE">
                                          <block type="get_value" id="lhbt_QK$WSXv^vav._/c">
                                            <field name="ATTR">val</field>
                                            <field name="OID">telegram.0.communicate.request</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <value name="FIND">
                                      <shadow type="text" id="s2-+](q-8WO(?7][4A(i">
                                        <field name="TEXT">abc</field>
                                      </shadow>
                                      <block type="variables_get" id="J}G!9gw:pOsY9_F7(2!b">
                                        <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <value name="B">
                                  <block type="math_number" id="[7E){e[Ath2f;SG?xjA/">
                                    <field name="NUM">0</field>
                                  </block>
                                </value>
                              </block>
                            </value>
                            <statement name="DO0">
                              <block type="debug" id="xgU.]_agzkK^kA3u@ms(" disabled="true">
                                <field name="Severity">info</field>
                                <value name="TEXT">
                                  <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                    <field name="TEXT">test</field>
                                  </shadow>
                                  <block type="convert_tostring" id="4dsuJo$`Ql`m^rCY^9u-">
                                    <value name="VALUE">
                                      <block type="text" id="o}9t:W;#sBzi*5(]*KWU">
                                        <field name="TEXT">Stromgestern</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="comment" id="~.#K~D%BUox8E-pqyh?3">
                                    <field name="COMMENT">Verbrauchswerte aktuelle Zählerstände sammeln</field>
                                    <next>
                                      <block type="text_append" id="B29v4,$onBh:7|/qAmj!">
                                        <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                        <value name="TEXT">
                                          <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                            <field name="TEXT"></field>
                                          </shadow>
                                          <block type="text_join" id="r)9=7|IxW~1j|*aplNtm">
                                            <mutation items="2"></mutation>
                                            <value name="ADD0">
                                              <block type="text" id="HUeSx:~leb^Yzd,cs[$[">
                                                <field name="TEXT">------- Hauptzähler -------</field>
                                              </block>
                                            </value>
                                            <value name="ADD1">
                                              <block type="text_newline" id="ea?YZMp~JSEm%]T#;t;B">
                                                <field name="Type">\n</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="controls_forEach" id="B_9uX!SZ`I#3f#5w;Y@|">
                                            <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                            <value name="LIST">
                                              <block type="selector" id="=hweWaw/N.R7Gh]V+d.Q">
                                                <field name="TEXT">*(List_Meter=meter_00_cons_daily)</field>
                                              </block>
                                            </value>
                                            <statement name="DO">
                                              <block type="comment" id="e!~%@hHk/d7GsiauP)h%">
                                                <field name="COMMENT">Verbrauchswerte im Nachrichtentext verketten</field>
                                                <next>
                                                  <block type="debug" id="gdohwz)57(uvo~10=E$=">
                                                    <field name="Severity">info</field>
                                                    <value name="TEXT">
                                                      <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                        <field name="TEXT">test</field>
                                                      </shadow>
                                                      <block type="text_join" id=":9~.R~9xi1]2O[2+Rohy">
                                                        <mutation items="2"></mutation>
                                                        <value name="ADD0">
                                                          <block type="convert_tostring" id="IS*d^)/c}}3jQ-QDR@|r">
                                                            <value name="VALUE">
                                                              <block type="get_value_var" id="g%SkC,ft}cmHyROv(/f0">
                                                                <field name="ATTR">common.name</field>
                                                                <value name="OID">
                                                                  <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                    <field name="oid">Object ID</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="h1Y[:vxRijE.YlAWPQpu">
                                                                    <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <value name="ADD1">
                                                          <block type="text" id="a:`YTf984uH)Bj/8R/wt">
                                                            <field name="TEXT">meter_00</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="variables_set" id="0m_yT7o$1jra0qBVZ4WN">
                                                        <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                        <value name="VALUE">
                                                          <block type="text_indexOf" id="Jz#M56N8pL?GMh`3.Y44">
                                                            <field name="END">FIRST</field>
                                                            <value name="VALUE">
                                                              <block type="get_value_var" id="GIF^q(+K|Ow{[~xa+o}_">
                                                                <field name="ATTR">common.name</field>
                                                                <value name="OID">
                                                                  <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                    <field name="oid">Object ID</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="r+{!0X[48U6I+Z%#XM~P">
                                                                    <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="FIND">
                                                              <shadow type="text" id="[ve/id#fbF86Bz-1(D%5">
                                                                <field name="TEXT">==</field>
                                                              </shadow>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="text_append" id="8Dtb(5PbHn9;M$PxgfCh">
                                                            <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                            <value name="TEXT">
                                                              <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                                <field name="TEXT"></field>
                                                              </shadow>
                                                              <block type="text_join" id="rl)-ua=s:Ax;I]sn#Bpx">
                                                                <mutation items="8"></mutation>
                                                                <value name="ADD0">
                                                                  <block type="text_newline" id="L3-RX.dM}fTqB#x:Ayn*">
                                                                    <field name="Type">\n</field>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD1">
                                                                  <block type="text" id="Z.=Ri5[^Tg?C|D`y:]?D">
                                                                    <field name="TEXT">--------------</field>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD2">
                                                                  <block type="text_getSubstring" id=".AG9W-3uHrOsT3ca-+3G">
                                                                    <mutation at1="true" at2="false"></mutation>
                                                                    <field name="WHERE1">FROM_START</field>
                                                                    <field name="WHERE2">LAST</field>
                                                                    <value name="STRING">
                                                                      <block type="get_value_var" id="an~;uAf`zPW5$[dA,%F9">
                                                                        <field name="ATTR">val</field>
                                                                        <value name="OID">
                                                                          <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                            <field name="oid">Object ID</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="HbcE8;0/K*Q`-bY?ap6/">
                                                                            <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <value name="AT1">
                                                                      <block type="variables_get" id="}GBn?G^e0L[q]?$z((?l">
                                                                        <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD3">
                                                                  <block type="text" id="(?rY8mY`@-DptNb0%Qh%">
                                                                    <field name="TEXT"> : </field>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD4">
                                                                  <block type="math_rndfixed" id="q.#Bn0OAY$fRV$^F0t1w">
                                                                    <field name="n">1</field>
                                                                    <value name="x">
                                                                      <shadow type="math_number" id="Se6uPr:*{TW7|684JBU_">
                                                                        <field name="NUM">3.1234</field>
                                                                      </shadow>
                                                                      <block type="get_value_var" id="auDbYno,TTDpkC~*f;p9">
                                                                        <field name="ATTR">val</field>
                                                                        <value name="OID">
                                                                          <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                            <field name="oid">Object ID</field>
                                                                          </shadow>
                                                                          <block type="variables_get" id="U~VY|b#`N)MC=nU8R(tg">
                                                                            <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                          </block>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD5">
                                                                  <block type="text" id="y(G5)Z+5@_w(~4)FJXA,">
                                                                    <field name="TEXT"> </field>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD6">
                                                                  <block type="get_value_var" id="L$]4x,6bh0:QT7Z=(u6-">
                                                                    <field name="ATTR">common.unit</field>
                                                                    <value name="OID">
                                                                      <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                        <field name="oid">Object ID</field>
                                                                      </shadow>
                                                                      <block type="variables_get" id="zGpo9{wHg_udpwEs$jOU">
                                                                        <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                                <value name="ADD7">
                                                                  <block type="text_newline" id="ng~fDWNVax{+^AcJ1xd.">
                                                                    <field name="Type">\n</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                            <next>
                                              <block type="debug" id="POq_S6.=i)!/i#9f|j=A">
                                                <field name="Severity">info</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                    <field name="TEXT">test</field>
                                                  </shadow>
                                                  <block type="variables_get" id="`UNVO8Cs^rGLF#P8CM3T">
                                                    <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="comment" id="R8)C|e5R4-E^hw2_3(YJ">
                                                    <field name="COMMENT">Telegramm Nachricht </field>
                                                    <next>
                                                      <block type="telegram" id="EMIP!a[rarr#6`mXn1z(">
                                                        <field name="INSTANCE"></field>
                                                        <field name="LOG"></field>
                                                        <field name="SILENT">FALSE</field>
                                                        <field name="PARSEMODE">default</field>
                                                        <field name="ESCAPING">FALSE</field>
                                                        <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                        <value name="MESSAGE">
                                                          <shadow type="text" id="Xl#pf^ttxsLfaOOsPgdg">
                                                            <field name="TEXT">/opt/iobroker/iobroker-data/echarts-temp-photo.jpg</field>
                                                          </shadow>
                                                          <block type="variables_get" id="4T8+]hO0:yE4y{,2NEu5">
                                                            <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                          </block>
                        </statement>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </xml>
            


            614b548d-8bf6-451e-b061-126c27117a10-grafik.png

            HomoranH Nicht stören
            HomoranH Nicht stören
            Homoran
            Global Moderator Administrators
            schrieb am zuletzt editiert von
            #9

            @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

            hoffe ich mache das jetzt richtig:

            bitte auch als Screenshot.

            https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1

            kein Support per PN! - Fragen im Forum stellen - es gibt fast nichts, was nicht auch für andere interessant ist.

            Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

            der Installationsfixer: curl -fsL https://iobroker.net/fix.sh | bash -

            M 1 Antwort Letzte Antwort
            0
            • HomoranH Homoran

              @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

              hoffe ich mache das jetzt richtig:

              bitte auch als Screenshot.

              https://forum.iobroker.net/topic/51555/hinweise-für-gute-forenbeiträge/1

              M Offline
              M Offline
              MeisterSchatten
              schrieb am zuletzt editiert von
              #10

              @homoran
              Danke für den Hinweis, das hatte ich noch nicht gelesen.
              Ist im Spoiler hinzugefügt.

              IOBroker, Raspberrymatic, Proxmox, Intel NUC

              1 Antwort Letzte Antwort
              0
              • M MeisterSchatten

                @paul53
                Erstmal Danke für die Hilfe!
                Ich habe es jetzt wie von Dir beschrieben aufgebaut (hätte es lieber geordneter - aber man passt sich ja an wo man kann :blush: ). Die Objekte werden gefunden, allerdings bekomme ich den Objektnamen nicht:

                // Verbrauchswerte aktuelle Zählerstände sammeln
                    Nachrichtentext += String('------- Hauptzähler -------' + '\n');
                    var i_list = Array.prototype.slice.apply($('*(List_Meter=meter_00_cons_daily)'));
                    for (var i_index in i_list) {
                      i = i_list[i_index];
                      // Verbrauchswerte im Nachrichtentext verketten
                      Nachrichtentext += String(('' + (await getObjectAsync(i)).common.name));
                    }
                

                Wo ist mein Fehler?
                Das Abrufen von Objektwerten klappt dagegen...

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

                @meisterschatten sagte: bekomme ich den Objektnamen nicht

                Die Datenpunktnamen mit angehängtem "meter_00" werden nicht in der Schleife ausgegeben?

                Wert ist an dieser Stelle sicher falsch:

                Blockly_temp.JPG

                Da der Datenpunktname mehrmals verwendet wird, setze ihn zu Beginn der Schleife besser in eine Variable.

                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

                M 1 Antwort Letzte Antwort
                0
                • paul53P paul53

                  @meisterschatten sagte: bekomme ich den Objektnamen nicht

                  Die Datenpunktnamen mit angehängtem "meter_00" werden nicht in der Schleife ausgegeben?

                  Wert ist an dieser Stelle sicher falsch:

                  Blockly_temp.JPG

                  Da der Datenpunktname mehrmals verwendet wird, setze ihn zu Beginn der Schleife besser in eine Variable.

                  M Offline
                  M Offline
                  MeisterSchatten
                  schrieb am zuletzt editiert von
                  #12

                  @paul53 Natürlich, "Wert" steht da nur noch aus meinen Tests.
                  Debug Output bei "Objektname" ist:

                  17.11.2024, 14:08:11.236	[info ]: javascript.0 (9603) Stopping script script.js.Energie.Tagesverbraeuche_heute
                  17.11.2024, 14:08:11.238	[info ]: javascript.1 (9618) Stopping script script.js.Energie.Tagesverbraeuche_heute
                  17.11.2024, 14:08:11.326	[info ]: javascript.0 (9603) Start JavaScript script.js.Energie.Tagesverbraeuche_heute (Blockly)
                  17.11.2024, 14:08:11.335	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: subscribe: {"pattern":{"id":"telegram.0.communicate.request","change":"any","q":0},"name":"script.js.Energie.Tagesverbraeuche_heute"}
                  17.11.2024, 14:08:11.335	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: registered 1 subscription, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                  17.11.2024, 14:09:35.303	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getState(id=telegram.0.communicate.request, timerId=undefined) => {"val":"[Michael]Stromgestern","ack":true,"ts":1731848975301,"q":0,"from":"system.adapter.telegram.0","user":"system.user.admin","lc":1731842969177}
                  17.11.2024, 14:09:35.411	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getObject(id=statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day, enumName=null) => {"common":{"type":"number","role":"value","name":{"en":"Daily value","de":"Tageswert","ru":"Ежедневная стоимость","pt":"Valor diário","nl":"Daily waarde","fr":"Valeur quotidienne","it":"Valore giornaliero","es":"Valor diario","pl":"Daily","uk":"Добова норма","zh-cn":"每日价值"},"write":false,"read":true,"custom":{"sql.1":{"enabled":true,"storageType":"","counter":false,"aliasId":"","debounceTime":500,"blockTime":0,"changesOnly":true,"changesRelogInterval":30,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":0,"customRetentionDuration":365,"maxLength":0,"enableDebugLogs":true,"debounce":1000,"ignoreZero":true}}},"native":{"addr":"linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol"},"type":"state","_id":"statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.statistics.0","user":"system.user.admin","ts":1731101038184}
                  17.11.2024, 14:09:35.411	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: [object Object]meter_00
                  17.11.2024, 14:09:35.412	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getObject(id=statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day, enumName=null) => {"common":{"type":"number","role":"value","name":{"en":"Daily value","de":"Tageswert","ru":"Ежедневная стоимость","pt":"Valor diário","nl":"Daily waarde","fr":"Valeur quotidienne","it":"Valore giornaliero","es":"Valor diario","pl":"Daily","uk":"Добова норма","zh-cn":"每日价值"},"write":false,"read":true,"custom":{"sql.1":{"enabled":true,"storageType":"","counter":false,"aliasId":"","debounceTime":500,"blockTime":0,"changesOnly":true,"changesRelogInterval":30,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":0,"customRetentionDuration":365,"maxLength":0,"enableDebugLogs":true,"debounce":1000,"ignoreZero":true}}},"native":{"addr":"linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol"},"type":"state","_id":"statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.statistics.0","user":"system.user.admin","ts":1731101038184}
                  17.11.2024, 14:09:35.413	[error]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: TypeError: (intermediate value).common.name.indexOf is not a function
                  17.11.2024, 14:09:35.413	[error]: javascript.0 (9603)     at Object.<anonymous> (script.js.Energie.Tagesverbraeuche_heute:24:50)
                  

                  IOBroker, Raspberrymatic, Proxmox, Intel NUC

                  paul53P 1 Antwort Letzte Antwort
                  0
                  • M MeisterSchatten

                    @paul53 Natürlich, "Wert" steht da nur noch aus meinen Tests.
                    Debug Output bei "Objektname" ist:

                    17.11.2024, 14:08:11.236	[info ]: javascript.0 (9603) Stopping script script.js.Energie.Tagesverbraeuche_heute
                    17.11.2024, 14:08:11.238	[info ]: javascript.1 (9618) Stopping script script.js.Energie.Tagesverbraeuche_heute
                    17.11.2024, 14:08:11.326	[info ]: javascript.0 (9603) Start JavaScript script.js.Energie.Tagesverbraeuche_heute (Blockly)
                    17.11.2024, 14:08:11.335	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: subscribe: {"pattern":{"id":"telegram.0.communicate.request","change":"any","q":0},"name":"script.js.Energie.Tagesverbraeuche_heute"}
                    17.11.2024, 14:08:11.335	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: registered 1 subscription, 0 schedules, 0 messages, 0 logs and 0 file subscriptions
                    17.11.2024, 14:09:35.303	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getState(id=telegram.0.communicate.request, timerId=undefined) => {"val":"[Michael]Stromgestern","ack":true,"ts":1731848975301,"q":0,"from":"system.adapter.telegram.0","user":"system.user.admin","lc":1731842969177}
                    17.11.2024, 14:09:35.411	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getObject(id=statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day, enumName=null) => {"common":{"type":"number","role":"value","name":{"en":"Daily value","de":"Tageswert","ru":"Ежедневная стоимость","pt":"Valor diário","nl":"Daily waarde","fr":"Valeur quotidienne","it":"Valore giornaliero","es":"Valor diario","pl":"Daily","uk":"Добова норма","zh-cn":"每日价值"},"write":false,"read":true,"custom":{"sql.1":{"enabled":true,"storageType":"","counter":false,"aliasId":"","debounceTime":500,"blockTime":0,"changesOnly":true,"changesRelogInterval":30,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":0,"customRetentionDuration":365,"maxLength":0,"enableDebugLogs":true,"debounce":1000,"ignoreZero":true}}},"native":{"addr":"linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol"},"type":"state","_id":"statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.statistics.0","user":"system.user.admin","ts":1731101038184}
                    17.11.2024, 14:09:35.411	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: [object Object]meter_00
                    17.11.2024, 14:09:35.412	[info ]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: getObject(id=statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day, enumName=null) => {"common":{"type":"number","role":"value","name":{"en":"Daily value","de":"Tageswert","ru":"Ежедневная стоимость","pt":"Valor diário","nl":"Daily waarde","fr":"Valeur quotidienne","it":"Valore giornaliero","es":"Valor diario","pl":"Daily","uk":"Добова норма","zh-cn":"每日价值"},"write":false,"read":true,"custom":{"sql.1":{"enabled":true,"storageType":"","counter":false,"aliasId":"","debounceTime":500,"blockTime":0,"changesOnly":true,"changesRelogInterval":30,"changesMinDelta":0,"ignoreBelowNumber":"","disableSkippedValueLogging":false,"retention":0,"customRetentionDuration":365,"maxLength":0,"enableDebugLogs":true,"debounce":1000,"ignoreZero":true}}},"native":{"addr":"linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol"},"type":"state","_id":"statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.statistics.0","user":"system.user.admin","ts":1731101038184}
                    17.11.2024, 14:09:35.413	[error]: javascript.0 (9603) script.js.Energie.Tagesverbraeuche_heute: TypeError: (intermediate value).common.name.indexOf is not a function
                    17.11.2024, 14:09:35.413	[error]: javascript.0 (9603)     at Object.<anonymous> (script.js.Energie.Tagesverbraeuche_heute:24:50)
                    
                    paul53P Offline
                    paul53P Offline
                    paul53
                    schrieb am zuletzt editiert von paul53
                    #13

                    @meisterschatten sagte: [object Object]meter_00

                    Die Datenpunktnamen sind mehrsprachig.
                    Aus deinem ersten Post entnehme ich, dass die DP-Namen alle gleich sind: "Tageswert".

                    EDIT: Mit mehrsprachigem Namen versuche es mal so:

                    Blockly_temp.JPG

                    Was möchtest du als Nachricht ausgeben?
                    Die "==" befinden sich in der Datenpunkt-ID - nicht im Namen!

                    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

                    M 2 Antworten Letzte Antwort
                    1
                    • paul53P paul53

                      @meisterschatten sagte: [object Object]meter_00

                      Die Datenpunktnamen sind mehrsprachig.
                      Aus deinem ersten Post entnehme ich, dass die DP-Namen alle gleich sind: "Tageswert".

                      EDIT: Mit mehrsprachigem Namen versuche es mal so:

                      Blockly_temp.JPG

                      Was möchtest du als Nachricht ausgeben?
                      Die "==" befinden sich in der Datenpunkt-ID - nicht im Namen!

                      M Offline
                      M Offline
                      MeisterSchatten
                      schrieb am zuletzt editiert von MeisterSchatten
                      #14

                      @paul53
                      Vielen Dank Paul!
                      Ja der Objektname ist mehrsprachig, wie ich auch gerade festgestellt habe.
                      Ich habe es zwar zwischenzeitlich selbst gelöst, aber deine Lösung mit "de" finde ich sicherer, als bei mir mit Auswahl nach Index.

                      Hier noch meine Lösung:
                      604efb36-5d43-49ea-a403-83304be8ea74-grafik.png

                      <xml xmlns="https://developers.google.com/blockly/xml">
                        <variables>
                          <variable id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</variable>
                          <variable id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</variable>
                          <variable id=";N8^1gRx_@Aa5kL6[*eO">i</variable>
                          <variable id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</variable>
                          <variable id="[m1(zyS^FG5%]RKc$r/Q">n_</variable>
                        </variables>
                        <block type="comment" id="nEp+r#CjhA!8~fP$4kUE" x="-1337" y="-4513">
                          <field name="COMMENT">Senden aller aktuellen Tagesverbrauchswerte an Telegram-Bot</field>
                          <next>
                            <block type="variables_set" id="O!~P;s0F8e%~j?wcjZQV">
                              <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                              <value name="VALUE">
                                <block type="text" id="*5Ki5kPJ-hQ(|m=iHTw]">
                                  <field name="TEXT">Stromgestern</field>
                                </block>
                              </value>
                              <next>
                                <block type="on" id="^UswhH6fw_$gSUoS1Xqx">
                                  <field name="OID">telegram.0.communicate.request</field>
                                  <field name="CONDITION">any</field>
                                  <field name="ACK_CONDITION"></field>
                                  <statement name="STATEMENT">
                                    <block type="controls_if" id=")R(r8N2xyM}?/HIv,:k!">
                                      <value name="IF0">
                                        <block type="logic_compare" id="!!3lc.kMJ!MGOs[j+7mR">
                                          <field name="OP">GT</field>
                                          <value name="A">
                                            <block type="text_indexOf" id="#Qs+ACeVeoBqVu-2yp9~">
                                              <field name="END">FIRST</field>
                                              <value name="VALUE">
                                                <block type="convert_tostring" id="4`_kC@Dyg~.$(F!qQ@w8">
                                                  <value name="VALUE">
                                                    <block type="get_value" id="lhbt_QK$WSXv^vav._/c">
                                                      <field name="ATTR">val</field>
                                                      <field name="OID">telegram.0.communicate.request</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="FIND">
                                                <shadow type="text" id="s2-+](q-8WO(?7][4A(i">
                                                  <field name="TEXT">abc</field>
                                                </shadow>
                                                <block type="variables_get" id="J}G!9gw:pOsY9_F7(2!b">
                                                  <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="B">
                                            <block type="math_number" id="[7E){e[Ath2f;SG?xjA/">
                                              <field name="NUM">0</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <statement name="DO0">
                                        <block type="debug" id="xgU.]_agzkK^kA3u@ms(" disabled="true">
                                          <field name="Severity">info</field>
                                          <value name="TEXT">
                                            <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                              <field name="TEXT">test</field>
                                            </shadow>
                                            <block type="convert_tostring" id="4dsuJo$`Ql`m^rCY^9u-">
                                              <value name="VALUE">
                                                <block type="text" id="o}9t:W;#sBzi*5(]*KWU">
                                                  <field name="TEXT">Stromgestern</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="comment" id="~.#K~D%BUox8E-pqyh?3">
                                              <field name="COMMENT">Verbrauchswerte aktuelle Zählerstände sammeln</field>
                                              <next>
                                                <block type="text_append" id="B29v4,$onBh:7|/qAmj!">
                                                  <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                      <field name="TEXT"></field>
                                                    </shadow>
                                                    <block type="text_join" id="r)9=7|IxW~1j|*aplNtm">
                                                      <mutation items="2"></mutation>
                                                      <value name="ADD0">
                                                        <block type="text" id="HUeSx:~leb^Yzd,cs[$[">
                                                          <field name="TEXT">------- Hauptzähler -------</field>
                                                        </block>
                                                      </value>
                                                      <value name="ADD1">
                                                        <block type="text_newline" id="ea?YZMp~JSEm%]T#;t;B">
                                                          <field name="Type">\n</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="controls_forEach" id="B_9uX!SZ`I#3f#5w;Y@|">
                                                      <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                      <value name="LIST">
                                                        <block type="selector" id="=hweWaw/N.R7Gh]V+d.Q">
                                                          <field name="TEXT">*(List_Meter=meter_00_cons_daily)</field>
                                                        </block>
                                                      </value>
                                                      <statement name="DO">
                                                        <block type="comment" id="e!~%@hHk/d7GsiauP)h%">
                                                          <field name="COMMENT">Verbrauchswerte im Nachrichtentext verketten</field>
                                                          <next>
                                                            <block type="variables_set" id="]/E%[5#Jq;oDsymAx2MN">
                                                              <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                              <value name="VALUE">
                                                                <block type="convert_tostring" id="IS*d^)/c}}3jQ-QDR@|r">
                                                                  <value name="VALUE">
                                                                    <block type="lists_getIndex" id="8vLv_CfKKy6^R#qFsy]v">
                                                                      <mutation statement="false" at="true"></mutation>
                                                                      <field name="MODE">GET</field>
                                                                      <field name="WHERE">FROM_START</field>
                                                                      <value name="VALUE">
                                                                        <block type="get_value_var" id="g%SkC,ft}cmHyROv(/f0">
                                                                          <field name="ATTR">common.name</field>
                                                                          <value name="OID">
                                                                            <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                              <field name="oid">Object ID</field>
                                                                            </shadow>
                                                                            <block type="variables_get" id="h1Y[:vxRijE.YlAWPQpu">
                                                                              <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <value name="AT">
                                                                        <block type="math_number" id="z||Bm=;k0p4u^Kcc4Bz~">
                                                                          <field name="NUM">2</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="debug" id="gdohwz)57(uvo~10=E$=">
                                                                  <field name="Severity">info</field>
                                                                  <value name="TEXT">
                                                                    <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                                      <field name="TEXT">test</field>
                                                                    </shadow>
                                                                    <block type="text_join" id=":9~.R~9xi1]2O[2+Rohy">
                                                                      <mutation items="2"></mutation>
                                                                      <value name="ADD0">
                                                                        <block type="variables_get" id="-dh/AW;U3cl*@d(rZWuK">
                                                                          <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="ADD1">
                                                                        <block type="text" id="a:`YTf984uH)Bj/8R/wt">
                                                                          <field name="TEXT">meter_00</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="variables_set" id="0m_yT7o$1jra0qBVZ4WN">
                                                                      <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                      <value name="VALUE">
                                                                        <block type="text_indexOf" id="Jz#M56N8pL?GMh`3.Y44">
                                                                          <field name="END">FIRST</field>
                                                                          <value name="VALUE">
                                                                            <block type="variables_get" id="O?S@|nD,)l`e?0Lv%W`H">
                                                                              <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="FIND">
                                                                            <shadow type="text" id="[ve/id#fbF86Bz-1(D%5">
                                                                              <field name="TEXT">==</field>
                                                                            </shadow>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="text_append" id="8Dtb(5PbHn9;M$PxgfCh">
                                                                          <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                                          <value name="TEXT">
                                                                            <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                                              <field name="TEXT"></field>
                                                                            </shadow>
                                                                            <block type="text_join" id="rl)-ua=s:Ax;I]sn#Bpx">
                                                                              <mutation items="8"></mutation>
                                                                              <value name="ADD0">
                                                                                <block type="text_newline" id="L3-RX.dM}fTqB#x:Ayn*">
                                                                                  <field name="Type">\n</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD1">
                                                                                <block type="text" id="Z.=Ri5[^Tg?C|D`y:]?D">
                                                                                  <field name="TEXT">--------------</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD2">
                                                                                <block type="text_getSubstring" id=".AG9W-3uHrOsT3ca-+3G">
                                                                                  <mutation at1="true" at2="false"></mutation>
                                                                                  <field name="WHERE1">FROM_START</field>
                                                                                  <field name="WHERE2">LAST</field>
                                                                                  <value name="STRING">
                                                                                    <block type="variables_get" id="eBW^_V!+xC[(K`2X{{~)">
                                                                                      <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="AT1">
                                                                                    <block type="variables_get" id="}GBn?G^e0L[q]?$z((?l">
                                                                                      <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD3">
                                                                                <block type="text" id="(?rY8mY`@-DptNb0%Qh%">
                                                                                  <field name="TEXT"> : </field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD4">
                                                                                <block type="math_rndfixed" id="q.#Bn0OAY$fRV$^F0t1w">
                                                                                  <field name="n">1</field>
                                                                                  <value name="x">
                                                                                    <shadow type="math_number" id="Se6uPr:*{TW7|684JBU_">
                                                                                      <field name="NUM">3.1234</field>
                                                                                    </shadow>
                                                                                    <block type="get_value_var" id="auDbYno,TTDpkC~*f;p9">
                                                                                      <field name="ATTR">val</field>
                                                                                      <value name="OID">
                                                                                        <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                                          <field name="oid">Object ID</field>
                                                                                        </shadow>
                                                                                        <block type="variables_get" id="U~VY|b#`N)MC=nU8R(tg">
                                                                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD5">
                                                                                <block type="text" id="y(G5)Z+5@_w(~4)FJXA,">
                                                                                  <field name="TEXT"> </field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD6">
                                                                                <block type="get_value_var" id="L$]4x,6bh0:QT7Z=(u6-">
                                                                                  <field name="ATTR">common.unit</field>
                                                                                  <value name="OID">
                                                                                    <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                                      <field name="oid">Object ID</field>
                                                                                    </shadow>
                                                                                    <block type="variables_get" id="zGpo9{wHg_udpwEs$jOU">
                                                                                      <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                              <value name="ADD7">
                                                                                <block type="text_newline" id="ng~fDWNVax{+^AcJ1xd.">
                                                                                  <field name="Type">\n</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </statement>
                                                      <next>
                                                        <block type="debug" id="POq_S6.=i)!/i#9f|j=A">
                                                          <field name="Severity">info</field>
                                                          <value name="TEXT">
                                                            <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                              <field name="TEXT">test</field>
                                                            </shadow>
                                                            <block type="variables_get" id="`UNVO8Cs^rGLF#P8CM3T">
                                                              <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="comment" id="R8)C|e5R4-E^hw2_3(YJ">
                                                              <field name="COMMENT">Telegramm Nachricht </field>
                                                              <next>
                                                                <block type="telegram" id="EMIP!a[rarr#6`mXn1z(">
                                                                  <field name="INSTANCE"></field>
                                                                  <field name="LOG"></field>
                                                                  <field name="SILENT">FALSE</field>
                                                                  <field name="PARSEMODE">default</field>
                                                                  <field name="ESCAPING">FALSE</field>
                                                                  <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                                  <value name="MESSAGE">
                                                                    <shadow type="text" id="Xl#pf^ttxsLfaOOsPgdg">
                                                                      <field name="TEXT">/opt/iobroker/iobroker-data/echarts-temp-photo.jpg</field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="4T8+]hO0:yE4y{,2NEu5">
                                                                      <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </statement>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </xml>
                      

                      IOBroker, Raspberrymatic, Proxmox, Intel NUC

                      paul53P 1 Antwort Letzte Antwort
                      0
                      • paul53P paul53

                        @meisterschatten sagte: [object Object]meter_00

                        Die Datenpunktnamen sind mehrsprachig.
                        Aus deinem ersten Post entnehme ich, dass die DP-Namen alle gleich sind: "Tageswert".

                        EDIT: Mit mehrsprachigem Namen versuche es mal so:

                        Blockly_temp.JPG

                        Was möchtest du als Nachricht ausgeben?
                        Die "==" befinden sich in der Datenpunkt-ID - nicht im Namen!

                        M Offline
                        M Offline
                        MeisterSchatten
                        schrieb am zuletzt editiert von
                        #15

                        @paul53 said in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                        @meisterschatten sagte: [object Object]meter_00

                        Die Datenpunktnamen sind mehrsprachig.
                        Aus deinem ersten Post entnehme ich, dass die DP-Namen alle gleich sind: "Tageswert".

                        EDIT: Mit mehrsprachigem Namen versuche es mal so:

                        Blockly_temp.JPG

                        Was möchtest du als Nachricht ausgeben?
                        Die "==" befinden sich in der Datenpunkt-ID - nicht im Namen!

                        OK, ID<>Namen, das habe ich übersehen. Wie bekomme ich denn die ID?

                        IOBroker, Raspberrymatic, Proxmox, Intel NUC

                        1 Antwort Letzte Antwort
                        0
                        • M MeisterSchatten

                          @paul53
                          Vielen Dank Paul!
                          Ja der Objektname ist mehrsprachig, wie ich auch gerade festgestellt habe.
                          Ich habe es zwar zwischenzeitlich selbst gelöst, aber deine Lösung mit "de" finde ich sicherer, als bei mir mit Auswahl nach Index.

                          Hier noch meine Lösung:
                          604efb36-5d43-49ea-a403-83304be8ea74-grafik.png

                          <xml xmlns="https://developers.google.com/blockly/xml">
                            <variables>
                              <variable id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</variable>
                              <variable id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</variable>
                              <variable id=";N8^1gRx_@Aa5kL6[*eO">i</variable>
                              <variable id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</variable>
                              <variable id="[m1(zyS^FG5%]RKc$r/Q">n_</variable>
                            </variables>
                            <block type="comment" id="nEp+r#CjhA!8~fP$4kUE" x="-1337" y="-4513">
                              <field name="COMMENT">Senden aller aktuellen Tagesverbrauchswerte an Telegram-Bot</field>
                              <next>
                                <block type="variables_set" id="O!~P;s0F8e%~j?wcjZQV">
                                  <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                                  <value name="VALUE">
                                    <block type="text" id="*5Ki5kPJ-hQ(|m=iHTw]">
                                      <field name="TEXT">Stromgestern</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="on" id="^UswhH6fw_$gSUoS1Xqx">
                                      <field name="OID">telegram.0.communicate.request</field>
                                      <field name="CONDITION">any</field>
                                      <field name="ACK_CONDITION"></field>
                                      <statement name="STATEMENT">
                                        <block type="controls_if" id=")R(r8N2xyM}?/HIv,:k!">
                                          <value name="IF0">
                                            <block type="logic_compare" id="!!3lc.kMJ!MGOs[j+7mR">
                                              <field name="OP">GT</field>
                                              <value name="A">
                                                <block type="text_indexOf" id="#Qs+ACeVeoBqVu-2yp9~">
                                                  <field name="END">FIRST</field>
                                                  <value name="VALUE">
                                                    <block type="convert_tostring" id="4`_kC@Dyg~.$(F!qQ@w8">
                                                      <value name="VALUE">
                                                        <block type="get_value" id="lhbt_QK$WSXv^vav._/c">
                                                          <field name="ATTR">val</field>
                                                          <field name="OID">telegram.0.communicate.request</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <value name="FIND">
                                                    <shadow type="text" id="s2-+](q-8WO(?7][4A(i">
                                                      <field name="TEXT">abc</field>
                                                    </shadow>
                                                    <block type="variables_get" id="J}G!9gw:pOsY9_F7(2!b">
                                                      <field name="VAR" id="/qaN*}S,4Qhh}Dx!KhP*">telegramText</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <block type="math_number" id="[7E){e[Ath2f;SG?xjA/">
                                                  <field name="NUM">0</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <statement name="DO0">
                                            <block type="debug" id="xgU.]_agzkK^kA3u@ms(" disabled="true">
                                              <field name="Severity">info</field>
                                              <value name="TEXT">
                                                <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                  <field name="TEXT">test</field>
                                                </shadow>
                                                <block type="convert_tostring" id="4dsuJo$`Ql`m^rCY^9u-">
                                                  <value name="VALUE">
                                                    <block type="text" id="o}9t:W;#sBzi*5(]*KWU">
                                                      <field name="TEXT">Stromgestern</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="comment" id="~.#K~D%BUox8E-pqyh?3">
                                                  <field name="COMMENT">Verbrauchswerte aktuelle Zählerstände sammeln</field>
                                                  <next>
                                                    <block type="text_append" id="B29v4,$onBh:7|/qAmj!">
                                                      <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                      <value name="TEXT">
                                                        <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                          <field name="TEXT"></field>
                                                        </shadow>
                                                        <block type="text_join" id="r)9=7|IxW~1j|*aplNtm">
                                                          <mutation items="2"></mutation>
                                                          <value name="ADD0">
                                                            <block type="text" id="HUeSx:~leb^Yzd,cs[$[">
                                                              <field name="TEXT">------- Hauptzähler -------</field>
                                                            </block>
                                                          </value>
                                                          <value name="ADD1">
                                                            <block type="text_newline" id="ea?YZMp~JSEm%]T#;t;B">
                                                              <field name="Type">\n</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="controls_forEach" id="B_9uX!SZ`I#3f#5w;Y@|">
                                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                          <value name="LIST">
                                                            <block type="selector" id="=hweWaw/N.R7Gh]V+d.Q">
                                                              <field name="TEXT">*(List_Meter=meter_00_cons_daily)</field>
                                                            </block>
                                                          </value>
                                                          <statement name="DO">
                                                            <block type="comment" id="e!~%@hHk/d7GsiauP)h%">
                                                              <field name="COMMENT">Verbrauchswerte im Nachrichtentext verketten</field>
                                                              <next>
                                                                <block type="variables_set" id="]/E%[5#Jq;oDsymAx2MN">
                                                                  <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                  <value name="VALUE">
                                                                    <block type="convert_tostring" id="IS*d^)/c}}3jQ-QDR@|r">
                                                                      <value name="VALUE">
                                                                        <block type="lists_getIndex" id="8vLv_CfKKy6^R#qFsy]v">
                                                                          <mutation statement="false" at="true"></mutation>
                                                                          <field name="MODE">GET</field>
                                                                          <field name="WHERE">FROM_START</field>
                                                                          <value name="VALUE">
                                                                            <block type="get_value_var" id="g%SkC,ft}cmHyROv(/f0">
                                                                              <field name="ATTR">common.name</field>
                                                                              <value name="OID">
                                                                                <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                                  <field name="oid">Object ID</field>
                                                                                </shadow>
                                                                                <block type="variables_get" id="h1Y[:vxRijE.YlAWPQpu">
                                                                                  <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <value name="AT">
                                                                            <block type="math_number" id="z||Bm=;k0p4u^Kcc4Bz~">
                                                                              <field name="NUM">2</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="debug" id="gdohwz)57(uvo~10=E$=">
                                                                      <field name="Severity">info</field>
                                                                      <value name="TEXT">
                                                                        <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                                          <field name="TEXT">test</field>
                                                                        </shadow>
                                                                        <block type="text_join" id=":9~.R~9xi1]2O[2+Rohy">
                                                                          <mutation items="2"></mutation>
                                                                          <value name="ADD0">
                                                                            <block type="variables_get" id="-dh/AW;U3cl*@d(rZWuK">
                                                                              <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                            </block>
                                                                          </value>
                                                                          <value name="ADD1">
                                                                            <block type="text" id="a:`YTf984uH)Bj/8R/wt">
                                                                              <field name="TEXT">meter_00</field>
                                                                            </block>
                                                                          </value>
                                                                        </block>
                                                                      </value>
                                                                      <next>
                                                                        <block type="variables_set" id="0m_yT7o$1jra0qBVZ4WN">
                                                                          <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                          <value name="VALUE">
                                                                            <block type="text_indexOf" id="Jz#M56N8pL?GMh`3.Y44">
                                                                              <field name="END">FIRST</field>
                                                                              <value name="VALUE">
                                                                                <block type="variables_get" id="O?S@|nD,)l`e?0Lv%W`H">
                                                                                  <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                                </block>
                                                                              </value>
                                                                              <value name="FIND">
                                                                                <shadow type="text" id="[ve/id#fbF86Bz-1(D%5">
                                                                                  <field name="TEXT">==</field>
                                                                                </shadow>
                                                                              </value>
                                                                            </block>
                                                                          </value>
                                                                          <next>
                                                                            <block type="text_append" id="8Dtb(5PbHn9;M$PxgfCh">
                                                                              <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                                              <value name="TEXT">
                                                                                <shadow type="text" id="%9IFh,_[w)0Znl9Yn:Dv">
                                                                                  <field name="TEXT"></field>
                                                                                </shadow>
                                                                                <block type="text_join" id="rl)-ua=s:Ax;I]sn#Bpx">
                                                                                  <mutation items="8"></mutation>
                                                                                  <value name="ADD0">
                                                                                    <block type="text_newline" id="L3-RX.dM}fTqB#x:Ayn*">
                                                                                      <field name="Type">\n</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD1">
                                                                                    <block type="text" id="Z.=Ri5[^Tg?C|D`y:]?D">
                                                                                      <field name="TEXT">--------------</field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD2">
                                                                                    <block type="text_getSubstring" id=".AG9W-3uHrOsT3ca-+3G">
                                                                                      <mutation at1="true" at2="false"></mutation>
                                                                                      <field name="WHERE1">FROM_START</field>
                                                                                      <field name="WHERE2">LAST</field>
                                                                                      <value name="STRING">
                                                                                        <block type="variables_get" id="eBW^_V!+xC[(K`2X{{~)">
                                                                                          <field name="VAR" id="Q#9rHor5!ZZ4!,mL@YD{">Objectname</field>
                                                                                        </block>
                                                                                      </value>
                                                                                      <value name="AT1">
                                                                                        <block type="variables_get" id="}GBn?G^e0L[q]?$z((?l">
                                                                                          <field name="VAR" id="[m1(zyS^FG5%]RKc$r/Q">n_</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD3">
                                                                                    <block type="text" id="(?rY8mY`@-DptNb0%Qh%">
                                                                                      <field name="TEXT"> : </field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD4">
                                                                                    <block type="math_rndfixed" id="q.#Bn0OAY$fRV$^F0t1w">
                                                                                      <field name="n">1</field>
                                                                                      <value name="x">
                                                                                        <shadow type="math_number" id="Se6uPr:*{TW7|684JBU_">
                                                                                          <field name="NUM">3.1234</field>
                                                                                        </shadow>
                                                                                        <block type="get_value_var" id="auDbYno,TTDpkC~*f;p9">
                                                                                          <field name="ATTR">val</field>
                                                                                          <value name="OID">
                                                                                            <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                                              <field name="oid">Object ID</field>
                                                                                            </shadow>
                                                                                            <block type="variables_get" id="U~VY|b#`N)MC=nU8R(tg">
                                                                                              <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                                            </block>
                                                                                          </value>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD5">
                                                                                    <block type="text" id="y(G5)Z+5@_w(~4)FJXA,">
                                                                                      <field name="TEXT"> </field>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD6">
                                                                                    <block type="get_value_var" id="L$]4x,6bh0:QT7Z=(u6-">
                                                                                      <field name="ATTR">common.unit</field>
                                                                                      <value name="OID">
                                                                                        <shadow type="field_oid" id="rVrs,^yLOcDbd}%*pd$1">
                                                                                          <field name="oid">Object ID</field>
                                                                                        </shadow>
                                                                                        <block type="variables_get" id="zGpo9{wHg_udpwEs$jOU">
                                                                                          <field name="VAR" id=";N8^1gRx_@Aa5kL6[*eO">i</field>
                                                                                        </block>
                                                                                      </value>
                                                                                    </block>
                                                                                  </value>
                                                                                  <value name="ADD7">
                                                                                    <block type="text_newline" id="ng~fDWNVax{+^AcJ1xd.">
                                                                                      <field name="Type">\n</field>
                                                                                    </block>
                                                                                  </value>
                                                                                </block>
                                                                              </value>
                                                                            </block>
                                                                          </next>
                                                                        </block>
                                                                      </next>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </statement>
                                                          <next>
                                                            <block type="debug" id="POq_S6.=i)!/i#9f|j=A">
                                                              <field name="Severity">info</field>
                                                              <value name="TEXT">
                                                                <shadow type="text" id="2#S{8q*z[;pC~::~5L.q">
                                                                  <field name="TEXT">test</field>
                                                                </shadow>
                                                                <block type="variables_get" id="`UNVO8Cs^rGLF#P8CM3T">
                                                                  <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="comment" id="R8)C|e5R4-E^hw2_3(YJ">
                                                                  <field name="COMMENT">Telegramm Nachricht </field>
                                                                  <next>
                                                                    <block type="telegram" id="EMIP!a[rarr#6`mXn1z(">
                                                                      <field name="INSTANCE"></field>
                                                                      <field name="LOG"></field>
                                                                      <field name="SILENT">FALSE</field>
                                                                      <field name="PARSEMODE">default</field>
                                                                      <field name="ESCAPING">FALSE</field>
                                                                      <field name="DISABLE_WEB_PAGE_PREVIEW">FALSE</field>
                                                                      <value name="MESSAGE">
                                                                        <shadow type="text" id="Xl#pf^ttxsLfaOOsPgdg">
                                                                          <field name="TEXT">/opt/iobroker/iobroker-data/echarts-temp-photo.jpg</field>
                                                                        </shadow>
                                                                        <block type="variables_get" id="4T8+]hO0:yE4y{,2NEu5">
                                                                          <field name="VAR" id="3ZO)cPrY1Use;ShbtMJ1">Nachrichtentext</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </statement>
                                        </block>
                                      </statement>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </xml>
                          
                          paul53P Offline
                          paul53P Offline
                          paul53
                          schrieb am zuletzt editiert von paul53
                          #16

                          @meisterschatten sagte: Hier noch meine Lösung:

                          Ersetze an den beiden Stellen die Variable Objectname durch die Variable i:

                          Blockly_temp.JPG

                          @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                          Wie bekomme ich denn die ID?

                          Ist in i enthalten.

                          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

                          M 1 Antwort Letzte Antwort
                          0
                          • paul53P paul53

                            @meisterschatten sagte: Hier noch meine Lösung:

                            Ersetze an den beiden Stellen die Variable Objectname durch die Variable i:

                            Blockly_temp.JPG

                            @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                            Wie bekomme ich denn die ID?

                            Ist in i enthalten.

                            M Offline
                            M Offline
                            MeisterSchatten
                            schrieb am zuletzt editiert von MeisterSchatten
                            #17

                            @paul53
                            Wunderbar, so klappt es!

                            Jetzt habe ich noch zwei Verständnisprobleme:

                            • Der Objektname scheint bei mir leer zu sein - kann ich den selber definieren (z.B. mit einem anderen Skript)?

                            • Die Einheit scheint durch linkeddevices nicht an das verlinkte Objekt übergeben worden sein. Kann man das irgendwo einstellen, oder muss ich mir die Einheit aus dem Ursprungsobjekt holen?

                            Edit aktuelle Einstellung verlinkte Objekte:


                            a15d3cc4-eeae-4255-a55c-98595edc9d14-grafik.png
                            und:
                            e25b41a4-9f8a-44c5-a888-2d8746c9d777-grafik.png

                            PS: Was ist denn hier die "Währung" für gute/sehr hilfreiche Beiträge?

                            IOBroker, Raspberrymatic, Proxmox, Intel NUC

                            paul53P 1 Antwort Letzte Antwort
                            0
                            • M MeisterSchatten

                              @paul53
                              Wunderbar, so klappt es!

                              Jetzt habe ich noch zwei Verständnisprobleme:

                              • Der Objektname scheint bei mir leer zu sein - kann ich den selber definieren (z.B. mit einem anderen Skript)?

                              • Die Einheit scheint durch linkeddevices nicht an das verlinkte Objekt übergeben worden sein. Kann man das irgendwo einstellen, oder muss ich mir die Einheit aus dem Ursprungsobjekt holen?

                              Edit aktuelle Einstellung verlinkte Objekte:


                              a15d3cc4-eeae-4255-a55c-98595edc9d14-grafik.png
                              und:
                              e25b41a4-9f8a-44c5-a888-2d8746c9d777-grafik.png

                              PS: Was ist denn hier die "Währung" für gute/sehr hilfreiche Beiträge?

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

                              @meisterschatten sagte: muss ich mir die Einheit aus dem Ursprungsobjekt holen?

                              Die Einheit muss im per Blockly ausgewerteten Datenpunkt "statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day" stehen.

                              @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                              Was ist denn hier die "Währung" für gute/sehr hilfreiche Beiträge?

                              Ein Klick auf den Pfeil nach oben:

                              Forum_Währung.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

                              M 1 Antwort Letzte Antwort
                              0
                              • paul53P paul53

                                @meisterschatten sagte: muss ich mir die Einheit aus dem Ursprungsobjekt holen?

                                Die Einheit muss im per Blockly ausgewerteten Datenpunkt "statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day" stehen.

                                @meisterschatten sagte in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                                Was ist denn hier die "Währung" für gute/sehr hilfreiche Beiträge?

                                Ein Klick auf den Pfeil nach oben:

                                Forum_Währung.JPG

                                M Offline
                                M Offline
                                MeisterSchatten
                                schrieb am zuletzt editiert von
                                #19

                                @paul53 said in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                                Die Einheit muss im per Blockly ausgewerteten Datenpunkt "statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day" stehen.

                                Ist bei mir leider nicht der Fall. Hatte die linkeddevices im Verdacht, aber dort sind Einheiten drin. Nur in den Wertem vom statistics-Adapter nicht. Finde dafür auch keine Einstellung.

                                IOBroker, Raspberrymatic, Proxmox, Intel NUC

                                paul53P 1 Antwort Letzte Antwort
                                0
                                • M MeisterSchatten

                                  @paul53 said in Unterkategorien in Kategorien mit ID-Selector ansprechen:

                                  Die Einheit muss im per Blockly ausgewerteten Datenpunkt "statistics.0.save.sumDelta.linkeddevices.0.++HSS7.B.01KG.VK==DDC1+01KG.HZ=BF010.HZ=BF010&TotE_B_TotVol.day" stehen.

                                  Ist bei mir leider nicht der Fall. Hatte die linkeddevices im Verdacht, aber dort sind Einheiten drin. Nur in den Wertem vom statistics-Adapter nicht. Finde dafür auch keine Einstellung.

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

                                  @meisterschatten sagte: in den Wertem vom statistics-Adapter nicht. Finde dafür auch keine Einstellung.

                                  Trage die Einheiten manuell nach oder gebe im Blockly den Text "kWh" ein.

                                  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
                                  0
                                  Antworten
                                  • In einem neuen Thema antworten
                                  Anmelden zum Antworten
                                  • Älteste zuerst
                                  • Neuste zuerst
                                  • Meiste Stimmen


                                  Support us

                                  ioBroker
                                  Community Adapters
                                  Donate

                                  622

                                  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