<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 70.85pt 56.7pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Danke Frank, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></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.<o:p></o:p></span></p><p class=MsoNormal><span lang=DE style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=DE style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Viele Grüsse,<o:p></o:p></span></p><p class=MsoNormal><span lang=DE style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Alex<o:p></o:p></span></p><p class=MsoNormal><span lang=DE style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></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:volkszaehler-users-bounces@demo.volkszaehler.org] <b>On Behalf Of </b>Frank Richter<br><b>Sent:</b> Thursday, January 23, 2020 12:01 AM<br><b>To:</b> volkszaehler.org - users<br><b>Subject:</b> Re: [vz-users] Merkwürdiger Effekt bei Gesamtverbrauch (S0-Zähler)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Hallo Alex,<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></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.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Grüße<o:p></o:p></p></div><div><p class=MsoNormal>Frank<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><<a href="mailto:rgb@nord-com.net">rgb@nord-com.net</a>> schrieb am Mi., 22. Jan. 2020, 23:38:<o:p></o:p></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 style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE>Guten Tag zusammen,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New";color:blue'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><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><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE>Alex aus Bremerhaven</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=DE> </span><o:p></o:p></p></div></div></blockquote></div></div></div></body></html>