Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Visualisierung
    4. [Gelöst] Adapter Updates in Liste anzeigen

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    [Gelöst] Adapter Updates in Liste anzeigen

    This topic has been deleted. Only users with topic management privileges can see it.
    • K
      Kuddel @Negalein last edited by

      @negalein @Homoran

      Vielen Dank für die Hilfe.

      Dann mache ich es mit der Liste ohne Versionsummern

      DJMarc75 1 Reply Last reply Reply Quote 0
      • DJMarc75
        DJMarc75 @Kuddel last edited by DJMarc75

        @kuddel Mal auf die Schnelle ein Blockly gebastelt.
        Im Blockly wird ein eigener DP benötigt vom Typ JSON.

        Bei mir:

        0_userdata.0.System.Abfragen.AdapterUpdates
        

        Screenshot 2024-02-07 115506.png Screenshot 2024-02-07 115535.png

        <xml xmlns="https://developers.google.com/blockly/xml">
         <variables>
           <variable id="rP{a|eu}2/U(2%YfvLO^">json</variable>
           <variable id="TOC57z`*`7eGmxbFS-:h">updateliste</variable>
           <variable id="CUid=kHOy5RBXEU4[!}D">updatejson</variable>
           <variable id="JT52yn~1WVDRD|]6)~f]">i</variable>
           <variable id="%Tg~cn!H=|@vi9M%DCjv">adapter</variable>
         </variables>
         <block type="on_ext" id="^2c-iIL#(amcW/Kl9sTp" x="63" y="13">
           <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
           <field name="CONDITION">any</field>
           <field name="ACK_CONDITION"></field>
           <value name="OID0">
             <shadow type="field_oid" id="X;:)n=I~w1^8IU4(T1R(">
               <field name="oid">admin.0.info.updatesList</field>
             </shadow>
           </value>
           <statement name="STATEMENT">
             <block type="variables_set" id="-#s]aV=U1oOLLJe3=~sV">
               <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
               <value name="VALUE">
                 <block type="lists_create_with" id="l1hpxzG5oEx4~AE]bTeN">
                   <mutation items="0"></mutation>
                 </block>
               </value>
               <next>
                 <block type="variables_set" id="8_pk2}Xx=Tk/k*J9Fwl2">
                   <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                   <value name="VALUE">
                     <block type="lists_split" id="Z%rwV6Wm.u@7E4saEPw8">
                       <mutation mode="SPLIT"></mutation>
                       <field name="MODE">SPLIT</field>
                       <value name="INPUT">
                         <block type="on_source" id="[e$^vfcm/uO?w7?Ds7_;">
                           <field name="ATTR">state.val</field>
                         </block>
                       </value>
                       <value name="DELIM">
                         <shadow type="text" id="Z/1)5cf,Tx8M@$)v,M8q">
                           <field name="TEXT">,</field>
                         </shadow>
                       </value>
                     </block>
                   </value>
                   <next>
                     <block type="variables_set" id=")eSE=bb6fjskakdAvMY]">
                       <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                       <value name="VALUE">
                         <block type="get_value" id="P3$jK(])}hNuP{/t*+hD">
                           <field name="ATTR">val</field>
                           <field name="OID">admin.0.info.updatesJson</field>
                         </block>
                       </value>
                       <next>
                         <block type="controls_if" id="4/YcB[CnoJ!EK9ksIV1n">
                           <mutation else="1"></mutation>
                           <value name="IF0">
                             <block type="logic_compare" id="0;_6LO5Mcc3:MgZJ32UM">
                               <field name="OP">GT</field>
                               <value name="A">
                                 <block type="lists_length" id="Ic.y2T!sOZB=t`.RjWg1">
                                   <value name="VALUE">
                                     <block type="variables_get" id="I#iue[cat`+f%U|hB=*h">
                                       <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <value name="B">
                                 <block type="math_number" id="49v@i:m@5;=f_q(dq6oV">
                                   <field name="NUM">0</field>
                                 </block>
                               </value>
                             </block>
                           </value>
                           <statement name="DO0">
                             <block type="controls_forEach" id="S|b0;?EHe{4W!UGtj78q">
                               <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                               <value name="LIST">
                                 <block type="variables_get" id="B@f[SOAnS?^TjC8[9cYc">
                                   <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                                 </block>
                               </value>
                               <statement name="DO">
                                 <block type="variables_set" id=":L[BVFn@{a?CoY0to_Bl">
                                   <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                   <value name="VALUE">
                                     <block type="text_join" id="{kAKV%CsdCKa0nD]#}ti">
                                       <mutation items="7"></mutation>
                                       <value name="ADD0">
                                         <block type="text" id="^rIJNi^+iX/2X,%|t)fu">
                                           <field name="TEXT">{"name":"</field>
                                         </block>
                                       </value>
                                       <value name="ADD1">
                                         <block type="variables_get" id="Ky).`A#7oG!EH^Sp)xl6">
                                           <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                         </block>
                                       </value>
                                       <value name="ADD2">
                                         <block type="text" id="vDmQA^~#ag=Z.kczU/ZJ">
                                           <field name="TEXT">","installed":"</field>
                                         </block>
                                       </value>
                                       <value name="ADD3">
                                         <block type="get_attr" id="QcpxucK|xe/hBA$LjLFu">
                                           <value name="PATH">
                                             <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                               <field name="TEXT"></field>
                                             </shadow>
                                             <block type="text_join" id="R%-)0Lip5n[H]{0654OW">
                                               <mutation items="2"></mutation>
                                               <value name="ADD0">
                                                 <block type="variables_get" id="LLl%?F_vDk9$M|(vLVB{">
                                                   <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="text" id="`D:XG%[2tFZ^7924q]CQ">
                                                   <field name="TEXT">.installedVersion</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="OBJECT">
                                             <block type="variables_get" id="3F|D*VO-PuakxbT3M?]y">
                                               <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="ADD4">
                                         <block type="text" id="HA@c+Xf#W{@AK]{_{J;^">
                                           <field name="TEXT">","available":"</field>
                                         </block>
                                       </value>
                                       <value name="ADD5">
                                         <block type="get_attr" id="qLK`:EV!Mo}Yl#}BQDsu">
                                           <value name="PATH">
                                             <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                               <field name="TEXT"></field>
                                             </shadow>
                                             <block type="text_join" id="%!do@ZuSW$S+fXsoj[0L">
                                               <mutation items="2"></mutation>
                                               <value name="ADD0">
                                                 <block type="variables_get" id="3-pk3$9qD[iVWP9$*se)">
                                                   <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                 </block>
                                               </value>
                                               <value name="ADD1">
                                                 <block type="text" id=",}yqpwXX2FLAT+^([Wb{">
                                                   <field name="TEXT">.availableVersion</field>
                                                 </block>
                                               </value>
                                             </block>
                                           </value>
                                           <value name="OBJECT">
                                             <block type="variables_get" id="{%1^LJSZzb]telZlH77C">
                                               <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                             </block>
                                           </value>
                                         </block>
                                       </value>
                                       <value name="ADD6">
                                         <block type="text" id="RY@Rs+[Skala~`:4%GBD">
                                           <field name="TEXT">"}</field>
                                         </block>
                                       </value>
                                     </block>
                                   </value>
                                   <next>
                                     <block type="lists_setIndex" id="s0%R]B4u8%(^i{R:@pnU">
                                       <mutation at="false"></mutation>
                                       <field name="MODE">INSERT</field>
                                       <field name="WHERE">FIRST</field>
                                       <value name="LIST">
                                         <block type="variables_get" id="n-Ri;-e/WMt$?|.x~1EO">
                                           <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                         </block>
                                       </value>
                                       <value name="TO">
                                         <block type="variables_get" id="InrP93A.d5$9[iQJZ0x}">
                                           <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                         </block>
                                       </value>
                                     </block>
                                   </next>
                                 </block>
                               </statement>
                             </block>
                           </statement>
                           <statement name="ELSE">
                             <block type="variables_set" id="qWF7(x]*D=k@v:Ev9_oA">
                               <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                               <value name="VALUE">
                                 <block type="text_join" id="=7Cm$751BcdM`)I,S@o^">
                                   <mutation items="7"></mutation>
                                   <value name="ADD0">
                                     <block type="text" id="7}UPq#7:Fxkg7vwxx!v0">
                                       <field name="TEXT">{"name":"</field>
                                     </block>
                                   </value>
                                   <value name="ADD1">
                                     <block type="text" id="@P.of)4+Dt,l?kwwy1@,">
                                       <field name="TEXT">---</field>
                                     </block>
                                   </value>
                                   <value name="ADD2">
                                     <block type="text" id="/7zrfJsN;8=Wu.emg6.#">
                                       <field name="TEXT">","installed":"</field>
                                     </block>
                                   </value>
                                   <value name="ADD3">
                                     <block type="text" id="f!*7l7Abv@Cg4=0~iwI_">
                                       <field name="TEXT">---</field>
                                     </block>
                                   </value>
                                   <value name="ADD4">
                                     <block type="text" id="lQDWYz%R-kJB0V?TUI`9">
                                       <field name="TEXT">","available":"</field>
                                     </block>
                                   </value>
                                   <value name="ADD5">
                                     <block type="text" id="H!iH8V5U7lxOjl6gv/Y;">
                                       <field name="TEXT">---</field>
                                     </block>
                                   </value>
                                   <value name="ADD6">
                                     <block type="text" id="P2IWF.Ifsfxr+?C^rjf5">
                                       <field name="TEXT">"}</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                               <next>
                                 <block type="lists_setIndex" id="Zx%B$~y7R^a=jEfUX-1$">
                                   <mutation at="false"></mutation>
                                   <field name="MODE">INSERT</field>
                                   <field name="WHERE">FIRST</field>
                                   <value name="LIST">
                                     <block type="variables_get" id="d%a?$5ZYdwevHpGH?HZ{">
                                       <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                     </block>
                                   </value>
                                   <value name="TO">
                                     <block type="variables_get" id="`,+-JzgIY_g%#umzVt5$">
                                       <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                     </block>
                                   </value>
                                 </block>
                               </next>
                             </block>
                           </statement>
                           <next>
                             <block type="update" id="QL)/b@ApoRsE+@43Jk)e">
                               <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                               <field name="OID">0_userdata.0.System.Abfragen.AdapterUpdates</field>
                               <field name="WITH_DELAY">FALSE</field>
                               <value name="VALUE">
                                 <block type="text_join" id=",S2q2@fVSPZ$gwdfU.K^">
                                   <mutation items="3"></mutation>
                                   <value name="ADD0">
                                     <block type="text" id="[8Dt;6WRu#w;PHR9f5;s">
                                       <field name="TEXT">[</field>
                                     </block>
                                   </value>
                                   <value name="ADD1">
                                     <block type="variables_get" id="*oi@gVbJES%gpc_{}:cI">
                                       <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                     </block>
                                   </value>
                                   <value name="ADD2">
                                     <block type="text" id=";83V_NW:%ZOZ^i=jpygm">
                                       <field name="TEXT">]</field>
                                     </block>
                                   </value>
                                 </block>
                               </value>
                             </block>
                           </next>
                         </block>
                       </next>
                     </block>
                   </next>
                 </block>
               </next>
             </block>
           </statement>
         </block>
        </xml>
        

        1 Reply Last reply Reply Quote 2
        • DJMarc75
          DJMarc75 last edited by

          Hab im Blockly noch einen Fehler drin, den ich jetzt erst mal finden und korrigieren muss 😉

          Kann bissle dauern

          1 Reply Last reply Reply Quote 0
          • da_Woody
            da_Woody @Negalein last edited by

            @negalein sagte in [Gelöst] Adapter Updates in Liste anzeigen:

            Ich verwende dazu de DP admin.0.info.updatesList

            nette sache, vorallem seit der info adapter ja gestorben ist... highfive.gif

            1 Reply Last reply Reply Quote 0
            • DJMarc75
              DJMarc75 last edited by

              So, Fehler entdeckt - besser gesagt waren es 2 Fehler:

              Im OriginalDP der Liste befinden sich je ein Leerzeichen nach dem Komma.
              Da es einen neuen tollen Baustein gibt um Zeichen in Text zu ersetzen hab ich natürlich den dazu verwendet und ein Leerzeichen durch NICHTS ersetzen lassen.
              Ebenso hat sich der DP

              admin.0.info.updatesJson
              

              manchmal erst nach der Liste aktualisiert, deshalb PAUSE:

              Screenshot 2024-02-07 134838.png

              Der untere Bereich (vom Beitrag oben) bleibt gleich:

              <xml xmlns="https://developers.google.com/blockly/xml">
               <variables>
                 <variable id="rP{a|eu}2/U(2%YfvLO^">json</variable>
                 <variable id="TOC57z`*`7eGmxbFS-:h">updateliste</variable>
                 <variable id="CUid=kHOy5RBXEU4[!}D">updatejson</variable>
                 <variable id="JT52yn~1WVDRD|]6)~f]">i</variable>
                 <variable id="%Tg~cn!H=|@vi9M%DCjv">adapter</variable>
               </variables>
               <block type="on_ext" id="^2c-iIL#(amcW/Kl9sTp" x="63" y="-112">
                 <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                 <field name="CONDITION">ne</field>
                 <field name="ACK_CONDITION"></field>
                 <value name="OID0">
                   <shadow type="field_oid" id="X;:)n=I~w1^8IU4(T1R(">
                     <field name="oid">admin.0.info.updatesList</field>
                   </shadow>
                 </value>
                 <statement name="STATEMENT">
                   <block type="variables_set" id="-#s]aV=U1oOLLJe3=~sV">
                     <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                     <value name="VALUE">
                       <block type="lists_create_with" id="l1hpxzG5oEx4~AE]bTeN">
                         <mutation items="0"></mutation>
                       </block>
                     </value>
                     <next>
                       <block type="variables_set" id="8_pk2}Xx=Tk/k*J9Fwl2">
                         <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                         <value name="VALUE">
                           <block type="lists_split" id="Z%rwV6Wm.u@7E4saEPw8">
                             <mutation mode="SPLIT"></mutation>
                             <field name="MODE">SPLIT</field>
                             <value name="INPUT">
                               <block type="text_replace" id="Oo!}a5#@dT_Do,EBVu?E">
                                 <value name="FROM">
                                   <shadow type="text" id="-M8n=5?gUe==S.6VT_;o">
                                     <field name="TEXT">x</field>
                                   </shadow>
                                   <block type="text" id="QMUh6%-i2%0F4`4/.$#D">
                                     <field name="TEXT"> </field>
                                   </block>
                                 </value>
                                 <value name="TO">
                                   <shadow type="text" id="j(=:a%S.a:)ZX(eGXhAU">
                                     <field name="TEXT">y</field>
                                   </shadow>
                                   <block type="text" id="R5T7u.E|6=UuV,R8cTFC">
                                     <field name="TEXT"></field>
                                   </block>
                                 </value>
                                 <value name="TEXT">
                                   <shadow type="text" id="NfIO^?sLex[!.[%`)OxA">
                                     <field name="TEXT">text</field>
                                   </shadow>
                                   <block type="on_source" id="#?6G9=I5/Q3=`L9QL))H">
                                     <field name="ATTR">state.val</field>
                                   </block>
                                 </value>
                               </block>
                             </value>
                             <value name="DELIM">
                               <shadow type="text" id="Z/1)5cf,Tx8M@$)v,M8q">
                                 <field name="TEXT">,</field>
                               </shadow>
                             </value>
                           </block>
                         </value>
                         <next>
                           <block type="timeouts_wait" id="`bIHybs9~)Fan,rzI9of">
                             <field name="DELAY">2000</field>
                             <field name="UNIT">ms</field>
                             <next>
                               <block type="variables_set" id=")eSE=bb6fjskakdAvMY]">
                                 <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                 <value name="VALUE">
                                   <block type="get_value" id="P3$jK(])}hNuP{/t*+hD">
                                     <field name="ATTR">val</field>
                                     <field name="OID">admin.0.info.updatesJson</field>
                                   </block>
                                 </value>
                                 <next>
                                   <block type="controls_if" id="8YYl`(ipRgPIv$@4Z}a5">
                                     <mutation else="1"></mutation>
                                     <value name="IF0">
                                       <block type="logic_compare" id="kc61@`}B7uQSmmUm83=|">
                                         <field name="OP">GT</field>
                                         <value name="A">
                                           <block type="lists_length" id="`aQ!czQ_sPpRnlfFI)np">
                                             <value name="VALUE">
                                               <block type="variables_get" id="kn6.uyDToE1rBn}rLn6B">
                                                 <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <value name="B">
                                           <block type="math_number" id="kV?Be1}mmn8#HMPT]{L@">
                                             <field name="NUM">0</field>
                                           </block>
                                         </value>
                                       </block>
                                     </value>
                                     <statement name="DO0">
                                       <block type="controls_forEach" id="S|b0;?EHe{4W!UGtj78q">
                                         <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                         <value name="LIST">
                                           <block type="variables_get" id="B@f[SOAnS?^TjC8[9cYc">
                                             <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                                           </block>
                                         </value>
                                         <statement name="DO">
                                           <block type="variables_set" id=":L[BVFn@{a?CoY0to_Bl">
                                             <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                             <value name="VALUE">
                                               <block type="text_join" id="{kAKV%CsdCKa0nD]#}ti">
                                                 <mutation items="7"></mutation>
                                                 <value name="ADD0">
                                                   <block type="text" id="^rIJNi^+iX/2X,%|t)fu">
                                                     <field name="TEXT">{"name":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD1">
                                                   <block type="variables_get" id="Ky).`A#7oG!EH^Sp)xl6">
                                                     <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD2">
                                                   <block type="text" id="vDmQA^~#ag=Z.kczU/ZJ">
                                                     <field name="TEXT">","installed":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD3">
                                                   <block type="get_attr" id="QcpxucK|xe/hBA$LjLFu">
                                                     <value name="PATH">
                                                       <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text_join" id="R%-)0Lip5n[H]{0654OW">
                                                         <mutation items="2"></mutation>
                                                         <value name="ADD0">
                                                           <block type="variables_get" id="LLl%?F_vDk9$M|(vLVB{">
                                                             <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="text" id="`D:XG%[2tFZ^7924q]CQ">
                                                             <field name="TEXT">.installedVersion</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="OBJECT">
                                                       <block type="variables_get" id="iDX|~]ZQU{^D6Oo%||)_">
                                                         <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <value name="ADD4">
                                                   <block type="text" id="HA@c+Xf#W{@AK]{_{J;^">
                                                     <field name="TEXT">","available":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD5">
                                                   <block type="get_attr" id="qLK`:EV!Mo}Yl#}BQDsu">
                                                     <value name="PATH">
                                                       <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text_join" id="%!do@ZuSW$S+fXsoj[0L">
                                                         <mutation items="2"></mutation>
                                                         <value name="ADD0">
                                                           <block type="variables_get" id="3-pk3$9qD[iVWP9$*se)">
                                                             <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="text" id=",}yqpwXX2FLAT+^([Wb{">
                                                             <field name="TEXT">.availableVersion</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="OBJECT">
                                                       <block type="variables_get" id="p72%x{H4;g=P+7AFc+aK">
                                                         <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <value name="ADD6">
                                                   <block type="text" id="RY@Rs+[Skala~`:4%GBD">
                                                     <field name="TEXT">"}</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="lists_setIndex" id="s0%R]B4u8%(^i{R:@pnU">
                                                 <mutation at="false"></mutation>
                                                 <field name="MODE">INSERT</field>
                                                 <field name="WHERE">LAST</field>
                                                 <value name="LIST">
                                                   <block type="variables_get" id="n-Ri;-e/WMt$?|.x~1EO">
                                                     <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                                   </block>
                                                 </value>
                                                 <value name="TO">
                                                   <block type="variables_get" id="InrP93A.d5$9[iQJZ0x}">
                                                     <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                       </block>
                                     </statement>
                                     <statement name="ELSE">
                                       <block type="variables_set" id="+y+Bq%CNqshwR^q;Cl*g">
                                         <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                         <value name="VALUE">
                                           <block type="text_join" id="L(O:~OkX0lR#[.u8[{8D">
                                             <mutation items="7"></mutation>
                                             <value name="ADD0">
                                               <block type="text" id="Y{kAc}:3STy~q`2B%xU!">
                                                 <field name="TEXT">{"name":"</field>
                                               </block>
                                             </value>
                                             <value name="ADD1">
                                               <block type="text" id="E#@^oubT}Hnys;%gyes0">
                                                 <field name="TEXT">---</field>
                                               </block>
                                             </value>
                                             <value name="ADD2">
                                               <block type="text" id="]_phR;Wh-$NqWSU=,%$a">
                                                 <field name="TEXT">","installed":"</field>
                                               </block>
                                             </value>
                                             <value name="ADD3">
                                               <block type="text" id="XBs,pU`0fF(,k5vB?2=X">
                                                 <field name="TEXT">---</field>
                                               </block>
                                             </value>
                                             <value name="ADD4">
                                               <block type="text" id="#gaw;_n8-2H%Z?W[K(Wd">
                                                 <field name="TEXT">","available":"</field>
                                               </block>
                                             </value>
                                             <value name="ADD5">
                                               <block type="text" id="0.q!s[V8UJx8MGoxJ}9l">
                                                 <field name="TEXT">---</field>
                                               </block>
                                             </value>
                                             <value name="ADD6">
                                               <block type="text" id="GenB0e#Mmcve0yBB|xcE">
                                                 <field name="TEXT">"}</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                         <next>
                                           <block type="lists_setIndex" id="V+yfVy,YbUEQ4;JsAc~{">
                                             <mutation at="false"></mutation>
                                             <field name="MODE">INSERT</field>
                                             <field name="WHERE">LAST</field>
                                             <value name="LIST">
                                               <block type="variables_get" id="XQ8S)6c#?ctK@,ZrA4j^">
                                                 <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                               </block>
                                             </value>
                                             <value name="TO">
                                               <block type="variables_get" id="h2LYh%MEa:-f=.DgD*Cb">
                                                 <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </statement>
                                     <next>
                                       <block type="update" id="d-qBn^MZ#Z=a!c{Xk$Il">
                                         <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                         <field name="OID">0_userdata.0.System.Abfragen.Adapterupdates</field>
                                         <field name="WITH_DELAY">FALSE</field>
                                         <value name="VALUE">
                                           <block type="text_join" id="#cUvh5*CvN@ef;_~LfIr">
                                             <mutation items="3"></mutation>
                                             <value name="ADD0">
                                               <block type="text" id="bxLHtvE.$,lcS5sNKpef">
                                                 <field name="TEXT">[</field>
                                               </block>
                                             </value>
                                             <value name="ADD1">
                                               <block type="variables_get" id="xg_8kI(7LX@fIp6d61@4">
                                                 <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                               </block>
                                             </value>
                                             <value name="ADD2">
                                               <block type="text" id="vA$g(,jorTvHcFiBBh0H">
                                                 <field name="TEXT">]</field>
                                               </block>
                                             </value>
                                           </block>
                                         </value>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </next>
                   </block>
                 </statement>
               </block>
              </xml>
              

              K 1 Reply Last reply Reply Quote 0
              • K
                Kuddel @DJMarc75 last edited by

                @djmarc75 vielen Dank.

                Habe das direkt bei mir eingebaut:

                d2bc39bc-1edd-4644-8fb2-39b60b0e2aa3-grafik.png

                26c67026-c555-4589-ba8d-459107a47aa3-grafik.png

                1 Reply Last reply Reply Quote 1
                • DJMarc75
                  DJMarc75 last edited by

                  Eben festgestellt dass die Abfrage der Listenlänge auch weg kann:

                  Screenshot 2024-02-07 143940.png

                  <xml xmlns="https://developers.google.com/blockly/xml">
                   <variables>
                     <variable id="rP{a|eu}2/U(2%YfvLO^">json</variable>
                     <variable id="TOC57z`*`7eGmxbFS-:h">updateliste</variable>
                     <variable id="CUid=kHOy5RBXEU4[!}D">updatejson</variable>
                     <variable id="JT52yn~1WVDRD|]6)~f]">i</variable>
                     <variable id="%Tg~cn!H=|@vi9M%DCjv">adapter</variable>
                   </variables>
                   <block type="on_ext" id="^2c-iIL#(amcW/Kl9sTp" x="63" y="-112">
                     <mutation xmlns="http://www.w3.org/1999/xhtml" items="1"></mutation>
                     <field name="CONDITION">ne</field>
                     <field name="ACK_CONDITION"></field>
                     <value name="OID0">
                       <shadow type="field_oid" id="X;:)n=I~w1^8IU4(T1R(">
                         <field name="oid">admin.0.info.updatesList</field>
                       </shadow>
                     </value>
                     <statement name="STATEMENT">
                       <block type="variables_set" id="-#s]aV=U1oOLLJe3=~sV">
                         <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                         <value name="VALUE">
                           <block type="lists_create_with" id="l1hpxzG5oEx4~AE]bTeN">
                             <mutation items="0"></mutation>
                           </block>
                         </value>
                         <next>
                           <block type="variables_set" id="8_pk2}Xx=Tk/k*J9Fwl2">
                             <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                             <value name="VALUE">
                               <block type="lists_split" id="Z%rwV6Wm.u@7E4saEPw8">
                                 <mutation mode="SPLIT"></mutation>
                                 <field name="MODE">SPLIT</field>
                                 <value name="INPUT">
                                   <block type="text_replace" id="Oo!}a5#@dT_Do,EBVu?E">
                                     <value name="FROM">
                                       <shadow type="text" id="-M8n=5?gUe==S.6VT_;o">
                                         <field name="TEXT">x</field>
                                       </shadow>
                                       <block type="text" id="QMUh6%-i2%0F4`4/.$#D">
                                         <field name="TEXT"> </field>
                                       </block>
                                     </value>
                                     <value name="TO">
                                       <shadow type="text" id="j(=:a%S.a:)ZX(eGXhAU">
                                         <field name="TEXT">y</field>
                                       </shadow>
                                       <block type="text" id="R5T7u.E|6=UuV,R8cTFC">
                                         <field name="TEXT"></field>
                                       </block>
                                     </value>
                                     <value name="TEXT">
                                       <shadow type="text" id="NfIO^?sLex[!.[%`)OxA">
                                         <field name="TEXT">text</field>
                                       </shadow>
                                       <block type="on_source" id="#?6G9=I5/Q3=`L9QL))H">
                                         <field name="ATTR">state.val</field>
                                       </block>
                                     </value>
                                   </block>
                                 </value>
                                 <value name="DELIM">
                                   <shadow type="text" id="Z/1)5cf,Tx8M@$)v,M8q">
                                     <field name="TEXT">,</field>
                                   </shadow>
                                 </value>
                               </block>
                             </value>
                             <next>
                               <block type="timeouts_wait" id="`bIHybs9~)Fan,rzI9of">
                                 <field name="DELAY">10000</field>
                                 <field name="UNIT">ms</field>
                                 <next>
                                   <block type="variables_set" id=")eSE=bb6fjskakdAvMY]">
                                     <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                     <value name="VALUE">
                                       <block type="get_value" id="P3$jK(])}hNuP{/t*+hD">
                                         <field name="ATTR">val</field>
                                         <field name="OID">admin.0.info.updatesJson</field>
                                       </block>
                                     </value>
                                     <next>
                                       <block type="controls_forEach" id="S|b0;?EHe{4W!UGtj78q">
                                         <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                         <value name="LIST">
                                           <block type="variables_get" id="B@f[SOAnS?^TjC8[9cYc">
                                             <field name="VAR" id="TOC57z`*`7eGmxbFS-:h">updateliste</field>
                                           </block>
                                         </value>
                                         <statement name="DO">
                                           <block type="variables_set" id=":L[BVFn@{a?CoY0to_Bl">
                                             <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                             <value name="VALUE">
                                               <block type="text_join" id="{kAKV%CsdCKa0nD]#}ti">
                                                 <mutation items="7"></mutation>
                                                 <value name="ADD0">
                                                   <block type="text" id="^rIJNi^+iX/2X,%|t)fu">
                                                     <field name="TEXT">{"name":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD1">
                                                   <block type="variables_get" id="Ky).`A#7oG!EH^Sp)xl6">
                                                     <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD2">
                                                   <block type="text" id="vDmQA^~#ag=Z.kczU/ZJ">
                                                     <field name="TEXT">","installed":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD3">
                                                   <block type="get_attr" id="QcpxucK|xe/hBA$LjLFu">
                                                     <value name="PATH">
                                                       <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text_join" id="R%-)0Lip5n[H]{0654OW">
                                                         <mutation items="2"></mutation>
                                                         <value name="ADD0">
                                                           <block type="variables_get" id="LLl%?F_vDk9$M|(vLVB{">
                                                             <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="text" id="`D:XG%[2tFZ^7924q]CQ">
                                                             <field name="TEXT">.installedVersion</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="OBJECT">
                                                       <block type="variables_get" id="iDX|~]ZQU{^D6Oo%||)_">
                                                         <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <value name="ADD4">
                                                   <block type="text" id="HA@c+Xf#W{@AK]{_{J;^">
                                                     <field name="TEXT">","available":"</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD5">
                                                   <block type="get_attr" id="qLK`:EV!Mo}Yl#}BQDsu">
                                                     <value name="PATH">
                                                       <shadow type="text" id="/c~;=`Vu_6}yRe[Oj@ly">
                                                         <field name="TEXT"></field>
                                                       </shadow>
                                                       <block type="text_join" id="%!do@ZuSW$S+fXsoj[0L">
                                                         <mutation items="2"></mutation>
                                                         <value name="ADD0">
                                                           <block type="variables_get" id="3-pk3$9qD[iVWP9$*se)">
                                                             <field name="VAR" id="JT52yn~1WVDRD|]6)~f]">i</field>
                                                           </block>
                                                         </value>
                                                         <value name="ADD1">
                                                           <block type="text" id=",}yqpwXX2FLAT+^([Wb{">
                                                             <field name="TEXT">.availableVersion</field>
                                                           </block>
                                                         </value>
                                                       </block>
                                                     </value>
                                                     <value name="OBJECT">
                                                       <block type="variables_get" id="p72%x{H4;g=P+7AFc+aK">
                                                         <field name="VAR" id="CUid=kHOy5RBXEU4[!}D">updatejson</field>
                                                       </block>
                                                     </value>
                                                   </block>
                                                 </value>
                                                 <value name="ADD6">
                                                   <block type="text" id="RY@Rs+[Skala~`:4%GBD">
                                                     <field name="TEXT">"}</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                             <next>
                                               <block type="lists_setIndex" id="s0%R]B4u8%(^i{R:@pnU">
                                                 <mutation at="false"></mutation>
                                                 <field name="MODE">INSERT</field>
                                                 <field name="WHERE">LAST</field>
                                                 <value name="LIST">
                                                   <block type="variables_get" id="n-Ri;-e/WMt$?|.x~1EO">
                                                     <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                                   </block>
                                                 </value>
                                                 <value name="TO">
                                                   <block type="variables_get" id="InrP93A.d5$9[iQJZ0x}">
                                                     <field name="VAR" id="%Tg~cn!H=|@vi9M%DCjv">adapter</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </next>
                                           </block>
                                         </statement>
                                         <next>
                                           <block type="update" id="d-qBn^MZ#Z=a!c{Xk$Il">
                                             <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                             <field name="OID">0_userdata.0.System.Abfragen.Adapterupdates</field>
                                             <field name="WITH_DELAY">FALSE</field>
                                             <value name="VALUE">
                                               <block type="text_join" id="#cUvh5*CvN@ef;_~LfIr">
                                                 <mutation items="3"></mutation>
                                                 <value name="ADD0">
                                                   <block type="text" id="bxLHtvE.$,lcS5sNKpef">
                                                     <field name="TEXT">[</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD1">
                                                   <block type="variables_get" id="xg_8kI(7LX@fIp6d61@4">
                                                     <field name="VAR" id="rP{a|eu}2/U(2%YfvLO^">json</field>
                                                   </block>
                                                 </value>
                                                 <value name="ADD2">
                                                   <block type="text" id="vA$g(,jorTvHcFiBBh0H">
                                                     <field name="TEXT">]</field>
                                                   </block>
                                                 </value>
                                               </block>
                                             </value>
                                           </block>
                                         </next>
                                       </block>
                                     </next>
                                   </block>
                                 </next>
                               </block>
                             </next>
                           </block>
                         </next>
                       </block>
                     </statement>
                   </block>
                  </xml>
                  

                  haus-automatisierung S 2 Replies Last reply Reply Quote 0
                  • haus-automatisierung
                    haus-automatisierung Developer Most Active @DJMarc75 last edited by

                    @djmarc75 Ich glaube ich muss wirklich mal Blockly-Bausteine anbieten, um vernünftig Attribute von Objekten setzen zu können. Diese String-Verkettungen ertrage ich nicht mehr 😲

                    DJMarc75 jogibear9988 2 Replies Last reply Reply Quote 4
                    • DJMarc75
                      DJMarc75 @haus-automatisierung last edited by

                      @haus-automatisierung sagte in [Gelöst] Adapter Updates in Liste anzeigen:

                      Diese String-Verkettungen ertrage ich nicht mehr

                      Ja, ist schon etwas mühsam und kann das Blockly in die Länge ziehen - hab mich aber daran gewöhnt 😉

                      haus-automatisierung 1 Reply Last reply Reply Quote 1
                      • haus-automatisierung
                        haus-automatisierung Developer Most Active @DJMarc75 last edited by

                        @djmarc75 sagte in [Gelöst] Adapter Updates in Liste anzeigen:

                        und kann das Blockly in die Länge ziehen

                        Nicht nur das - spätestens wenn Anführungszeichen " im Text vorkommen ist das JSON nicht mehr gültig.

                        DJMarc75 1 Reply Last reply Reply Quote 0
                        • DJMarc75
                          DJMarc75 @haus-automatisierung last edited by

                          @haus-automatisierung sagte in [Gelöst] Adapter Updates in Liste anzeigen:

                          spätestens wenn Anführungszeichen " im Text vorkommen ist das JSON nicht mehr gültig.

                          ja, durfte ich auch schon zu spüren bekommen und das war mehr als ärgerlich weil die JSON so ellenlang und das Suchen anstrengend war:
                          Hab das dann in ein Paar "Radioskripten" so "gelöst" :

                          Screenshot 2024-02-07 150520.png

                          haus-automatisierung 1 Reply Last reply Reply Quote 0
                          • haus-automatisierung
                            haus-automatisierung Developer Most Active @DJMarc75 last edited by

                            @djmarc75 Google: JSON Validator. Einfügen, Fehler sehen 🙂

                            1 Reply Last reply Reply Quote 2
                            • jogibear9988
                              jogibear9988 @haus-automatisierung last edited by jogibear9988

                              @haus-automatisierung said in [Gelöst] Adapter Updates in Liste anzeigen:

                              @djmarc75 Ich glaube ich muss wirklich mal Blockly-Bausteine anbieten, um vernünftig Attribute von Objekten setzen zu können. Diese String-Verkettungen ertrage ich nicht mehr 😲

                              Hab mal was in meine webUi gebaut:

                              397e15c3-25ae-4c31-b98d-aa3616665ac5-image.png

                              Erzeugt automatisch inputs für jeden template part "{{...}}". Erfordert aber noch ein bisschen feinschliff.
                              Das könnte man dann sicher auch in JS-Adapter übernehmen. Oder wie hast du dir das vorgestellt.

                                          Blockly.Blocks['template_string'] = {
                                              init: function () {
                                                  this.appendDummyInput()
                                                      //@ts-ignore
                                                      .appendField(new Blockly.FieldLabelSerializable("Text"), "NAME")
                                                      //@ts-ignore
                                                      .appendField(new Blockly.FieldTextInput("Test Text with {{aa}} and {{bb}}"), "TEXT");
                                                  this.setInputsInline(false);
                                                  this.setOutput(true, 'String');
                                                  this.setColour(230);
                                  
                                                  this._addedInputs = [];
                                                  this._oldtext = "";
                                                  this.setOnChange((changeEvent) => {
                                                      let v = this.getFieldValue('TEXT');
                                                      if (this._oldtext == v)
                                                          return;
                                                      this._oldtext = v;
                                                      let m = /{{(.*?)}}/g
                                                      let result: RegExpExecArray;
                                  
                                                      let oldConnections = {};
                                                      for (let i of this._addedInputs) {
                                                          oldConnections[i] = (<Blockly.Block>this).getInput(i).connection.targetConnection;
                                                          (<Blockly.Block>this).removeInput(i);
                                                          // (<Blockly.Block>this).getDescendants();
                                                          //(<Blockly.Block>this).set
                                                      }
                                                      this._addedInputs = [];
                                                      while ((result = m.exec(v)) !== null) {
                                                          let nm = result[1];
                                                          this._addedInputs.push(nm);
                                                          let ip = (<Blockly.Block>this).appendValueInput(nm)
                                                              .setCheck(null)
                                                              .setAlign(Blockly.ALIGN_RIGHT)
                                                              .appendField(nm);
                                                          if (oldConnections[nm]) {
                                                              (<Blockly.Connection>oldConnections[nm]).connect(ip.connection);
                                                          }
                                                      }
                                                  });
                                              },
                                              saveExtraState: function () {
                                                  return {
                                                      'inputs': this._addedInputs,
                                                  };
                                              },
                                              loadExtraState: function (state) {
                                                  this._addedInputs = state['inputs'] ?? [];
                                                  for (let nm of this._addedInputs) {
                                                      this.appendValueInput(nm)
                                                          .setCheck(null)
                                                          .setAlign(Blockly.ALIGN_RIGHT)
                                                          .appendField(nm);
                                                  }
                                              },
                                          };
                              haus-automatisierung 1 Reply Last reply Reply Quote 0
                              • haus-automatisierung
                                haus-automatisierung Developer Most Active @jogibear9988 last edited by

                                @jogibear9988 sagte in [Gelöst] Adapter Updates in Liste anzeigen:

                                Oder wie hast du dir das vorgestellt.

                                Na dass man keine Texte zusammensetzt, sondern eben JS-Objekte definieren kann

                                • Erstelle neues Objekt mit Eigenschaften ...
                                • setze Attribute von Objekt auf ...
                                • lösche Attribut von Objekt

                                Weil Objekt zu JSON gibt es ja schon. Wäre ja irgendwie umständlich Texte zusammenzubauen.

                                jogibear9988 1 Reply Last reply Reply Quote 0
                                • jogibear9988
                                  jogibear9988 @haus-automatisierung last edited by

                                  @haus-automatisierung

                                  dazu hab ich in meinem frontend blockly schon ein paar funktionen:

                                  42c207bc-292b-4eb1-a910-59685d906d6f-image.png

                                  weil man sich eben auch dom objekte holen kann, und auf diesen Eigenschaften setzen muss.

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Siggi0904 @DJMarc75 last edited by

                                    @djmarc75 sehr cooles Blockly.
                                    Aber könntest du das Blockly so anpassen, dass ich mir die Updates per Mail senden lassen kann?

                                    Ich suche einen Weg an die aktuelle und neue Version für jeden zu aktualisierenden Adapter zu kommen.

                                    Dank dir.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post

                                    Support us

                                    ioBroker
                                    Community Adapters
                                    Donate

                                    863
                                    Online

                                    32.0k
                                    Users

                                    80.5k
                                    Topics

                                    1.3m
                                    Posts

                                    8
                                    21
                                    1012
                                    Loading More Posts
                                    • Oldest to Newest
                                    • Newest to Oldest
                                    • Most Votes
                                    Reply
                                    • Reply as topic
                                    Log in to reply
                                    Community
                                    Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                    The ioBroker Community 2014-2023
                                    logo