[vz-dev] Fragen zum Protokoll "s0" in vzlogger

Justin Otherguy justin at justinotherguy.org
Sat May 14 08:05:47 CEST 2016


Hi,

> Am 08.05.2016 um 20:39 schrieb Andreas Goetz <cpuidle at gmail.com>:
> 
>> 2016-05-07 18:18 GMT+02:00 Justin Otherguy <justin at justinotherguy.org>:
> 
> Ich vermute mal Du meinst "Mittelwert 60 nach 10 Sekunden Aggregation beobachtet während ich Mittelwert 70 erwartet habe"?

ganz genau! :)

 
>> Soll ich hierfür auch ein Issue aufmachen?
> 
> Auch hier stehe ich grad auf dem Schlauch. Bei aggmode sum (was für Impulse richtig ist!) müsste sowieso die 704 geloggt werden und nicht die 70. Da passt also mal wieder gar nichts (oder ich kriegs nicht übereinander).
> 
> Könntest Du das zur Sicherheit nochmal mit dem aktuellen Setup nachtesten? Insbesondere auch sicher stellen dass da am Anfang nicht ein Meßwert im Log fehlt?

klaro. Jetzt mit echten (TM) 50 Hz, mit dieser vzlogger.conf [1] und diesem vzlogger.log [2].

Auszüge daraus:

[May 14 07:36:44][chn0] Adding reading to queue (value=50.00 ts=1463204204075)
[May 14 07:36:45][chn0] Adding reading to queue (value=50.00 ts=1463204205076)
[May 14 07:36:46][chn0] Adding reading to queue (value=50.00 ts=1463204206077)
[May 14 07:36:47][chn0] Adding reading to queue (value=50.00 ts=1463204207079)
[May 14 07:36:48][chn0] Adding reading to queue (value=50.00 ts=1463204208080)
[May 14 07:36:49][chn0] Adding reading to queue (value=21.00 ts=1463204208500)
[May 14 07:36:50][chn0] Adding reading to queue (value=0.00 ts=1463204209500)
[May 14 07:36:51][chn0] Adding reading to queue (value=0.00 ts=1463204210500)
[May 14 07:36:52][chn0] Adding reading to queue (value=0.00 ts=1463204211500)
[May 14 07:36:53][chn0] Adding reading to queue (value=0.00 ts=1463204212500)
[May 14 07:36:53][AVG]  [0] 50.000000 @ 1463204204075
[May 14 07:36:53][AVG]  [1] 50.000000 @ 1463204205076
[May 14 07:36:53][AVG]  [2] 50.000000 @ 1463204206077
[May 14 07:36:53][AVG]  [3] 50.000000 @ 1463204207079
[May 14 07:36:53][AVG]  [4] 50.000000 @ 1463204208080
[May 14 07:36:53][AVG]  [5] 21.000000 @ 1463204208500
[May 14 07:36:53][AVG]  [6] 0.000000 @ 1463204209500
[May 14 07:36:53][AVG]  [7] 0.000000 @ 1463204210500
[May 14 07:36:53][AVG]  [8] 0.000000 @ 1463204211500
[May 14 07:36:53][AVG]  [9] 0.000000 @ 1463204212500
[May 14 07:36:53][AVG]  [10] RESULT 31.009972 @ 1463204212500
[May 14 07:36:53][chn0] ==> number of tuples: 1
[May 14 07:36:53][chn0] compare: 1463204203074 1463204212500
[May 14 07:36:53][chn0] JSON request body: [ [ 1463204212500, 31.009972416719705 ] ]

values sind: 5x50, 1x21, 4x0
Summe: 271
Durchschnitt: 271/10=27.1 (ich hätte erwartet, dass der Wert gesendet wird)
gesendeter Wert: 31.01


