[vz-users] Trotz hohem duplicates-Intervall werden unveränderte Werte an die API weitergereicht

Kai Wiemer kawi.business at gmail.com
Tue Aug 29 07:57:17 CEST 2017


Moin Frank,

das hat leider nicht das gewünschte Ergebnis gebracht.

Ich habe sowohl mit den Aggregationsparametern als auch mit interval
herumgespielt. Die folgenden Parameter wirken sich alle auf das
Sendeintervall aus:

interval: Wartezeit in Sekunden bis neue Werte in die middleware übertragen
werden
aggtime: aggregate meter readings and send middleware update after
<aggtime> seconds
duplicates: send duplicate values only each <duplicates> seconds

Möglicherweise harmonieren die Parameter nicht miteinander?

Aktuelle Config:

{
    "retry" : 0,
    "daemon": true,
    "verbosity": 5,
    "log" : "/var/log/vzlogger.log",
    "local" : {
        "enabled" : false,
        "port" : 8080,
        "index" : true,
        "timeout" : 0,
        "buffer" : 0
    },
    "meters" : [{
        "enabled": true,
        "interval": 60,
        "aggtime": 60,
        "aggmode": "MAX",
        "aggfixedinterval": false,
        "channels": [{
                "uuid": "6596fba0-897b-11e7-acd8-43e26569567b",
                "identifier": "255-255:1.8.0",
                "api": "influxdb",
                "host": "localhost:8086",
                "database": "vzlogger",
                "measurement_name": "measurement",
                "username": "vz",
                "password": "superSecurePassword123!!",
                "duplicates": 999999
         }],
        "protocol": "d0",
        "device": "/dev/usb-ir-lesekopf",
        "dump_file": "",
        "pullseq": "2F3F210D0A",
        "ackseq": "auto",
        "baudrate": 300,
        "baudrate_read": 9600,
        "baudrate_change_delay": 500,
        "parity": "7e1",
        "read_timeout": 100
    }]
}

Und das Log gibt sagt:

[Aug 29 05:42:28][main] vzlogger v0.6.1 based on heads/master-0-gb745da7194
from Thu, 24 Aug 2017 09:16:17 +0200 started.
[Aug 29 05:42:28]       New meter initialized (protocol=d0)
[Aug 29 05:42:28][chn0] New channel initialized (uuid=...69567b
api=influxdb id=255-255:1.8.0)
[Aug 29 05:42:28][main] log level is 5
[Aug 29 05:42:28]       Daemonize process...
[Aug 29 05:42:28][mtr0] Meter connection established
[Aug 29 05:42:34][chn0] Adding reading to queue (value=110350.59
ts=1503985351972)
[Aug 29 05:44:15][d0]   nothing received for more than 100 seconds
[Aug 29 05:44:15][d0]   read timed out!, context: 0, bytes read: 0, last
byte 0x4a
[Aug 29 05:44:15][mtr0] Next reading in 60 seconds
[Aug 29 05:45:20][chn0] Adding reading to queue (value=110350.72
ts=1503985518727)
[Aug 29 05:45:26][chn0] Adding reading to queue (value=110350.72
ts=1503985524178)
[Aug 29 05:45:31][chn0] Adding reading to queue (value=110350.73
ts=1503985529690)
[Aug 29 05:45:31][mtr0] Next reading in 60 seconds
[Aug 29 05:46:37][chn0] Adding reading to queue (value=110350.78
ts=1503985595200)
[Aug 29 05:46:42][chn0] Adding reading to queue (value=110350.78
ts=1503985600628)
[Aug 29 05:46:48][chn0] Adding reading to queue (value=110350.79
ts=1503985606024)
[Aug 29 05:46:53][chn0] Adding reading to queue (value=110350.79
ts=1503985611447)
[Aug 29 05:46:58][chn0] Adding reading to queue (value=110350.80
ts=1503985616880)
[Aug 29 05:47:04][chn0] Adding reading to queue (value=110350.80
ts=1503985622285)
[Aug 29 05:47:09][chn0] Adding reading to queue (value=110350.81
ts=1503985627700)
[Aug 29 05:47:15][chn0] Adding reading to queue (value=110350.81
ts=1503985633232)
[Aug 29 05:47:20][chn0] Adding reading to queue (value=110350.81
ts=1503985638741)
[Aug 29 05:47:26][chn0] Adding reading to queue (value=110350.82
ts=1503985644209)
[Aug 29 05:47:31][chn0] Adding reading to queue (value=110350.82
ts=1503985649756)
[Aug 29 05:47:31][mtr0] Next reading in 60 seconds
[Aug 29 05:48:37][chn0] Adding reading to queue (value=110350.88
ts=1503985715258)
[Aug 29 05:48:42][chn0] Adding reading to queue (value=110350.88
ts=1503985720660)
[Aug 29 05:48:48][chn0] Adding reading to queue (value=110350.88
ts=1503985726102)
[Aug 29 05:48:53][chn0] Adding reading to queue (value=110350.89
ts=1503985731491)
[Aug 29 05:48:59][chn0] Adding reading to queue (value=110350.89
ts=1503985737055)
[Aug 29 05:49:04][chn0] Adding reading to queue (value=110350.90
ts=1503985742470)
[Aug 29 05:49:10][chn0] Adding reading to queue (value=110350.90
ts=1503985747967)
[Aug 29 05:49:15][chn0] Adding reading to queue (value=110350.91
ts=1503985753439)
[Aug 29 05:49:21][chn0] Adding reading to queue (value=110350.91
ts=1503985758915)
[Aug 29 05:49:26][chn0] Adding reading to queue (value=110350.92
ts=1503985764382)
[Aug 29 05:49:32][chn0] Adding reading to queue (value=110350.92
ts=1503985769954)
[Aug 29 05:49:32][mtr0] Next reading in 60 seconds
...

