<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hallo Frank,<br>
    <br>
    und wie komme ich jetzt an Live-Werte über den HTTP-Server? Danke.<br>
    <br>
    Gruß,<br>
    Stefan<br>
    <br>
    <div class="moz-cite-prefix">Am 01.01.2023 um 02:14 schrieb Frank
      Richter:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAD+U_OA_4+WAqOOX48+wBSL6DacTMq4r8ntQp5AW_gKfdYMK7w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">
        <div>Hallo Stefan, 
          <div dir="auto"><br>
          </div>
          <div dir="auto">die Live-Werte werden vom Push-Server via
            Websockets übertragen: <a
              href="https://wiki.volkszaehler.org/software/middleware/push-server"
              moz-do-not-send="true" class="moz-txt-link-freetext">https://wiki.volkszaehler.org/software/middleware/push-server</a></div>
          <div dir="auto"><br>
          </div>
          <div dir="auto">Viele Grüße</div>
          <div dir="auto">Frank </div>
          <br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">Stefan S. <<a
                href="mailto:shikvz@gmx.com" moz-do-not-send="true"
                class="moz-txt-link-freetext">shikvz@gmx.com</a>>
              schrieb am Sa., 31. Dez. 2022, 08:07:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div> Hallo,<br>
                <br>
                so wie es aussieht liefert der HTTP Server gar keine
                Realtime-Werte, sondern auch nur aggregierte Werte.<br>
                Diese beiden Requests liefern exakt das selbe.<br>
                <a
href="http://localhost/middleware.php/data.json?options=raw&from=now&uuid"
                  target="_blank" rel="noreferrer"
                  moz-do-not-send="true">http://localhost/middleware.php/data.json?options=raw&from=now&uuid</a>[]=1111-2222-3333<br>
                <a href="http://localhost:8081/1111-2222-3333"
                  target="_blank" rel="noreferrer"
                  moz-do-not-send="true" class="moz-txt-link-freetext">http://localhost:8081/1111-2222-3333</a><br>
                <br>
                Deshalb habe ich beim HTTP Server erst auch nichts
                gesehen, da nach Starten des vzloggers erst einmal die
                Aggregation Zeit gewartet wird.<br>
                <br>
                Wie komme ich denn an die Realtime-Werte? Sie müssen ja
                irgendwie in die Middleware kommen, da sich die Werte
                alle paar Sekunden im Browser aktualisieren.<br>
                <br>
                Gruß,<br>
                Stefan<br>
                <br>
                <br>
                <div>Am 29.12.2022 um 21:05 schrieb Stefan S.:<br>
                </div>
                <blockquote type="cite"> Hallo,<br>
                  <br>
                  ich würde gerne mit dem HTTP Server direkt den
                  Zählerstand abfragen.<br>
                  Das wäre bei mir <a
                    href="http://localhost:8081/1111-2222-3333"
                    target="_blank" rel="noreferrer"
                    moz-do-not-send="true" class="moz-txt-link-freetext">http://localhost:8081/1111-2222-3333</a>.<br>
                  Leider bekomme ich aber keine Tuples zurück und somit
                  auch keinen Zählerstand.<br>
                  Erst wenn ich die aggtime von 600 auf -1 stelle
                  funktioniert es.<br>
                  Geht das ganze auch mit aktiver Aggregation?<br>
                  <br>
                  <br>
                  Mein Config:<br>
                  <br>
                      // Build-in HTTP server<br>
                      "local": {<br>
                          "enabled": true,   // enable local HTTPd for
                  serving live readings<br>
                          "port": 8081,       // TCP port for local
                  HTTPd<br>
                          "index": true,      // provide index listing
                  of available channels if no UUID was requested<br>
                          "timeout": 10,      // timeout for long
                  polling comet requests in seconds (0 disables comet)<br>
                          "buffer": -1        // HTTPd buffer
                  configuration for serving readings, default -1<br>
                                              //   >0: number of
                  seconds of readings to serve<br>
                                              //   <0: number of
                  tuples to server per channel (e.g. -3 will serve 3
                  tuples)<br>
                      }<br>
                  <br>
                      // Meter configuration<br>
                      "meters": [<br>
                          {<br>
                          "enabled" : true,<br>
                          "allowskip": false,<br>
                          "aggtime": 300,<br>
                          "aggfixedinterval": false,<br>
                          "channels": [{<br>
                                  "uuid" : "1111-2222-3333",<br>
                                  "middleware" : <a
                    href="http://localhost/middleware.php"
                    target="_blank" rel="noreferrer"
                    moz-do-not-send="true">"http://localhost/middleware.php"</a>,<br>
                                  "identifier" : "1-0:1.8.0", 
                  //Zählerstände<br>
                                  "api": "volkszaehler",<br>
                                  "aggmode": "max"<br>
                                  }, {<br>
                                  "uuid" : "1111-2222-3334",<br>
                                  "middleware" : <a
                    href="http://localhost/middleware.php"
                    target="_blank" rel="noreferrer"
                    moz-do-not-send="true">"http://localhost/middleware.php"</a>,<br>
                                  "identifier" : "1-0:16.7.0", //
                  Leistungswerte<br>
                                  "api": "null",<br>
                                  "aggmode": "avg" <br>
                                  }],<br>
                          "protocol": "sml",<br>
                          "device": "/dev/ttyUSB0",<br>
                          "baudrate": 9600,<br>
                          "parity": "8n1",<br>
                          "use_local_time": true<br>
                          },<br>
                  <br>
                  Gruß,<br>
                  Stefan<br>
                  <br>
                </blockquote>
                <br>
              </div>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>