Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • 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

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. [Gelößt] Hilfe brauche ein Script

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.8k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    2.2k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    16
    1
    3.3k

[Gelößt] Hilfe brauche ein Script

Scheduled Pinned Locked Moved Blockly
31 Posts 6 Posters 1.7k Views 5 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • rantanplanR rantanplan

    @thewhobox sagte in Hilfe brauche ein Script:

    Ich denke was atreck damit eher meint ist, dass das wirklich nur Grundbefehle sind und der TE nach einem Skript direkt fragt und nicht nach hilfe zu einem Skript.

    Du und arteck habt ja beide Recht. (wenigstens ein bisschen :relaxed: )
    Aber wir kommen vom Thema ab.

    Grüße

    thewhoboxT Offline
    thewhoboxT Offline
    thewhobox
    wrote on last edited by
    #9

    @rantanplan na gut. Um wieder auf das Theme zu kommen :P
    Hier mal ein einfaches Blockly mit einer Javascript funktion:
    6ae3e2cd-0e00-4317-8f64-705a7478e92d-grafik.png

    Die Funktion sieht dann so aus:
    edd73392-48e9-4890-990b-613caa02aa9a-grafik.png

    Alles minimaler Aufwand, wie es @paul53 schon hatte, nur in einem Blockly.

    Was macht es?
    Es holt sich zuerst den JSON strin aus dem Datenpunkt mit "getState", macht daraus ein JSON-Objekt "JSON.parse" und splittet es dann bei jedem Semikolon und gibt es als Array (hier auch Liste genannt) zurück.

    Die Funktion kannst du auch in einen Trigger packen, wenn sich der Wert ändert und dann in einen seperaten Datenpunkt schreiben.

    Meine Adapter: emby | discovery
    Benutzt das Voting rechts unten im Beitrag wenn er euch geholfen hat.

    1 Reply Last reply
    0
    • W winny1900

      So gut bin ich beim Scripten noch nicht. Kannst du mir da vlt. noch ein wenig weiter helfen ?

      paul53P Offline
      paul53P Offline
      paul53
      wrote on last edited by paul53
      #10

      @winny1900 sagte:

      Kannst du mir da vlt. noch ein wenig weiter helfen ?

      const idSrc = 'mqtt.0.domoticz.in';
      const idTemp = 'Aussen.Temperatur'; 
      const idHum = 'Aussen.Luftfeuchte';
      
      createState(idTemp, 0, {type: 'number', unit: '°C'});
      createState(idHum, 0, {type: 'number', unit: '%'});
      
      function values(val) {
         var svalue = JSON.parse(val).svalue.split(';');
         setState(idTemp, parseFloat(svalue[0]), true);
         setState(idHum, parseFloat(svalue[1]), true);
      }
      
      setTimeout(function() { // Skriptstart
         values(getState(idSrc).val);
      }, 100);
      
      on(idSrc, function(dp) {
         values(dp.state.val);
      });
      

      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

      rantanplanR 1 Reply Last reply
      0
      • paul53P paul53

        @winny1900 sagte:

        Kannst du mir da vlt. noch ein wenig weiter helfen ?

        const idSrc = 'mqtt.0.domoticz.in';
        const idTemp = 'Aussen.Temperatur'; 
        const idHum = 'Aussen.Luftfeuchte';
        
        createState(idTemp, 0, {type: 'number', unit: '°C'});
        createState(idHum, 0, {type: 'number', unit: '%'});
        
        function values(val) {
           var svalue = JSON.parse(val).svalue.split(';');
           setState(idTemp, parseFloat(svalue[0]), true);
           setState(idHum, parseFloat(svalue[1]), true);
        }
        
        setTimeout(function() { // Skriptstart
           values(getState(idSrc).val);
        }, 100);
        
        on(idSrc, function(dp) {
           values(dp.state.val);
        });
        
        rantanplanR Online
        rantanplanR Online
        rantanplan
        wrote on last edited by
        #11

        @paul53 Wir sind hier in der Blockly Rubrik.

        Rantanplan

        CCU3 / MS Server 2019(VM) / Scripten mit Blockly

        paul53P 1 Reply Last reply
        0
        • rantanplanR rantanplan

          @paul53 Wir sind hier in der Blockly Rubrik.

          paul53P Offline
          paul53P Offline
          paul53
          wrote on last edited by paul53
          #12

          @rantanplan sagte:

          Wir sind hier in der Blockly Rubrik.

          Habe ich übersehen.
          Blockly ist mir zu anstrengend. Schadet es jemandem, an Beispielen Javascript zu lernen ?

          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 Reply Last reply
          0
          • W Offline
            W Offline
            winny1900
            wrote on last edited by
            #13

            Hey Jungs

            Ich möchte euch danken für die Hilfe werde es zu Hause gleich ausprobieren.

            Ich wollte hier kein Ärger verursachen mit meiner Frage.

            Bevor ich es hier gepostet habe , habe ich alles was mir in Sachen blockly bekannt ist ausprobiert. Ohne Erfolg. Deshalb und nur deshalb habe ich um Hilfe gebeten.

            Mit den Jason Scripts habe ich noch gar keine Erfahrung.

            Nochmals danke für die Hilfe ich werde mich melden ob es geklappt hat.

            Grüße vom Niederrhein

            HomoranH 1 Reply Last reply
            0
            • W winny1900

              Hey Jungs

              Ich möchte euch danken für die Hilfe werde es zu Hause gleich ausprobieren.

              Ich wollte hier kein Ärger verursachen mit meiner Frage.

              Bevor ich es hier gepostet habe , habe ich alles was mir in Sachen blockly bekannt ist ausprobiert. Ohne Erfolg. Deshalb und nur deshalb habe ich um Hilfe gebeten.

              Mit den Jason Scripts habe ich noch gar keine Erfahrung.

              Nochmals danke für die Hilfe ich werde mich melden ob es geklappt hat.

              Grüße vom Niederrhein

              HomoranH Do not disturb
              HomoranH Do not disturb
              Homoran
              Global Moderator Administrators
              wrote on last edited by
              #14

              @winny1900

              @winny1900 sagte in Hilfe brauche ein Script:

              habe ich alles was mir in Sachen blockly bekannt ist ausprobiert

              Dann zeig das mal.

              Es ist immer einfacher an den Fragmenten zu erkennen wo die Denkfehler sind

              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 -

              1 Reply Last reply
              0
              • rantanplanR rantanplan

                Wie Paul53 schon eindrucksvoll gezeigt hat, sind das in JS nur ein paar Zeilen.
                In Blockly geht das "von hinten durch die Brust ins Auge".

                Zum Verständnis (und lernen:relaxed: ) zeige ich mal eine "etwas" ausführliche Lösung.

                (Über eine Antwort von Paul53 würde ich mich auch freuen. Vielleicht hat er ja die "JSON-Bausteine" enträtselt.)

                Beispiel_001.png

                Export:

                <xml xmlns="http://www.w3.org/1999/xhtml">
                  <variables>
                    <variable type="" id="2R99*+!(ovfD$?Z+Ri@~">Text</variable>
                    <variable type="" id="2|TCE*#nEGA2s*%j+z.F">TextLaenge</variable>
                    <variable type="" id="8CRYYEX+JaTUV-o=C]7}">suchText</variable>
                    <variable type="" id="=4O:50b6Ek/vo;[8*[mN">Fundstelle</variable>
                    <variable type="" id="exHs?NUXv!N%lId*IJsx">TextTeilstueck</variable>
                    <variable type="" id="`Q/:wkC*Z([8-mYvl,5i">Liste</variable>
                    <variable type="" id="mFFbNq?Vt.;s{*c!I5@p">ListeAnzahlElemente</variable>
                    <variable type="" id="A=oFX+JV^E?Ne=R/e_N[">i</variable>
                  </variables>
                  <block type="comment" id="cvvkT(U,(S0VRy%~swI|" x="38" y="37">
                    <field name="COMMENT">Das ist der Datenpunkt</field>
                    <next>
                      <block type="variables_set" id="p}Tn=!F58r/0+nkLRd/C">
                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                        <value name="VALUE">
                          <block type="text" id="`,#4Zm)6$9qhBMwkjY`4">
                            <field name="TEXT">{"idx":1,"svalue:1":"14.8;61,6;0"}</field>
                          </block>
                        </value>
                        <next>
                          <block type="comment" id="86;q.v0U]b:}(e,)w@8L">
                            <field name="COMMENT">Die Länge von Text</field>
                            <next>
                              <block type="variables_set" id="D;EuQi2_tpig^2PzA+ot">
                                <field name="VAR" id="2|TCE*#nEGA2s*%j+z.F" variabletype="">TextLaenge</field>
                                <value name="VALUE">
                                  <block type="text_length" id="L$gbucr|-LK5S8agn]H8">
                                    <value name="VALUE">
                                      <shadow type="text" id="GVmpY^BTOM,NNRHY%dcA">
                                        <field name="TEXT">abc</field>
                                      </shadow>
                                      <block type="variables_get" id="zq*aMp!t;4UTUM3g[-K(">
                                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="comment" id="n}7[oVCRftF5}ja:Je2E">
                                    <field name="COMMENT">Das soll in dem Text gesucht werden</field>
                                    <next>
                                      <block type="variables_set" id="s#suM%c7/}ZIZP|mFS[n">
                                        <field name="VAR" id="8CRYYEX+JaTUV-o=C]7}" variabletype="">suchText</field>
                                        <value name="VALUE">
                                          <block type="text" id="ctT2W(utrBX$}{gx;f^#">
                                            <field name="TEXT">:"</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="comment" id="Dr7d00{INN3f!qfTY4YT">
                                            <field name="COMMENT">Hier wurde der Text gefunden (Suche von hinten)</field>
                                            <next>
                                              <block type="variables_set" id="6-mJ?tSo?LSU[i3y(H+e">
                                                <field name="VAR" id="=4O:50b6Ek/vo;[8*[mN" variabletype="">Fundstelle</field>
                                                <value name="VALUE">
                                                  <block type="text_indexOf" id="vRI?C1*DtjT7nj{lEFZ(" inline="false">
                                                    <field name="END">LAST</field>
                                                    <value name="VALUE">
                                                      <block type="variables_get" id="x)nC303{RsT7HoNAAxWI">
                                                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                                      </block>
                                                    </value>
                                                    <value name="FIND">
                                                      <shadow type="text" id="uV*DTVf/!P@N=6In~c.V">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="variables_get" id="na3`C8![:Ca[xjS*gzQU">
                                                        <field name="VAR" id="8CRYYEX+JaTUV-o=C]7}" variabletype="">suchText</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="comment" id="yoySoy5sdmr=YYv`I]zE">
                                                    <field name="COMMENT">der interessante Teil vom Datenpunkt</field>
                                                    <next>
                                                      <block type="variables_set" id="C{@Fm({M.}eH`U/;#f,[">
                                                        <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                        <value name="VALUE">
                                                          <block type="text_getSubstring" id="F#KAY6uw#c+{=*.oXI%y" inline="false">
                                                            <mutation at1="true" at2="true"></mutation>
                                                            <field name="WHERE1">FROM_START</field>
                                                            <field name="WHERE2">FROM_START</field>
                                                            <value name="STRING">
                                                              <block type="variables_get" id="IVdD`%5}{8TbHW0p0e_z">
                                                                <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                                              </block>
                                                            </value>
                                                            <value name="AT1">
                                                              <block type="math_arithmetic" id=":H30puv$~3+t[?MAK*U5">
                                                                <field name="OP">ADD</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="gx]rsLxD~nL#-~Dn^`mp">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="[DW(~aPCD2b.94t$5o#?">
                                                                    <field name="VAR" id="=4O:50b6Ek/vo;[8*[mN" variabletype="">Fundstelle</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="@XWBM*.T5Bn`.H)Kx7jP">
                                                                    <field name="NUM">2</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="AT2">
                                                              <block type="math_arithmetic" id="gd?A.QRMbwlJDg1pi~F,">
                                                                <field name="OP">MINUS</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="k-/*$gp2Ne;hGtsn(kO:">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="XP3ociH9,hIc-YQoJ!A%">
                                                                    <field name="VAR" id="2|TCE*#nEGA2s*%j+z.F" variabletype="">TextLaenge</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="MSq3N9]@/;|0NI?MBfHi">
                                                                    <field name="NUM">2</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="debug" id="mH6Na/53l](,qLkK:l5D">
                                                            <field name="Severity">log</field>
                                                            <value name="TEXT">
                                                              <shadow type="text" id="Lt?(z4E|?_kq/U#h9P7-">
                                                                <field name="TEXT">test</field>
                                                              </shadow>
                                                              <block type="variables_get" id="B,{HJt:LS#R$8xFa%c;R">
                                                                <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="comment" id="mqk1HfPp7N/Qb`*/:BLo">
                                                                <field name="COMMENT">Eine Liste aus dem Teilstück</field>
                                                                <next>
                                                                  <block type="variables_set" id="dVIP@h_MG9yz*UL6NL).">
                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                    <value name="VALUE">
                                                                      <block type="lists_split" id="(7yd*61IIl-[J=k0p(r9">
                                                                        <mutation mode="SPLIT"></mutation>
                                                                        <field name="MODE">SPLIT</field>
                                                                        <value name="INPUT">
                                                                          <block type="variables_get" id="yf))S%kc21#`E09kX5R(">
                                                                            <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="DELIM">
                                                                          <shadow type="text" id="j_:ESd1QYrR(gT=GbKD_">
                                                                            <field name="TEXT">;</field>
                                                                          </shadow>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="comment" id="gCP1_V%YWpnK*^da#L|^">
                                                                        <field name="COMMENT">Anzahl der erstellen Elemente in der Liste</field>
                                                                        <next>
                                                                          <block type="variables_set" id="sKX_Ir@hwNvZM]0oRH|8">
                                                                            <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                            <value name="VALUE">
                                                                              <block type="lists_length" id="+^RGW_$?RaD#A*weO_Z0">
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id="=wN?MH.da[X^cwa)jfSC">
                                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="debug" id="x=fvm$zuZzf1pK#MJCWS">
                                                                                <field name="Severity">log</field>
                                                                                <value name="TEXT">
                                                                                  <shadow type="text" id=".]Ih{:Fq*!1zTJ#Ck5^$">
                                                                                    <field name="TEXT">test</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="fYR_10YMqyY*=hu_x{7~">
                                                                                    <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="comment" id="%rzt#pYr7#Q*?6rPFe+^">
                                                                                    <field name="COMMENT">Ausgeben der Elemente</field>
                                                                                    <next>
                                                                                      <block type="controls_for" id="lO$x3?Q)WT[uQ7ai5O]T">
                                                                                        <field name="VAR" id="A=oFX+JV^E?Ne=R/e_N[" variabletype="">i</field>
                                                                                        <value name="FROM">
                                                                                          <shadow type="math_number" id="/knKj6=7j^t[j^^Wtt1s">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                        </value>
                                                                                        <value name="TO">
                                                                                          <shadow type="math_number" id="Z?o_jrxs]8/^p;y[Pb_(">
                                                                                            <field name="NUM">10</field>
                                                                                          </shadow>
                                                                                          <block type="variables_get" id="s{L-]Ojj:V(JCu)@CA!B">
                                                                                            <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="BY">
                                                                                          <shadow type="math_number" id="-jF$^h,PPl74u`usV)kh">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                        </value>
                                                                                        <statement name="DO">
                                                                                          <block type="debug" id="-+R?qVY8OHyn~xx@8ToU">
                                                                                            <field name="Severity">log</field>
                                                                                            <value name="TEXT">
                                                                                              <shadow type="text" id="XyhwTo6F?DK)#u|}nN]T">
                                                                                                <field name="TEXT">test</field>
                                                                                              </shadow>
                                                                                              <block type="lists_getIndex" id="Ur#l[;ZM%ZhNT7a=jik6">
                                                                                                <mutation statement="false" at="true"></mutation>
                                                                                                <field name="MODE">GET</field>
                                                                                                <field name="WHERE">FROM_START</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="variables_get" id="he.hEu8SPO9wBS:Py6QI">
                                                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="AT">
                                                                                                  <block type="variables_get" id="BeYIjC%X6Cv2M*sPV+m+">
                                                                                                    <field name="VAR" id="A=oFX+JV^E?Ne=R/e_N[" variabletype="">i</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </statement>
                                                                                        <next>
                                                                                          <block type="comment" id="T{IH*//7)ZocWo(VtWL*">
                                                                                            <field name="COMMENT">Element 1 und 2 sind hier die gesuchten Werte</field>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </xml>
                
                <xml xmlns="http://www.w3.org/1999/xhtml">
                  <variables>
                    <variable type="" id="2R99*+!(ovfD$?Z+Ri@~">Text</variable>
                    <variable type="" id="2|TCE*#nEGA2s*%j+z.F">TextLaenge</variable>
                    <variable type="" id="8CRYYEX+JaTUV-o=C]7}">suchText</variable>
                    <variable type="" id="=4O:50b6Ek/vo;[8*[mN">Fundstelle</variable>
                    <variable type="" id="exHs?NUXv!N%lId*IJsx">TextTeilstueck</variable>
                    <variable type="" id="`Q/:wkC*Z([8-mYvl,5i">Liste</variable>
                    <variable type="" id="mFFbNq?Vt.;s{*c!I5@p">ListeAnzahlElemente</variable>
                    <variable type="" id="A=oFX+JV^E?Ne=R/e_N[">i</variable>
                  </variables>
                  <block type="comment" id="cvvkT(U,(S0VRy%~swI|" x="38" y="37">
                    <field name="COMMENT">Das ist der Datenpunkt</field>
                    <next>
                      <block type="variables_set" id="p}Tn=!F58r/0+nkLRd/C">
                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                        <value name="VALUE">
                          <block type="text" id="`,#4Zm)6$9qhBMwkjY`4">
                            <field name="TEXT">{"idx":1,"svalue:1":"14.8;61,6;0"}</field>
                          </block>
                        </value>
                        <next>
                          <block type="comment" id="86;q.v0U]b:}(e,)w@8L">
                            <field name="COMMENT">Die Länge von Text</field>
                            <next>
                              <block type="variables_set" id="D;EuQi2_tpig^2PzA+ot">
                                <field name="VAR" id="2|TCE*#nEGA2s*%j+z.F" variabletype="">TextLaenge</field>
                                <value name="VALUE">
                                  <block type="text_length" id="L$gbucr|-LK5S8agn]H8">
                                    <value name="VALUE">
                                      <shadow type="text" id="GVmpY^BTOM,NNRHY%dcA">
                                        <field name="TEXT">abc</field>
                                      </shadow>
                                      <block type="variables_get" id="zq*aMp!t;4UTUM3g[-K(">
                                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                      </block>
                                    </value>
                                  </block>
                                </value>
                                <next>
                                  <block type="comment" id="n}7[oVCRftF5}ja:Je2E">
                                    <field name="COMMENT">Das soll in dem Text gesucht werden</field>
                                    <next>
                                      <block type="variables_set" id="s#suM%c7/}ZIZP|mFS[n">
                                        <field name="VAR" id="8CRYYEX+JaTUV-o=C]7}" variabletype="">suchText</field>
                                        <value name="VALUE">
                                          <block type="text" id="ctT2W(utrBX$}{gx;f^#">
                                            <field name="TEXT">:"</field>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="comment" id="Dr7d00{INN3f!qfTY4YT">
                                            <field name="COMMENT">Hier wurde der Text gefunden (Suche von hinten)</field>
                                            <next>
                                              <block type="variables_set" id="6-mJ?tSo?LSU[i3y(H+e">
                                                <field name="VAR" id="=4O:50b6Ek/vo;[8*[mN" variabletype="">Fundstelle</field>
                                                <value name="VALUE">
                                                  <block type="text_indexOf" id="vRI?C1*DtjT7nj{lEFZ(" inline="false">
                                                    <field name="END">LAST</field>
                                                    <value name="VALUE">
                                                      <block type="variables_get" id="x)nC303{RsT7HoNAAxWI">
                                                        <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                                      </block>
                                                    </value>
                                                    <value name="FIND">
                                                      <shadow type="text" id="uV*DTVf/!P@N=6In~c.V">
                                                        <field name="TEXT"></field>
                                                      </shadow>
                                                      <block type="variables_get" id="na3`C8![:Ca[xjS*gzQU">
                                                        <field name="VAR" id="8CRYYEX+JaTUV-o=C]7}" variabletype="">suchText</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="comment" id="yoySoy5sdmr=YYv`I]zE">
                                                    <field name="COMMENT">der interessante Teil vom Datenpunkt</field>
                                                    <next>
                                                      <block type="variables_set" id="C{@Fm({M.}eH`U/;#f,[">
                                                        <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                        <value name="VALUE">
                                                          <block type="text_getSubstring" id="F#KAY6uw#c+{=*.oXI%y" inline="false">
                                                            <mutation at1="true" at2="true"></mutation>
                                                            <field name="WHERE1">FROM_START</field>
                                                            <field name="WHERE2">FROM_START</field>
                                                            <value name="STRING">
                                                              <block type="variables_get" id="IVdD`%5}{8TbHW0p0e_z">
                                                                <field name="VAR" id="2R99*+!(ovfD$?Z+Ri@~" variabletype="">Text</field>
                                                              </block>
                                                            </value>
                                                            <value name="AT1">
                                                              <block type="math_arithmetic" id=":H30puv$~3+t[?MAK*U5">
                                                                <field name="OP">ADD</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="gx]rsLxD~nL#-~Dn^`mp">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="[DW(~aPCD2b.94t$5o#?">
                                                                    <field name="VAR" id="=4O:50b6Ek/vo;[8*[mN" variabletype="">Fundstelle</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="@XWBM*.T5Bn`.H)Kx7jP">
                                                                    <field name="NUM">2</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <value name="AT2">
                                                              <block type="math_arithmetic" id="gd?A.QRMbwlJDg1pi~F,">
                                                                <field name="OP">MINUS</field>
                                                                <value name="A">
                                                                  <shadow type="math_number" id="k-/*$gp2Ne;hGtsn(kO:">
                                                                    <field name="NUM">1</field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="XP3ociH9,hIc-YQoJ!A%">
                                                                    <field name="VAR" id="2|TCE*#nEGA2s*%j+z.F" variabletype="">TextLaenge</field>
                                                                  </block>
                                                                </value>
                                                                <value name="B">
                                                                  <shadow type="math_number" id="MSq3N9]@/;|0NI?MBfHi">
                                                                    <field name="NUM">2</field>
                                                                  </shadow>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="debug" id="mH6Na/53l](,qLkK:l5D">
                                                            <field name="Severity">log</field>
                                                            <value name="TEXT">
                                                              <shadow type="text" id="Lt?(z4E|?_kq/U#h9P7-">
                                                                <field name="TEXT">test</field>
                                                              </shadow>
                                                              <block type="variables_get" id="B,{HJt:LS#R$8xFa%c;R">
                                                                <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="comment" id="mqk1HfPp7N/Qb`*/:BLo">
                                                                <field name="COMMENT">Eine Liste aus dem Teilstück</field>
                                                                <next>
                                                                  <block type="variables_set" id="dVIP@h_MG9yz*UL6NL).">
                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                    <value name="VALUE">
                                                                      <block type="lists_split" id="(7yd*61IIl-[J=k0p(r9">
                                                                        <mutation mode="SPLIT"></mutation>
                                                                        <field name="MODE">SPLIT</field>
                                                                        <value name="INPUT">
                                                                          <block type="variables_get" id="yf))S%kc21#`E09kX5R(">
                                                                            <field name="VAR" id="exHs?NUXv!N%lId*IJsx" variabletype="">TextTeilstueck</field>
                                                                          </block>
                                                                        </value>
                                                                        <value name="DELIM">
                                                                          <shadow type="text" id="j_:ESd1QYrR(gT=GbKD_">
                                                                            <field name="TEXT">;</field>
                                                                          </shadow>
                                                                        </value>
                                                                      </block>
                                                                    </value>
                                                                    <next>
                                                                      <block type="comment" id="gCP1_V%YWpnK*^da#L|^">
                                                                        <field name="COMMENT">Anzahl der erstellen Elemente in der Liste</field>
                                                                        <next>
                                                                          <block type="variables_set" id="sKX_Ir@hwNvZM]0oRH|8">
                                                                            <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                            <value name="VALUE">
                                                                              <block type="lists_length" id="+^RGW_$?RaD#A*weO_Z0">
                                                                                <value name="VALUE">
                                                                                  <block type="variables_get" id="=wN?MH.da[X^cwa)jfSC">
                                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                                  </block>
                                                                                </value>
                                                                              </block>
                                                                            </value>
                                                                            <next>
                                                                              <block type="debug" id="x=fvm$zuZzf1pK#MJCWS">
                                                                                <field name="Severity">log</field>
                                                                                <value name="TEXT">
                                                                                  <shadow type="text" id=".]Ih{:Fq*!1zTJ#Ck5^$">
                                                                                    <field name="TEXT">test</field>
                                                                                  </shadow>
                                                                                  <block type="variables_get" id="fYR_10YMqyY*=hu_x{7~">
                                                                                    <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                                  </block>
                                                                                </value>
                                                                                <next>
                                                                                  <block type="comment" id="%rzt#pYr7#Q*?6rPFe+^">
                                                                                    <field name="COMMENT">Ausgeben der Elemente</field>
                                                                                    <next>
                                                                                      <block type="controls_for" id="lO$x3?Q)WT[uQ7ai5O]T">
                                                                                        <field name="VAR" id="A=oFX+JV^E?Ne=R/e_N[" variabletype="">i</field>
                                                                                        <value name="FROM">
                                                                                          <shadow type="math_number" id="/knKj6=7j^t[j^^Wtt1s">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                        </value>
                                                                                        <value name="TO">
                                                                                          <shadow type="math_number" id="Z?o_jrxs]8/^p;y[Pb_(">
                                                                                            <field name="NUM">10</field>
                                                                                          </shadow>
                                                                                          <block type="variables_get" id="s{L-]Ojj:V(JCu)@CA!B">
                                                                                            <field name="VAR" id="mFFbNq?Vt.;s{*c!I5@p" variabletype="">ListeAnzahlElemente</field>
                                                                                          </block>
                                                                                        </value>
                                                                                        <value name="BY">
                                                                                          <shadow type="math_number" id="-jF$^h,PPl74u`usV)kh">
                                                                                            <field name="NUM">1</field>
                                                                                          </shadow>
                                                                                        </value>
                                                                                        <statement name="DO">
                                                                                          <block type="debug" id="-+R?qVY8OHyn~xx@8ToU">
                                                                                            <field name="Severity">log</field>
                                                                                            <value name="TEXT">
                                                                                              <shadow type="text" id="XyhwTo6F?DK)#u|}nN]T">
                                                                                                <field name="TEXT">test</field>
                                                                                              </shadow>
                                                                                              <block type="lists_getIndex" id="Ur#l[;ZM%ZhNT7a=jik6">
                                                                                                <mutation statement="false" at="true"></mutation>
                                                                                                <field name="MODE">GET</field>
                                                                                                <field name="WHERE">FROM_START</field>
                                                                                                <value name="VALUE">
                                                                                                  <block type="variables_get" id="he.hEu8SPO9wBS:Py6QI">
                                                                                                    <field name="VAR" id="`Q/:wkC*Z([8-mYvl,5i" variabletype="">Liste</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                                <value name="AT">
                                                                                                  <block type="variables_get" id="BeYIjC%X6Cv2M*sPV+m+">
                                                                                                    <field name="VAR" id="A=oFX+JV^E?Ne=R/e_N[" variabletype="">i</field>
                                                                                                  </block>
                                                                                                </value>
                                                                                              </block>
                                                                                            </value>
                                                                                          </block>
                                                                                        </statement>
                                                                                        <next>
                                                                                          <block type="comment" id="T{IH*//7)ZocWo(VtWL*">
                                                                                            <field name="COMMENT">Element 1 und 2 sind hier die gesuchten Werte</field>
                                                                                          </block>
                                                                                        </next>
                                                                                      </block>
                                                                                    </next>
                                                                                  </block>
                                                                                </next>
                                                                              </block>
                                                                            </next>
                                                                          </block>
                                                                        </next>
                                                                      </block>
                                                                    </next>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </xml>
                

                Grüße

                W Offline
                W Offline
                winny1900
                wrote on last edited by winny1900
                #15

                @rantanplan
                Danke das klappt soweit ganz gut. Er zeigt mir die Daten richtig an die oben im Text stehen. Der Text ändert sich ja nicht wenn sich der Zustand der Temp ändert. Habe ich doch richtig verstanden oder ?

                Das heißt der müsste sich doch wenn sich die Temp aktualisiert einen neue Textzeile holen oder ?

                rantanplanR 1 Reply Last reply
                0
                • W winny1900

                  @rantanplan
                  Danke das klappt soweit ganz gut. Er zeigt mir die Daten richtig an die oben im Text stehen. Der Text ändert sich ja nicht wenn sich der Zustand der Temp ändert. Habe ich doch richtig verstanden oder ?

                  Das heißt der müsste sich doch wenn sich die Temp aktualisiert einen neue Textzeile holen oder ?

                  rantanplanR Online
                  rantanplanR Online
                  rantanplan
                  wrote on last edited by rantanplan
                  #16

                  @winny1900 sagte in Hilfe brauche ein Script:

                  @rantanplan
                  Danke das klappt soweit ganz gut. Er zeigt mir die Daten richtig an die oben im Text stehen. Der Text ändert sich ja nicht wenn sich der Zustand der Temp ändert. Habe ich doch richtig verstanden oder ?

                  Das heißt der müsste sich doch wenn sich die Temp aktualisiert einen neue Textzeile holen oder ?

                  Ich habe keinen Adapter der einen JSON liefert. Deshalb habe ich Deine Angabe in einen Text gepackt.
                  Da müsste Dein Datenpunkt von Deinem Adapter hin. Habe ich aber auch drüber kommentiert.

                  Rantanplan

                  CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                  1 Reply Last reply
                  0
                  • W Offline
                    W Offline
                    winny1900
                    wrote on last edited by
                    #17

                    1234.PNG

                    So schauts aus und Klappt. Jedes mal wenn der Wert neu rein kommt wird neu geladen.

                    Danke das hätte ich so nicht hinbekommen !!!

                    Grüße

                    1 Reply Last reply
                    0
                    • rantanplanR Online
                      rantanplanR Online
                      rantanplan
                      wrote on last edited by
                      #18

                      Prima. Kannste aber noch "optimieren".
                      Setze bitte ein [gelöst] in Deinem ersten Beitrag-Titel.

                      Rantanplan

                      CCU3 / MS Server 2019(VM) / Scripten mit Blockly

                      W 1 Reply Last reply
                      0
                      • rantanplanR rantanplan

                        Prima. Kannste aber noch "optimieren".
                        Setze bitte ein [gelöst] in Deinem ersten Beitrag-Titel.

                        W Offline
                        W Offline
                        winny1900
                        wrote on last edited by
                        #19

                        @rantanplan

                        eine Frage noch dann ist es wohl Gelößt.

                        Wie bekomme ich diese Zahl jetzt in VIS ?

                        Ist das erste Blockly für mich in verbindung mit VIS.

                        paul53P 1 Reply Last reply
                        0
                        • W winny1900

                          @rantanplan

                          eine Frage noch dann ist es wohl Gelößt.

                          Wie bekomme ich diese Zahl jetzt in VIS ?

                          Ist das erste Blockly für mich in verbindung mit VIS.

                          paul53P Offline
                          paul53P Offline
                          paul53
                          wrote on last edited by paul53
                          #20

                          @winny1900 sagte:

                          Wie bekomme ich diese Zahl jetzt in VIS ?

                          Erstelle unter javascript.0 zwei Datenpunkte vom Typ Zahl. Die kannst Du in Vis anzeigen.
                          Hier noch eine einfachere Variante in Blockly:

                          Blockly_json_temp_hum.JPG

                          <xml xmlns="http://www.w3.org/1999/xhtml">
                            <variables>
                              <variable type="" id="^qm4e^`2czKZoH]v$#fl">svalue</variable>
                            </variables>
                            <block type="comment" id="9n9v:t+^YMFN!FcVt%`," x="-412" y="37">
                              <field name="COMMENT">mqtt.0.domoticz.in</field>
                              <next>
                                <block type="on_ext" id="GT`:hBV!3yxgm!|!K~71">
                                  <mutation items="1"></mutation>
                                  <field name="CONDITION">ne</field>
                                  <field name="ACK_CONDITION"></field>
                                  <value name="OID0">
                                    <shadow type="field_oid" id="QsKav`scUw[F2b`k4|:0">
                                      <field name="oid">default</field>
                                    </shadow>
                                  </value>
                                  <statement name="STATEMENT">
                                    <block type="variables_set" id="Oj_j6{/t`(UmgHca?z{h">
                                      <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                      <value name="VALUE">
                                        <block type="lists_split" id="BWP{vz7kklj8g/$9Z9w1">
                                          <mutation mode="SPLIT"></mutation>
                                          <field name="MODE">SPLIT</field>
                                          <value name="INPUT">
                                            <block type="get_attr" id=".(zz43SmwgHL-7;k06`A">
                                              <value name="PATH">
                                                <shadow type="text" id="p3x_XG,@)4*`}n1$EPK!">
                                                  <field name="TEXT">svalue</field>
                                                </shadow>
                                              </value>
                                              <value name="OBJECT">
                                                <block type="on_source" id="{ci9/]DbojUFy#dg!346">
                                                  <field name="ATTR">state.val</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <value name="DELIM">
                                            <shadow type="text" id="mVDhf?jm!P!+1axeKFt7">
                                              <field name="TEXT">;</field>
                                            </shadow>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="comment" id="vlRRKrcDW%0k~i/!$qCg">
                                          <field name="COMMENT">Temperatur</field>
                                          <next>
                                            <block type="update" id="bEl[~{A}71F!?sOPMSE#">
                                              <mutation delay_input="false"></mutation>
                                              <field name="OID">Object ID</field>
                                              <field name="WITH_DELAY">FALSE</field>
                                              <value name="VALUE">
                                                <block type="convert_tonumber" id="q4kt:./.w7)aJ@R]Hrdm">
                                                  <value name="VALUE">
                                                    <block type="lists_getIndex" id="c{lQ3iLBC_o=6LI!9r7j">
                                                      <mutation statement="false" at="true"></mutation>
                                                      <field name="MODE">GET</field>
                                                      <field name="WHERE">FROM_START</field>
                                                      <value name="VALUE">
                                                        <block type="variables_get" id="C.*hD-!6honAqqOr`{uk">
                                                          <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                                        </block>
                                                      </value>
                                                      <value name="AT">
                                                        <block type="math_number" id="j}{GiOwS*(,Zgm2]Kcr:">
                                                          <field name="NUM">1</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="comment" id="7:hpc2shYp-{jw${9Owx">
                                                  <field name="COMMENT">Luftfeuchtigkeit</field>
                                                  <next>
                                                    <block type="update" id="zJiYj1wb9T6W[3{b:ip}">
                                                      <mutation delay_input="false"></mutation>
                                                      <field name="OID">Object ID</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="convert_tonumber" id="59Kp#ayU+-[lR:fq23M8">
                                                          <value name="VALUE">
                                                            <block type="lists_getIndex" id="uJH|GQie1lqx|6%EqSpH">
                                                              <mutation statement="false" at="true"></mutation>
                                                              <field name="MODE">GET</field>
                                                              <field name="WHERE">FROM_START</field>
                                                              <value name="VALUE">
                                                                <block type="variables_get" id="!2HC:9{c}JjO~-b?(bV}">
                                                                  <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                                                </block>
                                                              </value>
                                                              <value name="AT">
                                                                <block type="math_number" id="G,t04Tbinp}-ph0J;r|~">
                                                                  <field name="NUM">2</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </statement>
                                </block>
                              </next>
                            </block>
                          </xml>
                          
                          

                          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

                          W 1 Reply Last reply
                          1
                          • W Offline
                            W Offline
                            winny1900
                            wrote on last edited by
                            #21

                            12345.PNG

                            Der ansatz ist doch richtig. Der soll den wert in den neu angelegten Datenpunkt schreiben. Wenn ich da Liste eintrage schreibt der mir 3 Werte da rein.
                            Wie bekomme ich das gelößt ?

                            Ich mus auf jedenfall einen zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

                            Grüße

                            paul53P 1 Reply Last reply
                            0
                            • W winny1900

                              12345.PNG

                              Der ansatz ist doch richtig. Der soll den wert in den neu angelegten Datenpunkt schreiben. Wenn ich da Liste eintrage schreibt der mir 3 Werte da rein.
                              Wie bekomme ich das gelößt ?

                              Ich mus auf jedenfall einen zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

                              Grüße

                              paul53P Offline
                              paul53P Offline
                              paul53
                              wrote on last edited by
                              #22

                              @winny1900 sagte:

                              zweiten schreibe Block hinzufügen der mit ID Luftfeuchte.

                              Schau mal in den Post davor: Die Variable Liste heißt dort svalue.

                              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 Reply Last reply
                              0
                              • paul53P paul53

                                @winny1900 sagte:

                                Wie bekomme ich diese Zahl jetzt in VIS ?

                                Erstelle unter javascript.0 zwei Datenpunkte vom Typ Zahl. Die kannst Du in Vis anzeigen.
                                Hier noch eine einfachere Variante in Blockly:

                                Blockly_json_temp_hum.JPG

                                <xml xmlns="http://www.w3.org/1999/xhtml">
                                  <variables>
                                    <variable type="" id="^qm4e^`2czKZoH]v$#fl">svalue</variable>
                                  </variables>
                                  <block type="comment" id="9n9v:t+^YMFN!FcVt%`," x="-412" y="37">
                                    <field name="COMMENT">mqtt.0.domoticz.in</field>
                                    <next>
                                      <block type="on_ext" id="GT`:hBV!3yxgm!|!K~71">
                                        <mutation items="1"></mutation>
                                        <field name="CONDITION">ne</field>
                                        <field name="ACK_CONDITION"></field>
                                        <value name="OID0">
                                          <shadow type="field_oid" id="QsKav`scUw[F2b`k4|:0">
                                            <field name="oid">default</field>
                                          </shadow>
                                        </value>
                                        <statement name="STATEMENT">
                                          <block type="variables_set" id="Oj_j6{/t`(UmgHca?z{h">
                                            <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                            <value name="VALUE">
                                              <block type="lists_split" id="BWP{vz7kklj8g/$9Z9w1">
                                                <mutation mode="SPLIT"></mutation>
                                                <field name="MODE">SPLIT</field>
                                                <value name="INPUT">
                                                  <block type="get_attr" id=".(zz43SmwgHL-7;k06`A">
                                                    <value name="PATH">
                                                      <shadow type="text" id="p3x_XG,@)4*`}n1$EPK!">
                                                        <field name="TEXT">svalue</field>
                                                      </shadow>
                                                    </value>
                                                    <value name="OBJECT">
                                                      <block type="on_source" id="{ci9/]DbojUFy#dg!346">
                                                        <field name="ATTR">state.val</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <value name="DELIM">
                                                  <shadow type="text" id="mVDhf?jm!P!+1axeKFt7">
                                                    <field name="TEXT">;</field>
                                                  </shadow>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="comment" id="vlRRKrcDW%0k~i/!$qCg">
                                                <field name="COMMENT">Temperatur</field>
                                                <next>
                                                  <block type="update" id="bEl[~{A}71F!?sOPMSE#">
                                                    <mutation delay_input="false"></mutation>
                                                    <field name="OID">Object ID</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="convert_tonumber" id="q4kt:./.w7)aJ@R]Hrdm">
                                                        <value name="VALUE">
                                                          <block type="lists_getIndex" id="c{lQ3iLBC_o=6LI!9r7j">
                                                            <mutation statement="false" at="true"></mutation>
                                                            <field name="MODE">GET</field>
                                                            <field name="WHERE">FROM_START</field>
                                                            <value name="VALUE">
                                                              <block type="variables_get" id="C.*hD-!6honAqqOr`{uk">
                                                                <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                                              </block>
                                                            </value>
                                                            <value name="AT">
                                                              <block type="math_number" id="j}{GiOwS*(,Zgm2]Kcr:">
                                                                <field name="NUM">1</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="comment" id="7:hpc2shYp-{jw${9Owx">
                                                        <field name="COMMENT">Luftfeuchtigkeit</field>
                                                        <next>
                                                          <block type="update" id="zJiYj1wb9T6W[3{b:ip}">
                                                            <mutation delay_input="false"></mutation>
                                                            <field name="OID">Object ID</field>
                                                            <field name="WITH_DELAY">FALSE</field>
                                                            <value name="VALUE">
                                                              <block type="convert_tonumber" id="59Kp#ayU+-[lR:fq23M8">
                                                                <value name="VALUE">
                                                                  <block type="lists_getIndex" id="uJH|GQie1lqx|6%EqSpH">
                                                                    <mutation statement="false" at="true"></mutation>
                                                                    <field name="MODE">GET</field>
                                                                    <field name="WHERE">FROM_START</field>
                                                                    <value name="VALUE">
                                                                      <block type="variables_get" id="!2HC:9{c}JjO~-b?(bV}">
                                                                        <field name="VAR" id="^qm4e^`2czKZoH]v$#fl" variabletype="">svalue</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="AT">
                                                                      <block type="math_number" id="G,t04Tbinp}-ph0J;r|~">
                                                                        <field name="NUM">2</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </statement>
                                      </block>
                                    </next>
                                  </block>
                                </xml>
                                
                                

                                W Offline
                                W Offline
                                winny1900
                                wrote on last edited by
                                #23

                                @paul53

                                bei aktualisiere Objekt ID kommt domoticz rein oder ?

                                Weil das Script bei mir nicht läuft.

                                17:30:05.712 error javascript.0 script.js.common.Test_2: Cannot get svalue of undefined
                                17:30:05.713 error javascript.0 at Object.<anonymous> (script.js.common.Test_2:7:35)

                                paul53P 1 Reply Last reply
                                0
                                • W winny1900

                                  @paul53

                                  bei aktualisiere Objekt ID kommt domoticz rein oder ?

                                  Weil das Script bei mir nicht läuft.

                                  17:30:05.712 error javascript.0 script.js.common.Test_2: Cannot get svalue of undefined
                                  17:30:05.713 error javascript.0 at Object.<anonymous> (script.js.common.Test_2:7:35)

                                  paul53P Offline
                                  paul53P Offline
                                  paul53
                                  wrote on last edited by paul53
                                  #24

                                  @winny1900 sagte in Hilfe brauche ein Script:

                                  bei aktualisiere Objekt ID kommt domoticz rein oder ?

                                  Nein, beim ersten kommt die ID des Datenpunktes für die Temperaturanzeige und beim zweiten für die Feuchteanzeige rein (steht im Kommentar darüber). domoticz/in kommt beim Trigger rein.

                                  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

                                  W 1 Reply Last reply
                                  0
                                  • paul53P paul53

                                    @winny1900 sagte in Hilfe brauche ein Script:

                                    bei aktualisiere Objekt ID kommt domoticz rein oder ?

                                    Nein, beim ersten kommt die ID des Datenpunktes für die Temperaturanzeige und beim zweiten für die Feuchteanzeige rein (steht im Kommentar darüber). domoticz/in kommt beim Trigger rein.

                                    W Offline
                                    W Offline
                                    winny1900
                                    wrote on last edited by
                                    #25

                                    @paul53 1234.PNG

                                    hatte ich auch aber klappt nicht !

                                    paul53P 1 Reply Last reply
                                    0
                                    • W winny1900

                                      @paul53 1234.PNG

                                      hatte ich auch aber klappt nicht !

                                      paul53P Offline
                                      paul53P Offline
                                      paul53
                                      wrote on last edited by
                                      #26

                                      @winny1900 sagte:

                                      klappt nicht !

                                      Poste mal den Javascript-Code zu dem Blockly.

                                      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 Reply Last reply
                                      0
                                      • W Offline
                                        W Offline
                                        winny1900
                                        wrote on last edited by
                                        #27
                                        <xml xmlns="http://www.w3.org/1999/xhtml">
                                          <variables>
                                            <variable type="" id="M3M(d4mStWF20,0YTs8-">svalue</variable>
                                            <variable type="" id="rXRrCB6TjAFBN}u0m?94">Wert</variable>
                                          </variables>
                                          <block type="on_ext" id="?0aUoyJ54YONx4lpTknk" x="-62" y="38">
                                            <mutation items="1"></mutation>
                                            <field name="CONDITION">ne</field>
                                            <field name="ACK_CONDITION"></field>
                                            <value name="OID0">
                                              <shadow type="field_oid" id="X@|.GI#NMkm!tpElg:0N">
                                                <field name="oid">mqtt.0.domoticz.in</field>
                                              </shadow>
                                              <block type="field_oid" id="=|F.L85D:FZ~uR(VAqL9">
                                                <field name="oid">mqtt.0.domoticz.in</field>
                                              </block>
                                            </value>
                                            <statement name="STATEMENT">
                                              <block type="variables_set" id=",$-$oLn`tLQuKnm=HAP?">
                                                <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                <value name="VALUE">
                                                  <block type="lists_split" id="7:n2~,g/#UErIRm78!bd">
                                                    <mutation mode="SPLIT"></mutation>
                                                    <field name="MODE">SPLIT</field>
                                                    <value name="INPUT">
                                                      <block type="get_attr" id="P6Gq~]6C.+XQ}:j%rL!Q">
                                                        <value name="PATH">
                                                          <shadow type="text" id="UA6bAniM.d`]{i.G)AUU">
                                                            <field name="TEXT">svalue</field>
                                                          </shadow>
                                                          <block type="text" id="/]q34ws4q$)`qxanFm83">
                                                            <field name="TEXT">svalue</field>
                                                          </block>
                                                        </value>
                                                        <value name="OBJECT">
                                                          <block type="variables_get" id="#8(Jdx2lV75rL:?gh}!A">
                                                            <field name="VAR" id="rXRrCB6TjAFBN}u0m?94" variabletype="">Wert</field>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <value name="DELIM">
                                                      <shadow type="text" id="YI.KKD*:?hqMram{#d:R">
                                                        <field name="TEXT">;</field>
                                                      </shadow>
                                                      <block type="text" id=",XR}u%x}l|~rfkM?eg/.">
                                                        <field name="TEXT">;</field>
                                                      </block>
                                                    </value>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="update" id="+Qw~Z-c]b(7XXG;SQ=,-">
                                                    <mutation delay_input="false"></mutation>
                                                    <field name="OID">javascript.0.Außentemp</field>
                                                    <field name="WITH_DELAY">FALSE</field>
                                                    <value name="VALUE">
                                                      <block type="convert_tonumber" id=",KQE85]PB{DEo.#kx,1B">
                                                        <value name="VALUE">
                                                          <block type="lists_getIndex" id="R+k,Tks}7GP2k!0U7x)8">
                                                            <mutation statement="false" at="true"></mutation>
                                                            <field name="MODE">GET</field>
                                                            <field name="WHERE">FROM_START</field>
                                                            <value name="VALUE">
                                                              <block type="variables_get" id="wZ6)t!iOCh%It;@{4GZ$">
                                                                <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                              </block>
                                                            </value>
                                                            <value name="AT">
                                                              <block type="math_number" id="5_zkgF{7ky)jKLqU|;lA">
                                                                <field name="NUM">1</field>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </value>
                                                    <next>
                                                      <block type="update" id="idUi)E`+(nGu=!Zgf}L`">
                                                        <mutation delay_input="false"></mutation>
                                                        <field name="OID">javascript.0.Außenluftfeuchte</field>
                                                        <field name="WITH_DELAY">FALSE</field>
                                                        <value name="VALUE">
                                                          <block type="convert_tonumber" id="(hT.wec}=+(x8(|n@ckG">
                                                            <value name="VALUE">
                                                              <block type="lists_getIndex" id="|y-mRDdVe%`abvj`+39I">
                                                                <mutation statement="false" at="true"></mutation>
                                                                <field name="MODE">GET</field>
                                                                <field name="WHERE">FROM_START</field>
                                                                <value name="VALUE">
                                                                  <block type="variables_get" id="|1kG5WAlJ35yF,10|i-h">
                                                                    <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                                  </block>
                                                                </value>
                                                                <value name="AT">
                                                                  <block type="math_number" id="7)gDqXV+Lv~A9(v,]*;}">
                                                                    <field name="NUM">2</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                          </block>
                                                        </value>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </statement>
                                          </block>
                                        </xml>
                                        
                                        paul53P 1 Reply Last reply
                                        0
                                        • W winny1900
                                          <xml xmlns="http://www.w3.org/1999/xhtml">
                                            <variables>
                                              <variable type="" id="M3M(d4mStWF20,0YTs8-">svalue</variable>
                                              <variable type="" id="rXRrCB6TjAFBN}u0m?94">Wert</variable>
                                            </variables>
                                            <block type="on_ext" id="?0aUoyJ54YONx4lpTknk" x="-62" y="38">
                                              <mutation items="1"></mutation>
                                              <field name="CONDITION">ne</field>
                                              <field name="ACK_CONDITION"></field>
                                              <value name="OID0">
                                                <shadow type="field_oid" id="X@|.GI#NMkm!tpElg:0N">
                                                  <field name="oid">mqtt.0.domoticz.in</field>
                                                </shadow>
                                                <block type="field_oid" id="=|F.L85D:FZ~uR(VAqL9">
                                                  <field name="oid">mqtt.0.domoticz.in</field>
                                                </block>
                                              </value>
                                              <statement name="STATEMENT">
                                                <block type="variables_set" id=",$-$oLn`tLQuKnm=HAP?">
                                                  <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                  <value name="VALUE">
                                                    <block type="lists_split" id="7:n2~,g/#UErIRm78!bd">
                                                      <mutation mode="SPLIT"></mutation>
                                                      <field name="MODE">SPLIT</field>
                                                      <value name="INPUT">
                                                        <block type="get_attr" id="P6Gq~]6C.+XQ}:j%rL!Q">
                                                          <value name="PATH">
                                                            <shadow type="text" id="UA6bAniM.d`]{i.G)AUU">
                                                              <field name="TEXT">svalue</field>
                                                            </shadow>
                                                            <block type="text" id="/]q34ws4q$)`qxanFm83">
                                                              <field name="TEXT">svalue</field>
                                                            </block>
                                                          </value>
                                                          <value name="OBJECT">
                                                            <block type="variables_get" id="#8(Jdx2lV75rL:?gh}!A">
                                                              <field name="VAR" id="rXRrCB6TjAFBN}u0m?94" variabletype="">Wert</field>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <value name="DELIM">
                                                        <shadow type="text" id="YI.KKD*:?hqMram{#d:R">
                                                          <field name="TEXT">;</field>
                                                        </shadow>
                                                        <block type="text" id=",XR}u%x}l|~rfkM?eg/.">
                                                          <field name="TEXT">;</field>
                                                        </block>
                                                      </value>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="update" id="+Qw~Z-c]b(7XXG;SQ=,-">
                                                      <mutation delay_input="false"></mutation>
                                                      <field name="OID">javascript.0.Außentemp</field>
                                                      <field name="WITH_DELAY">FALSE</field>
                                                      <value name="VALUE">
                                                        <block type="convert_tonumber" id=",KQE85]PB{DEo.#kx,1B">
                                                          <value name="VALUE">
                                                            <block type="lists_getIndex" id="R+k,Tks}7GP2k!0U7x)8">
                                                              <mutation statement="false" at="true"></mutation>
                                                              <field name="MODE">GET</field>
                                                              <field name="WHERE">FROM_START</field>
                                                              <value name="VALUE">
                                                                <block type="variables_get" id="wZ6)t!iOCh%It;@{4GZ$">
                                                                  <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                                </block>
                                                              </value>
                                                              <value name="AT">
                                                                <block type="math_number" id="5_zkgF{7ky)jKLqU|;lA">
                                                                  <field name="NUM">1</field>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </value>
                                                      <next>
                                                        <block type="update" id="idUi)E`+(nGu=!Zgf}L`">
                                                          <mutation delay_input="false"></mutation>
                                                          <field name="OID">javascript.0.Außenluftfeuchte</field>
                                                          <field name="WITH_DELAY">FALSE</field>
                                                          <value name="VALUE">
                                                            <block type="convert_tonumber" id="(hT.wec}=+(x8(|n@ckG">
                                                              <value name="VALUE">
                                                                <block type="lists_getIndex" id="|y-mRDdVe%`abvj`+39I">
                                                                  <mutation statement="false" at="true"></mutation>
                                                                  <field name="MODE">GET</field>
                                                                  <field name="WHERE">FROM_START</field>
                                                                  <value name="VALUE">
                                                                    <block type="variables_get" id="|1kG5WAlJ35yF,10|i-h">
                                                                      <field name="VAR" id="M3M(d4mStWF20,0YTs8-" variabletype="">svalue</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT">
                                                                    <block type="math_number" id="7)gDqXV+Lv~A9(v,]*;}">
                                                                      <field name="NUM">2</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                            </block>
                                                          </value>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </statement>
                                            </block>
                                          </xml>
                                          
                                          paul53P Offline
                                          paul53P Offline
                                          paul53
                                          wrote on last edited by paul53
                                          #28

                                          @winny1900 Wert ist keine Variable, sondern eine Eigenschaft des Triggerdatenpunktes (unter Blöcke Trigger) !
                                          Du kannst auch die Variable Wert umbenennen nach value, damit es funktioniert.

                                          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

                                          W 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          697

                                          Online

                                          32.4k

                                          Users

                                          81.5k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe