<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hallo</p>
    <p>darf ich nochmal fragen, was  ich gegen die Fehlermeldung tun
      kann? <br>
    </p>
    <p>Danke und Gruß</p>
    <p>Tilman<br>
    </p>
    <div class="moz-cite-prefix">On 30.11.21 09:35, Tilman Glötzner
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:d003142f-e10a-1205-1441-dccd0f6fff74@gloetzner.net">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Moin</p>
      <p>nachdem das Root-Filesystem gestern doch noch komplett voll
        gelaufen war, habe dbgXXXXXX ich das aggregate-php-Script und
        dessen Kinder abbrechen müssen, die dbgXXXXXX-Files aus /tmp
        gelöscht, und die Daten in der Tabelle agreggate gelöscht. Die
        dbgXXXXXX-Files enthalten jeweils ein php-Script. Weisst Du was 
        deren Funktion ist? dbg dürfte für debug stehen...<br>
      </p>
      <p><a
          href="http://IP-ADRESSE/middleware.php/capabilities/database.json"
          moz-do-not-send="true">http://IP-ADRESSE/middleware.php/capabilities/database.json</a> 
        lieferte mir eine Fehlermeldung:</p>
      <table class="treeTable" role="tree" tabindex="0" aria-label=""
        aria-activedescendant="/version" cellspacing="0" cellpadding="0">
        <tbody role="presentation" tabindex="-1">
          <tr id="/version" role="treeitem" aria-level="1"
            aria-selected="true" class="treeRow stringRow opened
            selected">
            <td class="treeLabelCell" style="--tree-label-cell-indent:
              0px;" role="presentation"><span class="treeLabel
                stringLabel" aria-labelledby="default" data-level="0">version</span></td>
            <td class="treeValueCell stringCell" role="presentation"><span
                aria-labelledby="value"><span class="objectBox
                  objectBox-string">"0.3"</span></span></td>
          </tr>
          <tr id="/exception" role="treeitem" aria-level="1"
            aria-selected="false" aria-expanded="true" class="treeRow
            objectRow hasChildren opened">
            <td class="treeLabelCell" style="--tree-label-cell-indent:
              0px;" role="presentation"><span class="treeIcon
                theme-twisty open" role="presentation"></span><span
                class="treeLabel objectLabel" aria-labelledby="default"
                data-level="0">exception</span></td>
            <td class="treeValueCell objectCell" role="presentation"><span
                aria-labelledby="value"></span><br>
            </td>
          </tr>
          <tr id="/exception/message" role="treeitem" aria-level="2"
            aria-selected="false" class="treeRow stringRow hasChildren
            opened">
            <td class="treeLabelCell" style="--tree-label-cell-indent:
              16px;" role="presentation"><span class="treeIcon
                theme-twisty open" role="presentation"></span><span
                class="treeLabel stringLabel" aria-labelledby="default"
                data-level="1">message</span></td>
            <td class="treeValueCell stringCell" role="presentation"><span
                aria-labelledby="value"><span class="objectBox
                  objectBox-string">"An exception occurred while
                  executing 'EXPLAIN SELECT COUNT(id) FROM data USE
                  INDEX (PRIMARY)':\n\nSQLSTATE[42S22]: Column not
                  found: 1054 Unknown column 'id' in 'field list'"</span></span></td>
          </tr>
          <tr id="/exception/type" role="treeitem" aria-level="2"
            aria-selected="false" class="treeRow stringRow opened">
            <td class="treeLabelCell" style="--tree-label-cell-indent:
              16px;" role="presentation"><span class="treeIcon open"
                role="presentation"></span><span class="treeLabel
                stringLabel" aria-labelledby="default" data-level="1">type</span></td>
            <td class="treeValueCell stringCell" role="presentation"><span
                aria-labelledby="value"><span class="objectBox
                  objectBox-string">"InvalidFieldNameException"</span></span></td>
          </tr>
          <tr id="/exception/code" role="treeitem" aria-level="2"
            aria-selected="false" class="treeRow numberRow opened">
            <td class="treeLabelCell" style="--tree-label-cell-indent:
              16px;" role="presentation"><span class="treeIcon open"
                role="presentation"></span><span class="treeLabel
                numberLabel" aria-labelledby="default" data-level="1">code</span></td>
            <td class="treeValueCell numberCell" role="presentation"><span
                aria-labelledby="value"><span class="objectBox
                  objectBox-number">0</span></span></td>
          </tr>
        </tbody>
      </table>
      <p>entities ist die einzige Tabelle mit einer Spalte "id". In der
        Tabelle data gibt es eine Spalte "channel_id"...   <br>
      </p>
      <p>Gruß</p>
      <p>Tilman<br>
      </p>
      <div class="moz-cite-prefix">On 30.11.21 08:35, Frank Richter
        wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CAD+U_OCeuUjcTrhC7m+swC=ay9p4KP5Qt2rcOzako2XbH2zuzw@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div dir="auto">Moin,
          <div dir="auto"><br>
          </div>
          <div dir="auto">hast du verifiziert dass aktuell keine
            Aggregation läuft? Was liefert </div>
          <div dir="auto"><a
              href="http://IP-ADRESSE/middleware.php/capabilities/database.json"
              moz-do-not-send="true">http://IP-ADRESSE/middleware.php/capabilities/database.json</a>
            ?</div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Grüße</div>
          <div dir="auto">Frank</div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">Tilman Glötzner <<a
              href="mailto:tilman_1@gloetzner.net"
              moz-do-not-send="true">tilman_1@gloetzner.net</a>>
            schrieb am Di., 30. Nov. 2021, 01:28:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <p>Hi<br>
              </p>
              <p>Falls mir der Speicherplatz dabei  ausgehen sollte, 
                müsste ich zurückrollen, die Datenbank auf einen
                großeren Datenträger kopieren und nochmal aggregieren.
                Da es Hilfstabellen sind und die Rohdaten in data
                erhalten bleiben, sollte das funktionieren. Was muss ich
                neben der Tabelle aggreate noch dazu löschen?</p>
              <p>Danke und Gruß</p>
              <p>Tilman<br>
              </p>
              <div>On 29.11.21 23:23, Frank Richter wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="auto"><span style="font-size:12.8px">"aggmode":
                    "none" aggregiert nichts, bei Leistung wäre "avg"
                    sinnvoll.</span>
                  <div dir="auto" style="font-size:12.8px"><br>
                  </div>
                  <div dir="auto" style="font-size:12.8px">Damit die
                    Middleware-Aggregation läuft, brauchst du
                    entsprechende Cronjobs. Schau mal nach ob die bei
                    dir existieren. Siehe auch im Wiki: <a
                      href="https://wiki.volkszaehler.org/howto/datenmengen"
                      target="_blank" rel="noreferrer"
                      moz-do-not-send="true">https://wiki.volkszaehler.org/howto/datenmengen</a></div>
                  <div dir="auto" style="font-size:12.8px"><br>
                  </div>
                  <div dir="auto" style="font-size:12.8px">Grüße</div>
                  <div dir="auto" style="font-size:12.8px">Frank</div>
                </div>
                <br>
                <div class="gmail_quote">
                  <div dir="ltr" class="gmail_attr">Tilman Glötzner <<a
                      href="mailto:tilman_1@gloetzner.net"
                      target="_blank" rel="noreferrer"
                      moz-do-not-send="true">tilman_1@gloetzner.net</a>>
                    schrieb am Mo., 29. Nov. 2021, 20:11:<br>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0 0 0
                    .8ex;border-left:1px #ccc solid;padding-left:1ex">
                    <div>
                      <p>Hi <br>
                      </p>
                      <p>>Hast du die aggregation der Middleware
                        aktiviert? <br>
                      </p>
                      <p>Meinst Du "aggmode"? Den habe ich je nach
                        Zählertype auf "sum" (S0) bzw "max" (SmartMeter
                        mit IR-Schnittstelle) bzw. auf "none"
                        (Leistungmessung des SmartMeters) gesetzt.</p>
                      <p>Und ich logge minütlich -- was relativ kurz ist
                        und ordentlich Daten erzeugt.  Hilft mir aber
                        beim Plausibiliseren des Verhaltens des
                        Wechselrichters. Und als netter Nebeneffekt kann
                        man an Hand der Patterns mit etwas Übung den
                        jeweiligen Verbraucher  identifizieren :-)</p>
                      <p>Der RPI ist übrigens einer RPI B+ mit 512 MB.<br>
                      </p>
                      <p>Grüße</p>
                      Tilman
                      <div>On 29.11.21 18:25, Frank Richter wrote:<br>
                      </div>
                      <blockquote type="cite">
                        <div dir="ltr">Hi,
                          <div><br>
                          </div>
                          <div>wär schon deutlich einfacher das per API
                            zu machen. Hast du die aggregation der
                            Middleware aktiviert? In welchem Intervall
                            loggst du deine Daten?</div>
                          <div><br>
                          </div>
                          <div>Grüße</div>
                          <div>Frank</div>
                        </div>
                        <br>
                        <div class="gmail_quote">
                          <div dir="ltr" class="gmail_attr">Am Mo., 29.
                            Nov. 2021 um 17:09 Uhr schrieb Tilman
                            Glötzner <<a
                              href="mailto:tilman_1@gloetzner.net"
                              rel="noreferrer noreferrer"
                              target="_blank" moz-do-not-send="true">tilman_1@gloetzner.net</a>>:<br>
                          </div>
                          <blockquote class="gmail_quote"
                            style="margin:0px 0px 0px
                            0.8ex;border-left:1px solid
                            rgb(204,204,204);padding-left:1ex">Hallo<br>
                            <br>
                            <br>
                            ich würde gerne die über einen Tag
                            akkumulierten Energie-Verbrauche auf <br>
                            den verschiedenen Zähler, die ich betreibe,
                            auslesen und in ein File <br>
                            exportieren (um sie mit dem Energiemessung
                            der Solaranlage vergleichen <br>
                            zu können). Am liebsten wäre mir ein
                            csv-File. Dazu hat vzlogger auch <br>
                            eine Schnittstelle (<a
                              href="http://logger.fritz.box/api/data.csv"
                              rel="noreferrer noreferrer noreferrer"
                              target="_blank" moz-do-not-send="true">http://logger.fritz.box/api/data.csv</a>),
                            die <br>
                            allerdings eine Fehlermeldung "Maximum
                            execution time exceeded" zurück <br>
                            gibt -- wahrscheinlich, weil die Datenbank
                            mittlerweile zu gross ist <br>
                            oder der RPI zu schwachbrüstig.<br>
                            <br>
                            Als Workaround habe ich die die Datenbank
                            auf einen anderen, hoffentlich <br>
                            schnelleren Rechner kopiert und möchte nun
                            die Daten tageweise direkt <br>
                            aus der kopierten  Datenbank holen und zur
                            Not mit einem Skript <br>
                            nachprozessieren.<br>
                            <br>
                            a) Ich schätze mal, dass ich über die UUID
                            im Config-File mittels der <br>
                            Spalte "id" in der Tabelle "entities" die
                            Daten eines Sensors aus der <br>
                            Tabelle "data" auswählen kann, d.h. select
                            *  from data where channel_id <br>
                            = <<a href="http://entities.id"
                              rel="noreferrer noreferrer noreferrer"
                              target="_blank" moz-do-not-send="true">entities.id</a>>.
                            Stimmt das so?<br>
                            <br>
                            b) In welcher Einheit liegen timestamp und
                            value der Tabelle "data" vor <br>
                            ? In Watt für Zähler mit Impulsausgang und
                            in absoluten Wh für <br>
                            SmartZähler ?<br>
                            <br>
                            c) Ist es in sql möglich, den Timestamp aus
                            der aktuellen Zeit zu <br>
                            ermitteln=?<br>
                            d) Und wie hole ich die Wh aus der
                            Datenbank? So ?<br>
                            <br>
                              select sum(value)  from data where
                            channel_id = <<a
                              href="http://entities.id" rel="noreferrer
                              noreferrer noreferrer" target="_blank"
                              moz-do-not-send="true">entities.id</a>>
                            and <br>
                            timestamp between  <timestamp1> and
                            <timestamp2> order by timestamp;<br>
                            <br>
                            Oder brauche ich dafür ein Script und muss
                            die Fläche, die zwischen 2 <br>
                            benachbarten Werten aus "data" aufgespannt
                            wird, berechnen?<br>
                            <br>
                            <br>
                            Danke und Gruß<br>
                            <br>
                            Tilman<br>
                            <br>
                          </blockquote>
                        </div>
                      </blockquote>
                    </div>
                  </blockquote>
                </div>
              </blockquote>
            </div>
          </blockquote>
        </div>
      </blockquote>
    </blockquote>
  </body>
</html>