<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">eine weitere Möglichkeit ist, das der ESP das macht<br><br><div dir="ltr">Thomas <div><br></div><div><br></div></div><div dir="ltr"><blockquote type="cite">Am 08.04.2021 um 10:21 schrieb Andreas Goetz <cpuidle@gmail.com>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">Das passiert tatsächlich nicht in der Middleware sondern nur im UI:<div class=""><br class=""></div><div class=""><div style="color: rgb(248, 248, 242); background-color: rgb(39, 40, 34); font-family: "Fira Code", Menlo, Monaco, "Courier New", monospace; font-size: 15px; line-height: 23px; white-space: pre;" class=""><div class=""> <span style="color: #fd971f;" class="">this</span>.totalconsumption <span style="color: #f92672;" class="">=</span> (<span style="color: #fd971f;" class="">this</span>.definition.scale <span style="color: #f92672;" class="">||</span> <span style="color: #ae81ff;" class="">1</span>) <span style="color: #f92672;" class="">*</span> <span style="color: #fd971f;" class="">this</span>.initialconsumption <span style="color: #f92672;" class="">+</span> <span style="color: #fd971f;font-style: italic;" class="">json</span>.data.consumption;</div><div class=""></div></div><div><br class=""></div><div>Du musst die Addition also selber machen. Den Wert dafür erhältst Du über:</div><div><br class=""></div><div><a href="https://demo.volkszaehler.org/middleware.php/entity/1a233660-2e6c-11eb-920c-47caa07ee809.json" class="">https://demo.volkszaehler.org/middleware.php/entity/1a233660-2e6c-11eb-920c-47caa07ee809.json</a></div><div><br class=""></div><div>Viele Grüße, Andreas</div><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On 8. Apr 2021, at 10:03, <a href="mailto:Heine.Thomas@online.de" class="">Heine.Thomas@online.de</a> wrote:</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div class="">
Hallo Andreas,<br class="">
<br class="">
das ist vom ersten Wert bis jetzt, oder?<br class="">
Das gibt ne lange Liste (siehe Anhang)<br class="">
<br class="">
Da steht dann bei consumption 1490 drin. <br class="">
Ist ja auch der Verbraúch seit der Aufzeichnung.<br class="">
<br class="">
Wird da aber nirgends der Initailverbrauch drauf gerechnet oder
angezeigt, oder? <br class="">
So dass ich es nicht selbst machen muss und an mehreren Stellen dran
denken muss?<br class="">
<br class="">
Oder kann ich den Eintrag des Initialverbrauchs auch irgendwie
abfragen?<br class="">
<br class="">
Danke<br class="">
<br class="">
Gruß<br class="">
Thomas<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Am 08.04.2021 um 09:55 schrieb Andreas
Goetz:<br class="">
</div>
<blockquote type="cite" cite="mid:9A768F9B-83AE-45F5-BA46-46B6374504DD@gmail.com" class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
Entschuldige, Deine Timestamps scheinen zu passen in ms. Bei Post
kannst Du die aber weglassen- die Middleware wird sie selbst
erzeugen.
<div class=""><br class="">
</div>
<div class="">Bzgl. Abfrage probier mal bitte ?from=1&to=now</div>
<div class=""><br class="">
</div>
<div class="">Viele Grüße, </div>
<div class="">Andreas</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 8. Apr 2021, at 09:42, <a href="mailto:Heine.Thomas@online.de" class="" moz-do-not-send="true">Heine.Thomas@online.de</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
<div class=""> Hallo Andreas,<br class="">
<br class="">
ich steh grade auf dem Schlauch. An welcher Stelle seht
ihr denn falsche Zeitstempel?<br class="">
Welcher Konverter? Das ESP?<br class="">
<br class="">
Das ESP sendet die Daten an Node-Red. Dort setze ich mir
den Post-Befehl selbst zusammen. <br class="">
Ich nehme den Counter-stand und setze die UUID und einen
aktuellen Zeitstempel mit dran.<br class="">
<span id="cid:part1.84A825EF.F0AD9121@online.de" class=""><bhjgbnpbhbfpehmc.png></span><br class="">
<br class="">
ich poste es wie folgt:<br class="">
<span class="red-ui-debug-msg-payload"><span class=" red-ui-debug-msg-element
built
red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
"><a class="moz-txt-link-freetext" href="http://192.168.178.51/middleware.php/data/" moz-do-not-send="true">http://192.168.178.51/middleware.php/data/</a></span></span></span></span></span></span>xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx<span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
">.json?ts=</span></span></span></span></span></span><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
"><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-type-string
red-ui-debug-msg-object-header
">1617867468039</span></span></span></span></span></span>&value=147<br class="">
<br class="">
Die post-response:<br class="">
{"_msgid":"99863cea.a330b","uuid":"</span></span></span></span></span></span><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
"><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-type-string
red-ui-debug-msg-object-header
"></span></span></span></span></span></span>xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx","timestamp":1617867468039,"url":"<a class="moz-txt-link-freetext" href="http://192.168.178.51/middleware.php/data/" moz-do-not-send="true">http://192.168.178.51/middleware.php/data/</a></span></span></span></span></span></span><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
"><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-type-string
red-ui-debug-msg-object-header
"></span></span></span></span></span></span>xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json?ts=1617867468039&value=147","statusCode":200,"headers":{"date":"Thu,
08 Apr 2021 07:37:48
GMT","server":"ReactPHP/1","cache-control":"no-cache,
private","content-type":"application/json","access-control-allow-origin":"*","content-length":"26","connection":"close","x-node-red-request-node":"39370292"},"responseUrl":"<a class="moz-txt-link-freetext" href="http://192.168.178.51/middleware.php/data/" moz-do-not-send="true">http://192.168.178.51/middleware.php/data/</a></span></span></span></span></span></span><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level
"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-object-header red-ui-debug-msg-type-string
"><span class="red-ui-debug-msg-payload"><span class=" built
red-ui-debug-msg-element red-ui-debug-msg-top-level"><span class="red-ui-debug-msg-element"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class=" red-ui-debug-msg-type-string
red-ui-debug-msg-object-header
"></span></span></span></span></span></span>xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json?ts=1617867468039&value=147","payload":{"version":"0.3","rows":1},"redirectList":[]}<br class="">
</span></span></span></span></span></span><br class="">
Ist hier irgend ein Fehler versteckt?<br class="">
<br class="">
Gruß<br class="">
Thomas<br class="">
<br class="">
<div class="moz-cite-prefix">Am 08.04.2021 um 09:01
schrieb Andreas Goetz:<br class="">
</div>
<blockquote type="cite" cite="mid:950CE498-4340-4180-A629-7A4989D67FD8@gmail.com" class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
Die VZ Zählerstände sind in Millisekunden- der
Konverter vmtl. Sekunden?
<div class=""><br class="">
</div>
<div class="">Viele Grüße, Andreas</div>
<div class=""><br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On 8. Apr 2021, at 09:00, <a href="mailto:Heine.Thomas@online.de" class="" moz-do-not-send="true">Heine.Thomas@online.de</a>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<div class=""> Hallo Thomas,<br class="">
<br class="">
Wenn ich es so abfrage:<br class="">
<a class="moz-txt-link-freetext" href="http://192.168.178.51/data/xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json" moz-do-not-send="true">http://192.168.178.51/data/xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json</a><br class="">
kommt folgendes:<br class="">
<br class="">
<pre class="data">{"version":"0.3","data":{"tuples":[[1617777764306,0,1]],"uuid":"xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx","from":1617777464308,"to":1617777764306,"min":[1617777764306,0],"max":[1617777764306,0],"average":0,"consumption":0,"rows":2}}</pre>
consumption bleibt 0 (ist das nicht der
Aktualverbrauch?)<br class="">
<br class="">
Ich hab ja keinen Impuls-Kanal, sondern
einen Zählerstand-Kanal.<br class="">
In Frontend wird der Gesamtverbrauch ja auch
richtig angezeigt (aufgerundet 136m³):<br class="">
<br class="">
<span id="cid:part1.053637A1.064BEA67@online.de" class=""><ajjlibndepcjlagi.png></span><br class="">
<br class="">
Den Gesamtverbrauch (müsste ja der
Zählerstand sein) würde ich gerne anzeigen.<br class="">
Oder habe ich hier irgendwas nicht richtig
kapiert, oder Grundlegende Denkfehler?<br class="">
<br class="">
Der Counter-Stand des ESP kann doch auch als
Zählerstand mit dem entsprechenden Offset
und Initialverbrauch als "Zähler" dienen,
oder?<br class="">
<br class="">
<span id="cid:part2.C4529F81.DE723253@online.de" class=""><lppmegjjoipaghpl.png></span><br class="">
<br class="">
<br class="">
<br class="">
Was stimmt bei den Zeitstempeln nicht? Wenn
ich sie im Unix-Time-Converter eingebe,
passen sie.<br class="">
<br class="">
Gruß Thomas<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Am 08.04.2021
um 08:40 schrieb Thomas Höpfner:<br class="">
</div>
<blockquote type="cite" cite="mid:kcis.E96F4CE7F9EC43BAB1F37674F3DFCA70@rohrpostix" class="">
<meta name="Generator" content="Kopano
WebApp v3.5.14.2539+111.1" class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" class="">
<title class="">RE: [vz-users] Abfrage
Zählerstand aus Wasserzähler</title>
<!-- begin sanitized html -->
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class="">Hallo Thomas,</div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class=""><br class="">
</span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class="">die
Zeitstempel stimmen nicht. Wie PHP
hier reagiert verstehe ich auch nicht.</span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class="">options=raw
kanst du weglassen. Hier bekommst du
nur eine Liste mit allen Impulsen.
Interesand ist aber nur die Anzahl,
die steht dann auch als consumtion in
der Antwort.</span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class="">Ich
sehe im Moment keine Möglichkeit den
aktuellen Zählerstand eines
Iipulszählers aus vz auszulesen.</span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class=""><br class="">
</span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><span style="font-size:
12pt; font-family: tahoma, arial,
helvetica, sans-serif;" class="">Thomas </span></div>
<div style="padding: 0px; margin: 0px;
min-height: 12pt; font-family: tahoma,
arial, helvetica, sans-serif; font-size:
12pt;" class=""><br class="">
</div>
<blockquote style="border-left: 2px solid
#325FBA; padding-left: 5px; margin: 0px
5px;" class=""><span style="font-family:
tahoma,arial,helvetica,sans-serif;
font-size: 10pt;" class="">-----Ursprüngliche
Nachricht-----<br class="">
<span class=""><strong class="">Von:</strong>
<a class="moz-txt-link-abbreviated" href="mailto:Heine.Thomas@online.de" moz-do-not-send="true">Heine.Thomas@online.de</a> <a class="moz-txt-link-rfc2396E" href="mailto:Heine.Thomas@online.de" moz-do-not-send="true"><Heine.Thomas@online.de></a></span><br class="">
<span class=""><strong class="">Gesendet:</strong>
Donnerstag 8 April 2021 08:24</span><br class="">
<span class=""><strong class="">An:</strong>
<a class="moz-txt-link-abbreviated" href="mailto:volkszaehler-users@demo.volkszaehler.org" moz-do-not-send="true">volkszaehler-users@demo.volkszaehler.org</a></span><br class="">
<span class=""><strong class="">Betreff:</strong>
Re: [vz-users] Abfrage Zählerstand
aus Wasserzähler</span><br class="">
<br class="">
</span>
<div class="bodyclass">Hallo Andreas,<br class="">
<br class="">
es liegen seid 2.4. Daten vor
(inzwischen 1450 Liter)<br class="">
Initialverbrauch 134264 Liter<br class="">
Der Zählerstand sollten also
inzwischen rechnerisch 135714 Liter
sein.<br class="">
<br class="">
Hier die Debug-Abfrage:<br class="">
<br class="">
<a href="http://192.168.178.51/data/xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json?from=-1&options=raw&debug=1" title="http://192.168.178.51/data/xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json?from=-1&options=raw&debug=1
Klicken Sie auf den Link, um die URL
in einem neuen Fenster zu öffnen." rel="noreferrer noopener" target="_blank" moz-do-not-send="true" class="">http://192.168.178.51/data/xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx.json?from=-1&options=raw&debug=1</a><br class="">
<br class="">
und das Ergebnis:<br class="">
<br class="">
<pre class="data">{
"version": "0.3",
"data": {
"tuples": [
[
1617862067814,<span class="red-ui-debug-msg-payload"><span class="red-ui-debug-msg-element red-ui-debug-msg-top-level"><span class="red-ui-debug-msg-row"><span class="red-ui-debug-msg-object-value"><span class="red-ui-debug-msg-type-number red-ui-debug-msg-type-number-toggle">1617864302904</span></span></span></span></span>
145,
1
]
],
"uuid": "xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx",
"from": 1617861767833,
"to": 1617862067814,
"average": 0,
"consumption": 0,
"rows": 2
},
"debug": {
"database": "pdo_mysql",
"time": 0.19783,
"uptime": 1177360290,
"load": [
3.78,
4.25,
4.21
],
"commit-hash": "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
"php-version": "7.3.19-1~deb10u1",
"messages": [],
"sql": {
"totalTime": 0.02234506607055664,
"worstTime": 0.0026459693908691406,
"queries": [
{
"sql": "SELECT \n MAX(timestamp) \nFROM \n data \nWHERE \n channel_id = 44 \n AND timestamp < 1617873106000",
"execTime": 0.0026459693908691406
},
{
"sql": "SELECT \n MAX(timestamp) \nFROM \n data \nWHERE \n channel_id = 44 \n AND timestamp < 1617862067814",
"execTime": 0.0012600421905517578
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 6 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.0021820068359375
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 5 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.0018649101257324219
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 4 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.002110004425048828
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 3 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.0017001628875732422
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 2 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.001873016357421875
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 1 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.0018138885498046875
},
{
"sql": "SELECT \n UNIX_TIMESTAMP(\n FROM_UNIXTIME(\n MIN(timestamp) \/ 1000, \n \"%Y-%m-%d %H:%i:00\"\n )\n ) * 1000 \nFROM \n aggregate \nWHERE \n channel_id = 44 \n AND type = '1' \n AND timestamp >= UNIX_TIMESTAMP(\n DATE_ADD(\n FROM_UNIXTIME(\n 1617861767833 \/ 1000, \"%Y-%m-%d %H:%i:00\"\n ), \n INTERVAL 1 minute\n )\n ) * 1000",
"execTime": 0.001316070556640625
},
{
"sql": "SELECT \n UNIX_TIMESTAMP(\n DATE_ADD(\n FROM_UNIXTIME(\n MAX(timestamp) \/ 1000, \n \"%Y-%m-%d %H:%i:00\"\n ), \n INTERVAL 1 minute\n )\n ) * 1000 \nFROM \n aggregate \nWHERE \n channel_id = 44 \n AND type = '1' \n AND timestamp < 1617862067814",
"execTime": 0.0012249946594238281
},
{
"sql": "SELECT \n aggregate.type \nFROM \n aggregate \n INNER JOIN entities ON aggregate.channel_id = <a href="http://entities.id/" class="" moz-do-not-send="true">entities.id</a> \nWHERE \n uuid = 'xxxxxx-xxxxx-xxxxx-xxxxx-xxxxxxxxxx' \n and aggregate.type = 0 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nLIMIT \n 1",
"execTime": 0.0016429424285888672
},
{
"sql": "SELECT \n COUNT(1) \nFROM \n data \nWHERE \n channel_id = 44 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814",
"execTime": 0.001310110092163086
},
{
"sql": "SELECT \n timestamp, \n value, \n 1 AS count \nFROM \n data \nWHERE \n channel_id = 44 \n AND timestamp >= 1617861767833 \n AND timestamp <= 1617862067814 \nORDER BY \n timestamp ASC",
"execTime": 0.0014009475708007812
}
]
}
}
}</pre>
<br class="">
<br class="">
Hilft das weiter?<br class="">
<br class="">
Gruß<br class="">
Thomas<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<div class="moz-cite-prefix">Am
08.04.2021 um 08:10 schrieb Andreas
Goetz:<br class="">
</div>
<blockquote cite="mid:A1BC3B90-AE35-4DFC-9135-9BBF09FBE334@gmail.com" class="">
<div dir="ltr" class="">Häng mal
bitte ein &debug=1 dran, dann
sollten wir sehen welches SQL
ausgeführt wird. Vielleicht gibt
das einen Hinweis.</div>
<div dir="ltr" class=""><br class="">
</div>
<div dir="ltr" class="">Viele Grüße,
Andreas</div>
<div dir="ltr" class=""><br class="">
</div>
<div dir="ltr" class="">PS.: seit
wann erfasst Du die Daten?</div>
<div dir="ltr" class=""><br class="">
<blockquote class="">Am 08.04.2021
um 07:59 schrieb <a href="mailto:Heine.thomas@online.de" title="mailto:Heine.thomas@online.de Klicken Sie auf den Link, um die
URL in einem neuen Fenster zu
öffnen." rel="noreferrer
noopener" target="_blank" moz-do-not-send="true" class="">Heine.thomas@online.de</a>:<br class="">
<br class="">
</blockquote>
</div>
<blockquote class="">
<div dir="ltr" class=""> Hallo,<br class="">
<br class="">
ich habe inzwischen meinen
Wasserzähler mit einem
Reed-Kontakt ausgestattet und
lese ihn per Tasmota ESP8266
über einen Counter
(10l-Schritte) aus.<br class="">
der Counterwert wird also alle
10l um 1 erhöht.<br class="">
Im VZ-Logger habe ich einen
Kanal mit "Wasser Zählerstände"
angelegt.<br class="">
Das klappt soweit auch alles.
Ich sehe einen Verbrauch, und
auch den Gesamt-Zählerstand nach
dem ich einen Initialen
Zählerstand eingetragen habe.<br class="">
<br class="">
<div class=""><adillmbjlmnoplia.png></div>
<br class="">
<br class="">
<br class="">
Per HTTP-Request kann ich auch
bestimmte Zeit-Bereiche super
abfragen.<br class="">
<br class="">
Jetzt würde ich gerne aber an
meiner Haus-Visualisierung den
aktuellen Zählerstand anzeigen.<br class="">
<br class="">
<br class="">
So wollte ich ihn abfragen:<br class="">
<br class="">
<a href="http://192.168.178.51/data/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx.json?from=-1&options=raw" title="http://192.168.178.51/data/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx.json?from=-1&options=raw
Klicken Sie auf den Link, um
die URL in einem neuen Fenster
zu öffnen." rel="noreferrer
noopener" target="_blank" moz-do-not-send="true" class="">http://192.168.178.51/data/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx.json?from=-1&options=raw</a><br class="">
<br class="">
das json sieht jedoch dann so
aus:<br class="">
<pre class="data">{"version":"0.3","data":{"tuples":[[1617860867741,144,1]],"uuid":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx","from":1617860567724,"to":1617860867741,"average":0,"consumption":0,"rows":2}}</pre>
<br class="">
bzw. so:<br class="">
<div class=""><lcnmkochlddnejkg.png></div>
<br class="">
der Zählerstand müsste derzeit
irgendwo bei 136xxx Liter
sein...<br class="">
<br class="">
Was mache ich bei der Abfrage
zum Zählerstand falsch?<br class="">
<br class="">
Danke vorab für eure Hilfe<br class="">
<br class="">
Gruß<br class="">
Thomas<br class="">
</div>
</blockquote>
</blockquote>
<br class="">
</div>
</blockquote>
<!-- end sanitized html --> </blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</blockquote>
<br class="">
</div>
<span id="cid:8456B2CB-C4A1-4BAF-8769-ACF31C4FF45D"><xxxx-xxxxxx-xxxxxxx-xxxxxxx.json></span></div></blockquote></div><br class=""></div></div></blockquote></body></html>