Noch andere Ideen? :-)

Danke und Grüße
Kai

2017-08-28 16:29 GMT+02:00 Frank Richter <frank.richter83 at gmail.com>:

> Hallo Kai,
>
> könnte sein dass duplicates nur bei aktiver Aggregation wirkt. Bitte mal
> aggtime und aggmode konfigurieren.
>
> Grüße
> Frank
>
> Am 28.08.2017 15:14 schrieb "Kai Wiemer" <kawi.business at gmail.com>:
>
>> Hallo zusammen,
>>
>> Trotz hohem duplicates-Intervall werden unveränderte Werte an die API
>> weitergereicht. Meine Konfiguration lautet:
>>
>> /**
>>  * use proper encoded JSON with javascript comments
>>  *
>>  * take a look at the wiki for detailed information:
>>  * http://wiki.volkszaehler.org/software/controller/vzlogger#co
>> nfiguration
>>  */
>>
>> {
>>     "retry" : 0,
>>     "daemon": true,
>>     "verbosity": 99,
>>     "log" : "/var/log/vzlogger.log",
>>     "local" : {
>>         "enabled" : false,
>>         "port" : 8080,
>>         "index" : true,
>>         "timeout" : 0,
>>         "buffer" : 0
>>     },
>>     "meters" : [{
>>         "enabled": true,
>>         "allowskip": false,
>>         "interval": 0,
>>         "aggtime": -1,
>>         "aggfixedinterval": false,
>>         "channels": [{
>>                 "uuid": "6596fba0-897b-11e7-acd8-43e26569567b",
>>                 "identifier": "255-255:1.8.0",
>>                 "api": "influxdb",
>>                 "host": "localhost:8086",
>>                 "database": "vzlogger",
>>                 "measurement_name": "measurement",
>>                 "username": "vz",
>>                 "password": "superSecurePassword123!!",
>>                 "duplicates": 999999
>>          }],
>>         "protocol": "d0",
>>         "device": "/dev/usb-ir-lesekopf",
>>         "dump_file": "",
>>         "pullseq": "2F3F210D0A",
>>         "ackseq": "auto",
>>         "baudrate": 300,
>>         "baudrate_read": 9600,
>>         "baudrate_change_delay": 500,
>>         "parity": "7e1",
>>         "read_timeout": 100
>>     }]
>> }
>>
>> In der Log-Datei sehe ich:
>>
>> === Block 1: 13:04:01 Uhr
>>
>> [Aug 28 13:04:01][chn0] Adding reading to queue (value=110296.13
>> ts=1503925438937)
>> [Aug 28 13:04:01][chn0] Buffer has 1 items
>> [Aug 28 13:04:01][chn0] Reading buffer: timestamp 1503925438937 value
>> 110296.130000
>> [Aug 28 13:04:01][chn0] request body is measurement,uuid=6596fba0-897b-11e7-acd8-43e26569567b
>> value=110296.130000 1503925438937
>> [Aug 28 13:04:01][CURL] CURL: Found bundle for host localhost: 0x74a1b470
>> [can pipeline]
>> [Aug 28 13:04:01][CURL] CURL: Re-using existing connection! (#0) with
>> host localhost
>> [Aug 28 13:04:01][CURL] CURL: Connected to localhost (::1) port 8086 (#0)
>> [Aug 28 13:04:01][CURL] CURL: Server auth using Basic with user 'vz'
>> [Aug 28 13:04:01][CURL] CURL: Header 'POST /write?db=vzlogger&precision=ms
>> HTTP/1.1
>> Host: localhost:8086
>> Authorization: Basic ...==
>> Accept: */*
>> Content-Length: 88
>> Content-Type: application/x-www-form-urlencoded
>> ' bytes
>> [Aug 28 13:04:01][CURL] CURL: Sent 88 bytes..
>> [Aug 28 13:04:01][CURL] CURL: Sent 'measurement,uuid=6596fba0-897b-11e7-acd8-43e26569567b
>> value=110296.130000 1503925438937
>>
>> === Block 2: 13:04:06 Uhr
>>
>> [Aug 28 13:04:06][chn0] Adding reading to queue (value=110296.13
>> ts=1503925444500)
>> [Aug 28 13:04:06][chn0] Buffer has 1 items
>> [Aug 28 13:04:06][chn0] Reading buffer: timestamp 1503925444500 value
>> 110296.130000
>> [Aug 28 13:04:06][chn0] request body is measurement,uuid=6596fba0-897b-11e7-acd8-43e26569567b
>> value=110296.130000 1503925444500
>> [Aug 28 13:04:06][CURL] CURL: Found bundle for host localhost: 0x74a1b470
>> [can pipeline]
>> [Aug 28 13:04:06][CURL] CURL: Re-using existing connection! (#0) with
>> host localhost
>> [Aug 28 13:04:06][CURL] CURL: Connected to localhost (::1) port 8086 (#0)
>> [Aug 28 13:04:06][CURL] CURL: Server auth using Basic with user 'vz'
>> [Aug 28 13:04:06][CURL] CURL: Header 'POST /write?db=vzlogger&precision=ms
>> HTTP/1.1
>> Host: localhost:8086
>> Authorization: Basic ...==
>> Accept: */*
>> Content-Length: 88
>> Content-Type: application/x-www-form-urlencoded
>> ' bytes
>> [Aug 28 13:04:06][CURL] CURL: Sent 88 bytes..
>> [Aug 28 13:04:06][CURL] CURL: Sent 'measurement,uuid=6596fba0-897b-11e7-acd8-43e26569567b
>> value=110296.130000 1503925444500
>>
>> Wenn ich mir die Diskussion unter https://github.com/volkszaehle
>> r/vzlogger/issues/98 anschaue, sollte das doch durch den
>> interval-Parameter unterbunden werden. Hier wird jedoch anscheinend
>> derselbe Wert innerhalb von 5 Sekunden erneut versendet.
>>
>> Habe den aktuellen master ausgecheckt.
>>
>> Bug oder Fehlkonfiguration? :-)
>>
>> Danke und Grüße
>> Kai
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20170829/a83033da/attachment-0001.html>


More information about the volkszaehler-users mailing list