Skip to content
  • Home
  • Aktuell
  • Tags
  • 0 Ungelesen 0
  • Kategorien
  • Unreplied
  • Beliebt
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Standard: (Kein Skin)
  • Kein Skin
Einklappen
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Blockly
  5. Wie aus einem Array eine Tabelle und Balkengrafik machen?

NEWS

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

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

  • Weihnachtsangebot 2025! 🎄
    BluefoxB
    Bluefox
    25
    1
    2.4k

Wie aus einem Array eine Tabelle und Balkengrafik machen?

Geplant Angeheftet Gesperrt Verschoben Blockly
4 Beiträge 3 Kommentatoren 321 Aufrufe 2 Watching
  • Älteste zuerst
  • Neuste zuerst
  • Meiste Stimmen
Antworten
  • In einem neuen Thema antworten
Anmelden zum Antworten
Dieses Thema wurde gelöscht. Nur Nutzer mit entsprechenden Rechten können es sehen.
  • BertDerKleineB Offline
    BertDerKleineB Offline
    BertDerKleine
    schrieb am zuletzt editiert von
    #1

    Zwei Fragen noch:
    Beide beziehen sich auf ein aus dem Netz auslesbaren Datensatz, der ein JSON ausliefert:
    https://api.energy-charts.info/price?bzn=DE-LU
    Im Prinzip handelt es sich einfach um eine "Tabelle" mit zwei Spalten und 24 Zeilen, in der für jeweils eine Stunde ein Preis angegeben ist.

    1. In VIS Tabelle darstellen
      Was wäre der bequemste Weg, um die Daten visuell wirklich als Tabelle darzustellen, am besten von Links nach rechts die Zeiten mit 24 Spalten und zwei zeilen?

    2. In VIS Werte als Balkendiagram darstellen
      Was wäre des beste Weg, wenn ich es nicht als Text in einer Tabelle sehen will, sondern als Grafik mit 24 Balken?

    M 1 Antwort Letzte Antwort
    0
    • BertDerKleineB BertDerKleine

      Zwei Fragen noch:
      Beide beziehen sich auf ein aus dem Netz auslesbaren Datensatz, der ein JSON ausliefert:
      https://api.energy-charts.info/price?bzn=DE-LU
      Im Prinzip handelt es sich einfach um eine "Tabelle" mit zwei Spalten und 24 Zeilen, in der für jeweils eine Stunde ein Preis angegeben ist.

      1. In VIS Tabelle darstellen
        Was wäre der bequemste Weg, um die Daten visuell wirklich als Tabelle darzustellen, am besten von Links nach rechts die Zeiten mit 24 Spalten und zwei zeilen?

      2. In VIS Werte als Balkendiagram darstellen
        Was wäre des beste Weg, wenn ich es nicht als Text in einer Tabelle sehen will, sondern als Grafik mit 24 Balken?

      M Online
      M Online
      MCU
      schrieb am zuletzt editiert von MCU
      #2

      @bertderkleine Beispiel zu 1)
      History für den verwenten DP anlegen hier:
      cd39ad0b-4f56-43ce-9834-1322c47684fe-image.png

      34d2a701-86b4-4f50-a568-f5180d7c94e8-image.png
      BILD passt nicht zum xml! Im xml ist die history mit eingebaut!

      Muss man dann 1x am Tag laufen lassen. nachts um 02.15 Uhr?

      <block xmlns="https://developers.google.com/blockly/xml" type="http_get" id="WubA_q?t^rOVN1Qzf(Ud" x="113" y="-62">
        <field name="TIMEOUT">2000</field>
        <field name="UNIT">ms</field>
        <field name="TYPE">text</field>
        <value name="URL">
          <shadow type="text" id="4n@aW9Eu_!6v]UX7vbJm">
            <field name="TEXT">https://api.energy-charts.info/price?bzn=DE-LU</field>
          </shadow>
        </value>
        <statement name="STATEMENT">
          <block type="variables_set" id="q(GI;H3H-6Gil%ZUUD`l">
            <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
            <value name="VALUE">
              <block type="convert_json2object" id="/zI_a;?wL~s8b7-7=p^%">
                <value name="VALUE">
                  <block type="http_response" id="O8b*b@wX2,l!5gn1vi@8">
                    <field name="ATTR">response.data</field>
                  </block>
                </value>
              </block>
            </value>
            <next>
              <block type="variables_set" id="pP_KB8dY8EAJ6}SH|N!^">
                <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                <value name="VALUE">
                  <block type="convert_jsonata" id="9f:nExdLo|@_S*bTX%jU">
                    <value name="EXPRESSION">
                      <shadow type="text" id="T{/k0+_i)?BrRa+ctWj9">
                        <field name="TEXT">unix_seconds</field>
                      </shadow>
                    </value>
                    <value name="TARGET">
                      <block type="variables_get" id="`wjbX)ltT92Z|_L]jG?^">
                        <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
                      </block>
                    </value>
                  </block>
                </value>
                <next>
                  <block type="variables_set" id="#H~JJ{T%hi(L,{bVPy2m">
                    <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                    <value name="VALUE">
                      <block type="convert_jsonata" id="+%.|9$bdl_L,c;*u*Z]B">
                        <value name="EXPRESSION">
                          <shadow type="text" id="ahs)t9X?Lc2;)Lf%:9rC">
                            <field name="TEXT">price</field>
                          </shadow>
                        </value>
                        <value name="TARGET">
                          <block type="variables_get" id="p![zq{K(pdd4RjP-I_$r">
                            <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
                          </block>
                        </value>
                      </block>
                    </value>
                    <next>
                      <block type="variables_set" id="Ufji]:CBub6Yx.p`pN]f">
                        <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                        <value name="VALUE">
                          <block type="lists_create_with" id="sC8Q#FVhcGi4,I7=}+E+">
                            <mutation items="0"></mutation>
                          </block>
                        </value>
                        <next>
                          <block type="controls_forEach" id="n26vmw#_)b5{trnAGfc7">
                            <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                            <value name="LIST">
                              <block type="variables_get" id="sm~GA,g2oL+3!l9jYTl5">
                                <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                              </block>
                            </value>
                            <statement name="DO">
                              <block type="variables_set" id="5}~g_j@kMkiDr0]9HKsW">
                                <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                <value name="VALUE">
                                  <block type="object_new" id="ISQw{,1JAT4![hq_-M=m"></block>
                                </value>
                                <next>
                                  <block type="object_set_attr" id=";Gya@c}:d(ZAI`A%-jC+">
                                    <field name="ATTR">time</field>
                                    <value name="OBJECT">
                                      <block type="variables_get" id="9Mz7qy+`}dhOQzk7#[g#">
                                        <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                      </block>
                                    </value>
                                    <value name="VALUE">
                                      <shadow type="text" id=")(n@S]MtpbL2|Sinc,X7">
                                        <field name="TEXT">value</field>
                                      </shadow>
                                      <block type="convert_from_date" id="Rfw_YWIq_Gw_qVT!BMzK">
                                        <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                        <field name="OPTION">custom</field>
                                        <field name="FORMAT">JJJJ.MM.TT SS:mm</field>
                                        <value name="VALUE">
                                          <block type="math_arithmetic" id="gP9fa|N|L-pF(vr])T.)">
                                            <field name="OP">MULTIPLY</field>
                                            <value name="A">
                                              <shadow type="math_number" id="z-jQmlOX2PAXg4RGdxz%">
                                                <field name="NUM">1</field>
                                              </shadow>
                                              <block type="variables_get" id="DiGj~c~W_f0}BIMRilb}">
                                                <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                              </block>
                                            </value>
                                            <value name="B">
                                              <shadow type="math_number" id="K[q*QXm49MYKtM=^3Bc#">
                                                <field name="NUM">1000</field>
                                              </shadow>
                                            </value>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                    <next>
                                      <block type="variables_set" id="WoCf2a]I:C!mMl]5db$8">
                                        <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                        <value name="VALUE">
                                          <block type="lists_indexOf" id="mi8o*!].|#Mra~*L42pS">
                                            <field name="END">FIRST</field>
                                            <value name="VALUE">
                                              <block type="variables_get" id="TMcw]-Im7Qc`b]%S[TtL">
                                                <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                                              </block>
                                            </value>
                                            <value name="FIND">
                                              <block type="variables_get" id="7/mmHa?[x:#!1xS$g{fZ">
                                                <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                              </block>
                                            </value>
                                          </block>
                                        </value>
                                        <next>
                                          <block type="object_set_attr" id="GJ|V8v!Z:d)lU4YMK?+.">
                                            <field name="ATTR">price</field>
                                            <value name="OBJECT">
                                              <block type="variables_get" id="Y?qxVFM~FfK(%rJfZ8?4">
                                                <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                              </block>
                                            </value>
                                            <value name="VALUE">
                                              <shadow type="text" id=")(n@S]MtpbL2|Sinc,X7">
                                                <field name="TEXT">value</field>
                                              </shadow>
                                              <block type="lists_getIndex" id="_vy%IV*TmroOP-ingTl]">
                                                <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="Y$l|0JcFGeGyvVuRM/WA">
                                                    <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                                                  </block>
                                                </value>
                                                <value name="AT">
                                                  <block type="variables_get" id="wp^p=VsN6+N$7=sU3rw1">
                                                    <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                                  </block>
                                                </value>
                                              </block>
                                            </value>
                                            <next>
                                              <block type="debug" id="1fXlv.R`oXW1BIX)M;*." disabled-reasons="MANUALLY_DISABLED">
                                                <field name="Severity">info</field>
                                                <value name="TEXT">
                                                  <shadow type="text" id="#pSP=w|D(c$3Bc9eebs6">
                                                    <field name="TEXT">test</field>
                                                  </shadow>
                                                  <block type="variables_get" id="4SW_o82zc$9Q_[Vb+B%~">
                                                    <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                                  </block>
                                                </value>
                                                <next>
                                                  <block type="variables_set" id="a.c=E|.h$wUjC.J^}7Z$">
                                                    <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                    <value name="VALUE">
                                                      <block type="object_new" id="N;!Ww6QA@n%g?w^F^}-L"></block>
                                                    </value>
                                                    <next>
                                                      <block type="object_set_attr" id=",%tBt=kGnMNY|bp_!kh7">
                                                        <field name="ATTR">ts</field>
                                                        <value name="OBJECT">
                                                          <block type="variables_get" id="1DJ?Qi*+VLV^un;Eu={W">
                                                            <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                          </block>
                                                        </value>
                                                        <value name="VALUE">
                                                          <shadow type="text" id="XzylIx4bS8xB.XgY_Kt(">
                                                            <field name="TEXT">value</field>
                                                          </shadow>
                                                          <block type="math_arithmetic" id="8wgh#GuDMg1WU2bOTpoP">
                                                            <field name="OP">MULTIPLY</field>
                                                            <value name="A">
                                                              <shadow type="math_number" id="z-jQmlOX2PAXg4RGdxz%">
                                                                <field name="NUM">1</field>
                                                              </shadow>
                                                              <block type="variables_get" id="ojk6B+s6pV1T?#1X)0Os">
                                                                <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                                              </block>
                                                            </value>
                                                            <value name="B">
                                                              <shadow type="math_number" id="8ARPoQj#;4K44B)#)Bou">
                                                                <field name="NUM">1000</field>
                                                              </shadow>
                                                            </value>
                                                          </block>
                                                        </value>
                                                        <next>
                                                          <block type="object_set_attr" id=")U%21t7I9U*(c__RNT[=">
                                                            <field name="ATTR">val</field>
                                                            <value name="OBJECT">
                                                              <block type="variables_get" id="3X5P!lZ1|t8kLnwg,w4^">
                                                                <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                              </block>
                                                            </value>
                                                            <value name="VALUE">
                                                              <shadow type="text" id="XzylIx4bS8xB.XgY_Kt(">
                                                                <field name="TEXT">value</field>
                                                              </shadow>
                                                              <block type="lists_getIndex" id="S-Qly;Ry*Nc{Q2UX*?RZ">
                                                                <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="oj7h_e5hu)XV!1.oT=4d">
                                                                    <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                                                                  </block>
                                                                </value>
                                                                <value name="AT">
                                                                  <block type="variables_get" id="`^l(!S1VHNq1SK/bL=u$">
                                                                    <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                                                  </block>
                                                                </value>
                                                              </block>
                                                            </value>
                                                            <next>
                                                              <block type="sendto_custom" id="0FheG9#v?h8VK`A4gi8l">
                                                                <mutation xmlns="http://www.w3.org/1999/xhtml" items="id,state"></mutation>
                                                                <field name="INSTANCE">history.0</field>
                                                                <field name="COMMAND">storeState</field>
                                                                <field name="LOG"></field>
                                                                <field name="WITH_STATEMENT">FALSE</field>
                                                                <value name="ARG0">
                                                                  <shadow type="text" id="2S33q,Osc00],b?TvJ!_">
                                                                    <field name="TEXT">0_userdata.0.TEST.Liste</field>
                                                                  </shadow>
                                                                </value>
                                                                <value name="ARG1">
                                                                  <shadow type="text" id="m4yjk`fQkP^ktB27|_=f">
                                                                    <field name="TEXT"></field>
                                                                  </shadow>
                                                                  <block type="variables_get" id="4z2RRH(}DDHVe?citK`9">
                                                                    <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                                  </block>
                                                                </value>
                                                                <next>
                                                                  <block type="lists_setIndex" id="`DNvt75jK}w1q{:maX][">
                                                                    <mutation at="false"></mutation>
                                                                    <field name="MODE">INSERT</field>
                                                                    <field name="WHERE">LAST</field>
                                                                    <value name="LIST">
                                                                      <block type="variables_get" id="L0}f1xt(EQPGbUL,PQz=">
                                                                        <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                                                      </block>
                                                                    </value>
                                                                    <value name="TO">
                                                                      <block type="variables_get" id="fC%H$s`7M:IlEv`tip?7">
                                                                        <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                                                      </block>
                                                                    </value>
                                                                  </block>
                                                                </next>
                                                              </block>
                                                            </next>
                                                          </block>
                                                        </next>
                                                      </block>
                                                    </next>
                                                  </block>
                                                </next>
                                              </block>
                                            </next>
                                          </block>
                                        </next>
                                      </block>
                                    </next>
                                  </block>
                                </next>
                              </block>
                            </statement>
                            <next>
                              <block type="debug" id="K_qdH~gw%dG#qfG;5xJw" disabled-reasons="MANUALLY_DISABLED">
                                <field name="Severity">info</field>
                                <value name="TEXT">
                                  <shadow type="text" id="w8H|}@7vFQ3~Hef1#s+{">
                                    <field name="TEXT">test</field>
                                  </shadow>
                                  <block type="variables_get" id="u`_,D/K8E5enHcI3PWn$">
                                    <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                  </block>
                                </value>
                                <next>
                                  <block type="control" id="mc%$a]6G7qobV=)]SDR(" disabled-reasons="MANUALLY_DISABLED">
                                    <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                    <field name="OID">0_userdata.0.TEST.Liste</field>
                                    <field name="WITH_DELAY">FALSE</field>
                                    <value name="VALUE">
                                      <block type="convert_object2json" id="e4;%Ua.FJ-=H8@|[!9iV">
                                        <field name="PRETTIFY">FALSE</field>
                                        <value name="VALUE">
                                          <block type="variables_get" id="`!a!zwUKn4!huvf9i/I(">
                                            <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                          </block>
                                        </value>
                                      </block>
                                    </value>
                                  </block>
                                </next>
                              </block>
                            </next>
                          </block>
                        </next>
                      </block>
                    </next>
                  </block>
                </next>
              </block>
            </next>
          </block>
        </statement>
      </block>
      

      zu 2)
      evtl legt man auch ein Preset in echarts an und wählt bar als Kurvenform aus.
      14fbc3a2-52b0-4cc2-b7c2-ecc8ea0ac674-image.png

      echarts Widget (VIS 2)
      38377e5d-4c83-46fe-853b-da66070108ea-image.png
      Bar scheint dort nicht zu funktionieren?
      b93fc7e2-83e3-490e-8c9a-d891206398b7-image.png

      EDIT: Die Werte werden nicht um 00:00 aktualisiert? Auch um 01:00 keine neue Daten!
      Man muss die Zeit (start, end) mitgeben damit man die Werte erhält.

      NUC i7 64GB mit Proxmox ---- Jarvis Infos Aktualisierungen der Doku auf Instagram verfolgen -> mcuiobroker Instagram
      Wenn Euch mein Vorschlag geholfen hat, bitte rechts "^" klicken.

      paul53P 1 Antwort Letzte Antwort
      2
      • M MCU

        @bertderkleine Beispiel zu 1)
        History für den verwenten DP anlegen hier:
        cd39ad0b-4f56-43ce-9834-1322c47684fe-image.png

        34d2a701-86b4-4f50-a568-f5180d7c94e8-image.png
        BILD passt nicht zum xml! Im xml ist die history mit eingebaut!

        Muss man dann 1x am Tag laufen lassen. nachts um 02.15 Uhr?

        <block xmlns="https://developers.google.com/blockly/xml" type="http_get" id="WubA_q?t^rOVN1Qzf(Ud" x="113" y="-62">
          <field name="TIMEOUT">2000</field>
          <field name="UNIT">ms</field>
          <field name="TYPE">text</field>
          <value name="URL">
            <shadow type="text" id="4n@aW9Eu_!6v]UX7vbJm">
              <field name="TEXT">https://api.energy-charts.info/price?bzn=DE-LU</field>
            </shadow>
          </value>
          <statement name="STATEMENT">
            <block type="variables_set" id="q(GI;H3H-6Gil%ZUUD`l">
              <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
              <value name="VALUE">
                <block type="convert_json2object" id="/zI_a;?wL~s8b7-7=p^%">
                  <value name="VALUE">
                    <block type="http_response" id="O8b*b@wX2,l!5gn1vi@8">
                      <field name="ATTR">response.data</field>
                    </block>
                  </value>
                </block>
              </value>
              <next>
                <block type="variables_set" id="pP_KB8dY8EAJ6}SH|N!^">
                  <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                  <value name="VALUE">
                    <block type="convert_jsonata" id="9f:nExdLo|@_S*bTX%jU">
                      <value name="EXPRESSION">
                        <shadow type="text" id="T{/k0+_i)?BrRa+ctWj9">
                          <field name="TEXT">unix_seconds</field>
                        </shadow>
                      </value>
                      <value name="TARGET">
                        <block type="variables_get" id="`wjbX)ltT92Z|_L]jG?^">
                          <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
                        </block>
                      </value>
                    </block>
                  </value>
                  <next>
                    <block type="variables_set" id="#H~JJ{T%hi(L,{bVPy2m">
                      <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                      <value name="VALUE">
                        <block type="convert_jsonata" id="+%.|9$bdl_L,c;*u*Z]B">
                          <value name="EXPRESSION">
                            <shadow type="text" id="ahs)t9X?Lc2;)Lf%:9rC">
                              <field name="TEXT">price</field>
                            </shadow>
                          </value>
                          <value name="TARGET">
                            <block type="variables_get" id="p![zq{K(pdd4RjP-I_$r">
                              <field name="VAR" id="s{f!+[6b0uoiRp2^:zs2">dataObj</field>
                            </block>
                          </value>
                        </block>
                      </value>
                      <next>
                        <block type="variables_set" id="Ufji]:CBub6Yx.p`pN]f">
                          <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                          <value name="VALUE">
                            <block type="lists_create_with" id="sC8Q#FVhcGi4,I7=}+E+">
                              <mutation items="0"></mutation>
                            </block>
                          </value>
                          <next>
                            <block type="controls_forEach" id="n26vmw#_)b5{trnAGfc7">
                              <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                              <value name="LIST">
                                <block type="variables_get" id="sm~GA,g2oL+3!l9jYTl5">
                                  <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                                </block>
                              </value>
                              <statement name="DO">
                                <block type="variables_set" id="5}~g_j@kMkiDr0]9HKsW">
                                  <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                  <value name="VALUE">
                                    <block type="object_new" id="ISQw{,1JAT4![hq_-M=m"></block>
                                  </value>
                                  <next>
                                    <block type="object_set_attr" id=";Gya@c}:d(ZAI`A%-jC+">
                                      <field name="ATTR">time</field>
                                      <value name="OBJECT">
                                        <block type="variables_get" id="9Mz7qy+`}dhOQzk7#[g#">
                                          <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                        </block>
                                      </value>
                                      <value name="VALUE">
                                        <shadow type="text" id=")(n@S]MtpbL2|Sinc,X7">
                                          <field name="TEXT">value</field>
                                        </shadow>
                                        <block type="convert_from_date" id="Rfw_YWIq_Gw_qVT!BMzK">
                                          <mutation xmlns="http://www.w3.org/1999/xhtml" format="true" language="false"></mutation>
                                          <field name="OPTION">custom</field>
                                          <field name="FORMAT">JJJJ.MM.TT SS:mm</field>
                                          <value name="VALUE">
                                            <block type="math_arithmetic" id="gP9fa|N|L-pF(vr])T.)">
                                              <field name="OP">MULTIPLY</field>
                                              <value name="A">
                                                <shadow type="math_number" id="z-jQmlOX2PAXg4RGdxz%">
                                                  <field name="NUM">1</field>
                                                </shadow>
                                                <block type="variables_get" id="DiGj~c~W_f0}BIMRilb}">
                                                  <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                                </block>
                                              </value>
                                              <value name="B">
                                                <shadow type="math_number" id="K[q*QXm49MYKtM=^3Bc#">
                                                  <field name="NUM">1000</field>
                                                </shadow>
                                              </value>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                      <next>
                                        <block type="variables_set" id="WoCf2a]I:C!mMl]5db$8">
                                          <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                          <value name="VALUE">
                                            <block type="lists_indexOf" id="mi8o*!].|#Mra~*L42pS">
                                              <field name="END">FIRST</field>
                                              <value name="VALUE">
                                                <block type="variables_get" id="TMcw]-Im7Qc`b]%S[TtL">
                                                  <field name="VAR" id="hw`M0@4ZK75sNU-wQ2mf">hours</field>
                                                </block>
                                              </value>
                                              <value name="FIND">
                                                <block type="variables_get" id="7/mmHa?[x:#!1xS$g{fZ">
                                                  <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                                </block>
                                              </value>
                                            </block>
                                          </value>
                                          <next>
                                            <block type="object_set_attr" id="GJ|V8v!Z:d)lU4YMK?+.">
                                              <field name="ATTR">price</field>
                                              <value name="OBJECT">
                                                <block type="variables_get" id="Y?qxVFM~FfK(%rJfZ8?4">
                                                  <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                                </block>
                                              </value>
                                              <value name="VALUE">
                                                <shadow type="text" id=")(n@S]MtpbL2|Sinc,X7">
                                                  <field name="TEXT">value</field>
                                                </shadow>
                                                <block type="lists_getIndex" id="_vy%IV*TmroOP-ingTl]">
                                                  <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="Y$l|0JcFGeGyvVuRM/WA">
                                                      <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                                                    </block>
                                                  </value>
                                                  <value name="AT">
                                                    <block type="variables_get" id="wp^p=VsN6+N$7=sU3rw1">
                                                      <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                                    </block>
                                                  </value>
                                                </block>
                                              </value>
                                              <next>
                                                <block type="debug" id="1fXlv.R`oXW1BIX)M;*." disabled-reasons="MANUALLY_DISABLED">
                                                  <field name="Severity">info</field>
                                                  <value name="TEXT">
                                                    <shadow type="text" id="#pSP=w|D(c$3Bc9eebs6">
                                                      <field name="TEXT">test</field>
                                                    </shadow>
                                                    <block type="variables_get" id="4SW_o82zc$9Q_[Vb+B%~">
                                                      <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                                    </block>
                                                  </value>
                                                  <next>
                                                    <block type="variables_set" id="a.c=E|.h$wUjC.J^}7Z$">
                                                      <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                      <value name="VALUE">
                                                        <block type="object_new" id="N;!Ww6QA@n%g?w^F^}-L"></block>
                                                      </value>
                                                      <next>
                                                        <block type="object_set_attr" id=",%tBt=kGnMNY|bp_!kh7">
                                                          <field name="ATTR">ts</field>
                                                          <value name="OBJECT">
                                                            <block type="variables_get" id="1DJ?Qi*+VLV^un;Eu={W">
                                                              <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                            </block>
                                                          </value>
                                                          <value name="VALUE">
                                                            <shadow type="text" id="XzylIx4bS8xB.XgY_Kt(">
                                                              <field name="TEXT">value</field>
                                                            </shadow>
                                                            <block type="math_arithmetic" id="8wgh#GuDMg1WU2bOTpoP">
                                                              <field name="OP">MULTIPLY</field>
                                                              <value name="A">
                                                                <shadow type="math_number" id="z-jQmlOX2PAXg4RGdxz%">
                                                                  <field name="NUM">1</field>
                                                                </shadow>
                                                                <block type="variables_get" id="ojk6B+s6pV1T?#1X)0Os">
                                                                  <field name="VAR" id="=Qe9w_-NZI=gDuyX-(P5">i</field>
                                                                </block>
                                                              </value>
                                                              <value name="B">
                                                                <shadow type="math_number" id="8ARPoQj#;4K44B)#)Bou">
                                                                  <field name="NUM">1000</field>
                                                                </shadow>
                                                              </value>
                                                            </block>
                                                          </value>
                                                          <next>
                                                            <block type="object_set_attr" id=")U%21t7I9U*(c__RNT[=">
                                                              <field name="ATTR">val</field>
                                                              <value name="OBJECT">
                                                                <block type="variables_get" id="3X5P!lZ1|t8kLnwg,w4^">
                                                                  <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                                </block>
                                                              </value>
                                                              <value name="VALUE">
                                                                <shadow type="text" id="XzylIx4bS8xB.XgY_Kt(">
                                                                  <field name="TEXT">value</field>
                                                                </shadow>
                                                                <block type="lists_getIndex" id="S-Qly;Ry*Nc{Q2UX*?RZ">
                                                                  <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="oj7h_e5hu)XV!1.oT=4d">
                                                                      <field name="VAR" id="}FsWP+@#u}VQ4b8/)[:2">prices</field>
                                                                    </block>
                                                                  </value>
                                                                  <value name="AT">
                                                                    <block type="variables_get" id="`^l(!S1VHNq1SK/bL=u$">
                                                                      <field name="VAR" id="7yD2B-Fh1eiNM4@%(o#L">index</field>
                                                                    </block>
                                                                  </value>
                                                                </block>
                                                              </value>
                                                              <next>
                                                                <block type="sendto_custom" id="0FheG9#v?h8VK`A4gi8l">
                                                                  <mutation xmlns="http://www.w3.org/1999/xhtml" items="id,state"></mutation>
                                                                  <field name="INSTANCE">history.0</field>
                                                                  <field name="COMMAND">storeState</field>
                                                                  <field name="LOG"></field>
                                                                  <field name="WITH_STATEMENT">FALSE</field>
                                                                  <value name="ARG0">
                                                                    <shadow type="text" id="2S33q,Osc00],b?TvJ!_">
                                                                      <field name="TEXT">0_userdata.0.TEST.Liste</field>
                                                                    </shadow>
                                                                  </value>
                                                                  <value name="ARG1">
                                                                    <shadow type="text" id="m4yjk`fQkP^ktB27|_=f">
                                                                      <field name="TEXT"></field>
                                                                    </shadow>
                                                                    <block type="variables_get" id="4z2RRH(}DDHVe?citK`9">
                                                                      <field name="VAR" id="jfV6^g`UsKLujK;PHL/W">stateObj</field>
                                                                    </block>
                                                                  </value>
                                                                  <next>
                                                                    <block type="lists_setIndex" id="`DNvt75jK}w1q{:maX][">
                                                                      <mutation at="false"></mutation>
                                                                      <field name="MODE">INSERT</field>
                                                                      <field name="WHERE">LAST</field>
                                                                      <value name="LIST">
                                                                        <block type="variables_get" id="L0}f1xt(EQPGbUL,PQz=">
                                                                          <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                                                        </block>
                                                                      </value>
                                                                      <value name="TO">
                                                                        <block type="variables_get" id="fC%H$s`7M:IlEv`tip?7">
                                                                          <field name="VAR" id="p7{GR]:*s^iRm(nY{IvA">jsonObj</field>
                                                                        </block>
                                                                      </value>
                                                                    </block>
                                                                  </next>
                                                                </block>
                                                              </next>
                                                            </block>
                                                          </next>
                                                        </block>
                                                      </next>
                                                    </block>
                                                  </next>
                                                </block>
                                              </next>
                                            </block>
                                          </next>
                                        </block>
                                      </next>
                                    </block>
                                  </next>
                                </block>
                              </statement>
                              <next>
                                <block type="debug" id="K_qdH~gw%dG#qfG;5xJw" disabled-reasons="MANUALLY_DISABLED">
                                  <field name="Severity">info</field>
                                  <value name="TEXT">
                                    <shadow type="text" id="w8H|}@7vFQ3~Hef1#s+{">
                                      <field name="TEXT">test</field>
                                    </shadow>
                                    <block type="variables_get" id="u`_,D/K8E5enHcI3PWn$">
                                      <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                    </block>
                                  </value>
                                  <next>
                                    <block type="control" id="mc%$a]6G7qobV=)]SDR(" disabled-reasons="MANUALLY_DISABLED">
                                      <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation>
                                      <field name="OID">0_userdata.0.TEST.Liste</field>
                                      <field name="WITH_DELAY">FALSE</field>
                                      <value name="VALUE">
                                        <block type="convert_object2json" id="e4;%Ua.FJ-=H8@|[!9iV">
                                          <field name="PRETTIFY">FALSE</field>
                                          <value name="VALUE">
                                            <block type="variables_get" id="`!a!zwUKn4!huvf9i/I(">
                                              <field name="VAR" id="-~EO+XWJ9wY?!@R]0*O0">jsonArr</field>
                                            </block>
                                          </value>
                                        </block>
                                      </value>
                                    </block>
                                  </next>
                                </block>
                              </next>
                            </block>
                          </next>
                        </block>
                      </next>
                    </block>
                  </next>
                </block>
              </next>
            </block>
          </statement>
        </block>
        

        zu 2)
        evtl legt man auch ein Preset in echarts an und wählt bar als Kurvenform aus.
        14fbc3a2-52b0-4cc2-b7c2-ecc8ea0ac674-image.png

        echarts Widget (VIS 2)
        38377e5d-4c83-46fe-853b-da66070108ea-image.png
        Bar scheint dort nicht zu funktionieren?
        b93fc7e2-83e3-490e-8c9a-d891206398b7-image.png

        EDIT: Die Werte werden nicht um 00:00 aktualisiert? Auch um 01:00 keine neue Daten!
        Man muss die Zeit (start, end) mitgeben damit man die Werte erhält.

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

        @mcu sagte: history mit eingebaut!

        Man kann an History auch ein Array of states übergeben; etwa so:

        Blockly_temp.JPG

        Anmerkung: Wenn man die Elemente aus korrespondieren Listen auswertet, ist die for-Schleife besser geeignet.

        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

        BertDerKleineB 1 Antwort Letzte Antwort
        3
        • paul53P paul53

          @mcu sagte: history mit eingebaut!

          Man kann an History auch ein Array of states übergeben; etwa so:

          Blockly_temp.JPG

          Anmerkung: Wenn man die Elemente aus korrespondieren Listen auswertet, ist die for-Schleife besser geeignet.

          BertDerKleineB Offline
          BertDerKleineB Offline
          BertDerKleine
          schrieb am zuletzt editiert von
          #4

          @paul53
          @MCU
          Danke!, Muss ich mir anschauen und mal durchdenken.

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


          Support us

          ioBroker
          Community Adapters
          Donate

          702

          Online

          32.6k

          Benutzer

          82.3k

          Themen

          1.3m

          Beiträge
          Community
          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
          ioBroker Community 2014-2025
          logo
          • Anmelden

          • Du hast noch kein Konto? Registrieren

          • Anmelden oder registrieren, um zu suchen
          • Erster Beitrag
            Letzter Beitrag
          0
          • Home
          • Aktuell
          • Tags
          • Ungelesen 0
          • Kategorien
          • Unreplied
          • Beliebt
          • GitHub
          • Docu
          • Hilfe