<div dir="auto">Hallo Alex,<div dir="auto"><br></div><div dir="auto">ein Tag ist zu verschmerzen, aber eine Anpassung des Initialwerts um die fehlenden 5,75kWh hätte es auch getan ;-)</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"> <<a href="mailto:rgb@nord-com.net" target="_blank" rel="noreferrer">rgb@nord-com.net</a>> schrieb am Do., 23. Jan. 2020, 00:31:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Danke Frank, <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Das war’s. Ich hatte alles was vor 0.00 Uhr war gelöscht, hätte ein paar Minuten zugeben sollen. Jetzt habe ich einen weiteren Tag „geopfert“, aber die Werte stimmen jetzt überein.<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Viele Grüsse,<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Alex<u></u><u></u></span></p><p class="MsoNormal"><span lang="DE" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> volkszaehler-users [mailto:<a href="mailto:volkszaehler-users-bounces@demo.volkszaehler.org" rel="noreferrer noreferrer" target="_blank">volkszaehler-users-bounces@demo.volkszaehler.org</a>] <b>On Behalf Of </b>Frank Richter<br><b>Sent:</b> Thursday, January 23, 2020 12:01 AM<br><b>To:</b> <a href="http://volkszaehler.org" rel="noreferrer noreferrer" target="_blank">volkszaehler.org</a> - users<br><b>Subject:</b> Re: [vz-users] Merkwürdiger Effekt bei Gesamtverbrauch (S0-Zähler)<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hallo Alex,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">das Frontend rechnet ab dem ersten Tageswechsel, der Verbrauch vom ersten (unvollständigen) Tag fällt also unter den Tisch.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Grüße<u></u><u></u></p></div><div><p class="MsoNormal">Frank<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"><<a href="mailto:rgb@nord-com.net" rel="noreferrer noreferrer" target="_blank">rgb@nord-com.net</a>> schrieb am Mi., 22. Jan. 2020, 23:38:<u></u><u></u></p></div><blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal"><span lang="DE">Guten Tag zusammen,</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Ich bin auf einen für mich nicht nachvollziehbaren Effekt bzgl. des Gesamtverbrauchs meines per S0 angebundenen Gaszählers gestoßen.</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Ich habe alte Daten vor dem 1.12.19 aus der Datenbank (volkszaehler.data) gelöscht, da die Werte vor diesem Zeitpunkt nicht zuverlässig und komplett waren. Die Aggregate-Tabelle habe ich für diesen Kanal neu aufgebaut.</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Damit musste ich natürlich einen anderen Wert für die initialconsumption eintragen. Ich habe mich da etwas gespielt, bis ich den exakten Wert hatte und…</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">SET</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">@<b>CHANNEL</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:purple">10</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">;</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><span style="font-size:10.0pt;font-family:"Courier New";color:blue"> </span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">SELECT</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">channel_id</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">AS</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">Kanal</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">,(<b>SELECT</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">VALUE</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">FROM</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`volkszaehler`</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">.</span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`properties`</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">WHERE</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black">  </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`entity_id`</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">@<b>CHANNEL</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">AND</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`pkey`</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:green">'title'</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">)</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">AS</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">Name</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">,</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:navy">ROUND</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">(</span><b><span style="font-size:10.0pt;font-family:"Courier New";color:navy">sum</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">(<b>VALUE</b>/</span><span style="font-size:10.0pt;font-family:"Courier New";color:purple">100</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">)+(<b>SELECT</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">VALUE</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">FROM</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`volkszaehler`</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">.</span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`properties`</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">WHERE</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black">  </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`entity_id`</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">@<b>CHANNEL</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">AND</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`pkey`</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:green">'initialconsumption'</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">),</span><span style="font-size:10.0pt;font-family:"Courier New";color:purple">2</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">)</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">AS</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">Zählerstand</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">FROM</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`volkszaehler`</span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">.</span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`data`</span><u></u><u></u></p><p class="MsoNormal" style="text-autospace:none"><b><span style="font-size:10.0pt;font-family:"Courier New";color:blue">WHERE</span></b><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:olive">`channel_id`</span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">=</span><span style="font-size:10.0pt;font-family:"Courier New";color:black">  </span><span style="font-size:10.0pt;font-family:"Courier New";color:blue">@<b>CHANNEL</b></span><span style="font-size:10.0pt;font-family:"Courier New";color:black"> </span><u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p><p class="MsoNormal"><span lang="DE">…bis diese Abfrage gepasst hat. Wenn ich anstelle der Data-Tabelle die minütlichen oder stündlichen Zahlen aus der Aggregate-Tabelle nehme, bekomme ich dasselbe Ergebnis der aktuelle Zählerstand ist 7028.75 (m³) – was exakt korrekt ist.</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Das Frontend zeigt aber unbeirrbar 7023 m³. Habe ich hier irgendetwas nicht bedacht? Reboot des Raspi, Neustart des Browsers etc haben mich nicht weitergebracht.</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Danke für jeden Input – die Code der Middleware übersteigt leider meine Fähigkeiten… ich weiss leider nicht wie der Gesamtverbrauch errechnet wird und wo die Diskrepanz her kommt.</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE">Alex aus Bremerhaven</span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p><p class="MsoNormal"><span lang="DE"> </span><u></u><u></u></p></div></div></blockquote></div></div></div></div></blockquote></div>