Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Datenpunkt aktualisieren aus xml.... via Blocky

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    Datenpunkt aktualisieren aus xml.... via Blocky

    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fototec last edited by fototec

      Hallo, ich habe folgende Url: http://user:pass@192.168.178.23: 5050/stats.xml..
      Wenn ich diese in den Browser eingebe gibt er mir folgendes zurück:

      <response>
      <Power0>0</Power0>
      <Power1>0</Power1>
      </response>

      Nun möchte ich das er aus dieser Rückgabe 2 Datenpunkte aktualisiert wenn das script oder Blocky ausgeführt wir. Also in den einen Datenpunkt den Status von Power0 und in den anderen den Status von Power1...
      Vieleicht kann mir jemand helfen,

      MfG fototec

      M 1 Reply Last reply Reply Quote 0
      • M
        MCU @fototec last edited by MCU

        @fototec Den Trigger musst du selbst festlegen, alle 10 Minuten oder 1 mal am Tag?
        Datenpunkte anlegen:

        d0d1ff8e-f41d-4a94-90d0-a42cfb66b47e-image.png

        ce505e8f-7932-407a-877b-d616a8b8db53-image.png

        F 1 Reply Last reply Reply Quote 0
        • F
          fototec @MCU last edited by

          @MCU danke für deine Hilfe, leider funzt es nicht.. bekomme im log folgenden Fehler:
          error javascript.0 (5363) at Object.<anonymous> (script.js.Datenpunkte:8:23)

          woran kann das liegen`?

          M 1 Reply Last reply Reply Quote 0
          • M
            MCU @fototec last edited by

            @fototec Zeig mal das Script.

            F 2 Replies Last reply Reply Quote 0
            • F
              fototec @MCU last edited by

              @MCU mach ich , bin eben noch nicht zu hause, sende dir nachher , danke

              1 Reply Last reply Reply Quote 0
              • F
                fototec @MCU last edited by

                @MCU

                jetzt :

                <xml xmlns="https://developers.google.com/blockly/xml">
                <variables>
                <variable type="interval" id="Wartezeit">Wartezeit</variable>
                <variable id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</variable>
                <variable id="G3KbbZh}gGmt$~oGkgiH">result</variable>
                <variable id="2VA(QS]F/#5ZGKk,gT">Power0</variable>
                <variable id="ACu~HP8DEBY7-OG4Xt;">Power1</variable>
                </variables>
                <block type="request" id="bef#+Oy1]^j(J-hp_qrm" x="-362" y="13">
                <mutation xmlns="http://www.w3.org/1999/xhtml" with_statement="true"></mutation>
                <field name="WITH_STATEMENT">TRUE</field>
                <field name="LOG">log</field>
                <value name="URL">
                <shadow type="text" id="H(VUeX]z{}0wswsdJuOw">
                <field name="TEXT">http://admin:123654@192.168.178.23: 5050/stats.xml</field>
                </shadow>
                </value>
                <statement name="STATEMENT">
                <block type="timeouts_setinterval" id="WwfW9V;RQpKQRgI^(Gdi">
                <field name="NAME">Wartezeit</field>
                <field name="INTERVAL">2</field>
                <field name="UNIT">sec</field>
                <statement name="STATEMENT">
                <block type="variables_set" id="RZE1gWk9L(gXuFYu~R@6">
                <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field>
                <value name="VALUE">
                <block type="variables_get" id="$o-0~+~gqVUmNGw)~cN">
                <field name="VAR" id="G3KbbZh}gGmt$~oGkgiH">result</field>
                </block>
                </value>
                <next>
                <block type="variables_set" id="N+_U!k^G|78GJ@~K^!-Y">
                <field name="VAR" id="2VA(QS]F/#5ZGKk,gT">Power0</field>
                <value name="VALUE">
                <block type="text_getSubstring" id="f{
                (~}fb)F{qe3FxHOUg" 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="I=1#:F}d(]2,cp^x:lfM">
                <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field>
                </block>
                </value>
                <value name="AT1">
                <block type="math_arithmetic" id="4txmllzNk]#vKJANc7;d">
                <field name="OP">ADD</field>
                <value name="A">
                <shadow type="math_number" id="54^~n$9g
                @l[;6rEw-K"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="?KDu$Gp)~yoqLkiXN$S">
                <field name="END">FIRST</field>
                <value name="VALUE">
                <block type="variables_get" id="q|H+K4s44t_d#Y%ZLpkB">
                <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field>
                </block>
                </value>
                <value name="FIND">
                <shadow type="text" id="F|yIVQ}c4kwj5vw/uXkY">
                <field name="TEXT"><rPower0></field>
                </shadow>
                </value>
                </block>
                </value>
                <value name="B">
                <shadow type="math_number" id="qwYC:kavmq@cWB?y~x2H">
                <field name="NUM">8</field>
                </shadow>
                </value>
                </block>
                </value>
                <value name="AT2">
                <block type="math_arithmetic" id="c!I}PaWFIHB,cR8f)-d3">
                <field name="OP">MINUS</field>
                <value name="A">
                <shadow type="math_number">
                <field name="NUM">1</field>
                </shadow>
                <block type="text_indexOf" id="+i|npidze:knFgT$8Bd3">
                <field name="END">FIRST</field>
                <value name="VALUE">
                <block type="variables_get" id="SLnsg3WZCv7|9gnEvrR7">
                <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field>
                </block>
                </value>
                <value name="FIND">
                <shadow type="text" id="v.j8n[AN(c;@qyUq33;"> <field name="TEXT">&lt;/Power0&gt;</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="@KmlfRx16a(f8yr1u/7u"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="control" id="(ux,Fev|P)}jouZ8|$">
                <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                <field name="OID">javascript.0.scriptEnabled.KMT.Relay1.1</field>
                <field name="WITH_DELAY">FALSE</field>
                <value name="VALUE">
                <block type="variables_get" id="T^ccf%mki$vmE6N2}f|j">
                <field name="VAR" id="2VA(QS]F/#5ZGKk,gT">Power0</field>
                </block>
                </value>
                <next>
                <block type="debug" id="ZE_f{?ok;.9=zgD]7dEO">
                <field name="Severity">log</field>
                <value name="TEXT">
                <shadow type="text" id="oSUhfTs0YQd%qv+oXbT7">
                <field name="TEXT">test</field>
                </shadow>
                <block type="text_join" id="A)5BhyH,w(afe!i%N.{:">
                <mutation items="2"></mutation>
                <value name="ADD0">
                <block type="text" id="2{50-+,_sHd?Q(KMx5?M">
                <field name="TEXT">Energiewert 1</field>
                </block>
                </value>
                <value name="ADD1">
                <block type="variables_get" id="D@PQ@)eAd7e-d?uqz,e"> <field name="VAR" id="2VA(QS]F/#5ZGKk,gT">Power0</field> </block> </value> </block> </value> <next> <block type="variables_set" id="{GuVju7k5]IC@d8?{w+-"> <field name="VAR" id="ACu~HP8DEBY7-OG*4Xt;">Power1</field> <value name="VALUE"> <block type="text_getSubstring" id="LsN%4GQO}i2_31gOQ@[)" 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="K6x!_7{RiA]-3+idm{bU"> <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field> </block> </value> <value name="AT1"> <block type="math_arithmetic" id="79GrcoRdEdS9^3V2P{fF"> <field name="OP">ADD</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="~7vQT+HM]hh:C(6m#-P0"> <field name="END">FIRST</field> <value name="VALUE"> <block type="variables_get" id="IzQrDS95Qw$rTV!W0Ujz"> <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field> </block> </value> <value name="FIND"> <shadow type="text" id="*+thXgM~}b,?tLSbU^[j"> <field name="TEXT">&lt;Power1&gt;</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="_ur7];GQXvmS,L|Uz2|#"> <field name="NUM">8</field> </shadow> </value> </block> </value> <value name="AT2"> <block type="math_arithmetic" id="2j7JvVm5?y%LOvlom;Kx"> <field name="OP">MINUS</field> <value name="A"> <shadow type="math_number"> <field name="NUM">1</field> </shadow> <block type="text_indexOf" id="FwY!snM^CfW9T4.E1#c">
                <field name="END">FIRST</field>
                <value name="VALUE">
                <block type="variables_get" id="_fv%2T53F
                -R@zOKn1b4">
                <field name="VAR" id="t:B-6Hbw^FC??r;8$YMF">Ergebnis</field>
                </block>
                </value>
                <value name="FIND">
                <shadow type="text" id="mlaO!_(n}iZy7IG^N%+"> <field name="TEXT">&lt;/Power1&gt;</field> </shadow> </value> </block> </value> <value name="B"> <shadow type="math_number" id="A{1cGuh];LS~rr^quYjD"> <field name="NUM">1</field> </shadow> </value> </block> </value> </block> </value> <next> <block type="control" id="I6?OgUaJ3qZDKKM)HBkv"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.scriptEnabled.KMT.Relay1.2</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="variables_get" id="])-+lL4D,M!I+gw3/h%">
                <field name="VAR" id="ACu~HP8DEBY7-OG*4Xt;">Power1</field>
                </block>
                </value>
                <next>
                <block type="debug" id="F@i@.U1T].`Z};-gP2YT">
                <field name="Severity">log</field>
                <value name="TEXT">
                <shadow type="text">
                <field name="TEXT">test</field>
                </shadow>
                <block type="text_join" id="%/uD#PIlGp|F9(2-j?c">
                <mutation items="2"></mutation>
                <value name="ADD0">
                <block type="text" id="NgCa1xKavvB;Zb0{Aw{=">
                <field name="TEXT">Energiewert 2</field>
                </block>
                </value>
                <value name="ADD1">
                <block type="variables_get" id="x]k7xe4PqEU;~){:Yk=h">
                <field name="VAR" id="ACu~HP8DEBY7-OG
                4Xt;">Power1</field>
                </block>
                </value>
                </block>
                </value>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </next>
                </block>
                </statement>
                </block>
                </statement>
                </block>
                </xml>

                M 1 Reply Last reply Reply Quote 0
                • M
                  MCU @fototec last edited by MCU

                  @fototec Skript bitte in Code (siehe oben /) einfügen. Danke.

                  a019ddc0-9730-4fdd-bcc0-081abdfbd85e-image.png

                  Und das in einen Spoiler setzen:

                  92de6a7f-86a5-45ab-a5f6-47ee1439cd4a-image.png

                  Kann es so nicht importieren: textToDom was unable to parse:

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

                  Support us

                  ioBroker
                  Community Adapters
                  Donate
                  FAQ Cloud / IOT
                  HowTo: Node.js-Update
                  HowTo: Backup/Restore
                  Downloads
                  BLOG

                  842
                  Online

                  31.9k
                  Users

                  80.2k
                  Topics

                  1.3m
                  Posts

                  iobroker
                  2
                  7
                  558
                  Loading More Posts
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes
                  Reply
                  • Reply as topic
                  Log in to reply
                  Community
                  Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                  The ioBroker Community 2014-2023
                  logo