[May 14 07:36:54][chn0] Adding reading to queue (value=0.00 ts=1463204213500)
[May 14 07:36:55][chn0] Adding reading to queue (value=0.00 ts=1463204214501)
[May 14 07:36:56][chn0] Adding reading to queue (value=0.00 ts=1463204215501)
[May 14 07:36:57][chn0] Adding reading to queue (value=0.00 ts=1463204216501)
[May 14 07:36:58][chn0] Adding reading to queue (value=0.00 ts=1463204217501)
[May 14 07:36:59][chn0] Adding reading to queue (value=29.00 ts=1463204219081)
[May 14 07:37:00][chn0] Adding reading to queue (value=50.00 ts=1463204220082)
[May 14 07:37:01][chn0] Adding reading to queue (value=49.00 ts=1463204221063)
[May 14 07:37:02][chn0] Adding reading to queue (value=50.00 ts=1463204222065)
[May 14 07:37:03][chn0] Adding reading to queue (value=50.00 ts=1463204223066)
[May 14 07:37:03][AVG]  [0] 0.000000 @ 1463204213500
[May 14 07:37:03][AVG]  [1] 0.000000 @ 1463204214501
[May 14 07:37:03][AVG]  [2] 0.000000 @ 1463204215501
[May 14 07:37:03][AVG]  [3] 0.000000 @ 1463204216501
[May 14 07:37:03][AVG]  [4] 0.000000 @ 1463204217501
[May 14 07:37:03][AVG]  [5] 29.000000 @ 1463204219081
[May 14 07:37:03][AVG]  [6] 50.000000 @ 1463204220082
[May 14 07:37:03][AVG]  [7] 49.000000 @ 1463204221063
[May 14 07:37:03][AVG]  [8] 50.000000 @ 1463204222065
[May 14 07:37:03][AVG]  [9] 50.000000 @ 1463204223066
[May 14 07:37:03][AVG]  [10] RESULT 16.773330 @ 1463204223066
[May 14 07:37:03][chn0] ==> number of tuples: 1
[May 14 07:37:03][chn0] compare: 1463204212500 1463204223066
[May 14 07:37:03][chn0] JSON request body: [ [ 1463204223066, 16.773329547605528 ] ]

values sind: 5x0, 1x29, 1x49, 3x50
Summe: 228
Durchschnitt: 228/10=22,8
gesendeter Wert: 16.77


[May 14 07:37:04][chn0] Adding reading to queue (value=50.00 ts=1463204224067)
[May 14 07:37:05][chn0] Adding reading to queue (value=50.00 ts=1463204225068)
[May 14 07:37:06][chn0] Adding reading to queue (value=50.00 ts=1463204226069)
[May 14 07:37:07][chn0] Adding reading to queue (value=50.00 ts=1463204227071)
[May 14 07:37:08][chn0] Adding reading to queue (value=50.00 ts=1463204228072)
[May 14 07:37:09][chn0] Adding reading to queue (value=50.00 ts=1463204229073)
[May 14 07:37:10][chn0] Adding reading to queue (value=50.00 ts=1463204230074)
[May 14 07:37:11][chn0] Adding reading to queue (value=50.00 ts=1463204231076)
[May 14 07:37:12][chn0] Adding reading to queue (value=50.00 ts=1463204232077)
[May 14 07:37:13][chn0] Adding reading to queue (value=50.00 ts=1463204233078)
[May 14 07:37:13][AVG]  [0] 50.000000 @ 1463204224067
[May 14 07:37:13][AVG]  [1] 50.000000 @ 1463204225068
[May 14 07:37:13][AVG]  [2] 50.000000 @ 1463204226069
[May 14 07:37:13][AVG]  [3] 50.000000 @ 1463204227071
[May 14 07:37:13][AVG]  [4] 50.000000 @ 1463204228072
[May 14 07:37:13][AVG]  [5] 50.000000 @ 1463204229073
[May 14 07:37:13][AVG]  [6] 50.000000 @ 1463204230074
[May 14 07:37:13][AVG]  [7] 50.000000 @ 1463204231076
[May 14 07:37:13][AVG]  [8] 50.000000 @ 1463204232077
[May 14 07:37:13][AVG]  [9] 50.000000 @ 1463204233078
[May 14 07:37:13][AVG]  [10] RESULT 50.000000 @ 1463204233078
[May 14 07:37:13][chn0] ==> number of tuples: 1
[May 14 07:37:13][chn0] compare: 1463204223066 1463204233078
[May 14 07:37:13][chn0] JSON request body: [ [ 1463204233078, 50.000000000000007 ] ]

values sind: 10x50
Summe: 500
Durchschnitt: 500/10=50
gesendeter Wert: 50

Jetzt klarer, wo ich ein Problem vermute (oder die falschen Erwartungen habe)? :)

Jetzt, wo ich die „[AVG]“-Blöcke im Log entdeckt habe, habe ich mich doch mal auf die Suche nach der relevanten Gegend in vzlogger gemacht und ich würde mal hier hin deuten: https://github.com/volkszaehler/vzlogger/blob/master/src/Buffer.cpp#L80

Fragen wären also:
- wie wird der AVG ermittelt?
- arbeitet die AVG-Funktion hier falsch?


Gruß, J.

[1] http://pastie.org/10836561
[2] http://pastie.org/10836572



More information about the volkszaehler-dev mailing list