[vz-users] vzlogger liefert zu viele Werte für einen Reed-Kontakt-Impuls

Marius Tarlowski marius at tarlowski.de
Thu Dec 31 09:37:05 CET 2015


Hallo zusammen,

auch ich kann dieses Verhalten bei meinem Vzlogger erkennen und wollte
deshalb auch schon schreiben.
Das Verhalten kann jeder Zeit reproduziert werden.

zum Szenario:

Ich habe vzlogger mit einer Testkonfig laufen lassen (09:26:58), ich
schicke die im Anhang mit.
Interessanter Weise sendet der vzlogger auch beim Start einen Datensatz,
obwohl kein Impuls vorhanden ist. Ist das normal?

Anschließend habe ich über ein Script den GPIO 5 mal ein und ausgeschaltet
(09:27:07), das Resultat sind 2 gesendete Datensätze, der erste zum
Zeitpunkt des Schaltens, der zweite nach Ablauf des delays.
Erneutes starten des Scriptes um 09:27:23 mit dem gleichen Ergebnis.


Den Log-output hänge ich in der Mail an, damit es nicht unübersichtlich
wird.

root at raspberrypi:/home/pi# vzlogger -V
0.4.8
 based on git version: heads/master-0-g296b8aee41
 last commit date: Mon, 21 Dec 2015 22:56:20 +0100


Ich hoffe das hilft bei der Fehlereingrenzung

*Mit freundlichem Gruß / kind regards*

*Marius Tarlowski*

Am 31. Dezember 2015 um 09:13 schrieb Udo1 <udo1 at gmx.net>:

> Hallo Winfried,
>
> Am 30.12.2015 um 23:52 schrieb Winfried Peters:
>
>> sieht meine Ideallösung so aus, dass jeweils beim Schliessen und beim
>> Öffnen ein Impuls registriert wird.
>>
> Dürfte nicht funktionieren, da die S0-Eingänge der Erweiterung nur auf das
> Schließen des Kontaktes reagieren (mit eingebauter Hardware-Entprellung von
> 20ms). Ein zusätzliches 'debounce_delay ' kann das Entprellen natürlich
> noch unterstützen.
>
>           "secretKey": "",
>>           "type": "device",
>>           "scaler": 0,
>>            "gpio_dir": -1,
>>            "nonblocking_delay": 100000
>>            "device": "",
>>
> Kannst du auch aus der vzlogger.conf löschen, da keine Funktion in deiner
> Config.
>
> "verbosity": 15,
>>
> Solltest du auf '5' oder '0' setzen, wenn alles funktioniert. Sonst wird
> die Datei zu groß. Gegebenenfalls zwischendurch mal die Datei löschen.
>
> Was steht jetzt in der vzlogger.log?
>
> Gruß
> Udo
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20151231/d840a166/attachment-0001.html>
-------------- next part --------------
root at raspberrypi:/home/pi# vzlogger -c /home/pi/vztest.conf
[Dec 31 09:26:58][main] vzlogger v0.4.8 based on heads/master-0-g296b8aee41 from Mon, 21 Dec 2015 22:56:20 +0100 started.
[Dec 31 09:26:58][mtr0] Creating new meter with protocol s0.
[Dec 31 09:26:58][mtr0] Meter configured, enabled.
[Dec 31 09:26:58]       New meter initialized (protocol=s0)
[Dec 31 09:26:58]       Configure channel.
[Dec 31 09:26:58][chn0] New channel initialized (uuid=...e8f12d api=volkszaehler id=Impulse)
[Dec 31 09:26:58]       Have 1 meters.
[Dec 31 09:26:58][main] log level is 15
[Dec 31 09:26:58][main] daemon=0, local=0
[Dec 31 09:26:58]       Process not  daemonized...
[Dec 31 09:26:58][push] No pushDataServer defined.
[Dec 31 09:26:58][]     ===> Start meters
[Dec 31 09:26:58][s0]   counter_thread created
[Dec 31 09:26:58][mtr0] Meter connection established
[Dec 31 09:26:58][mtr0] Meter thread started
[Dec 31 09:26:58][mtr0] Meter is opened. Starting channels.
[Dec 31 09:26:58][mtr0] Number of readers: 4
[Dec 31 09:26:58][chn0] Logging thread started
[Dec 31 09:26:58][s0]   Counter thread started with blocking hwif
[Dec 31 09:26:58][]     Startup done.
[Dec 31 09:26:58][chn0] Start logging thread for volkszaehler-api. Running as daemon: no
[Dec 31 09:26:58][mtr0] Config.daemon: 0
[Dec 31 09:26:58][mtr0] Config.local: 0
[Dec 31 09:26:58][S0]   MeterS0:HWIF_GPIO:first poll returned 1[Dec 31 09:26:58][chn0] Using default volkszaehler api.

[Dec 31 09:26:59][s0]   Reading S0 - returning 1 readings (n=1 n_neg = 0)
[Dec 31 09:26:59][mtr0] Got 1 new readings from meter:
[Dec 31 09:26:59][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1451550418422
[Dec 31 09:26:59][chn0] Adding reading to queue (value=1.00 ts=1451550418422)
[Dec 31 09:26:59][chn0] Buffer dump (size=1): {1.0000,}
[Dec 31 09:26:59][chn0] ==> number of tuples: 1
[Dec 31 09:26:59][chn0] compare: 0 1451550418422
[Dec 31 09:26:59][chn0] JSON request body: [ [ 1451550418422, 1 ] ]
[Dec 31 09:26:59][chn0] CURL: Hostname was NOT found in DNS cache
[Dec 31 09:26:59][chn0] CURL:   Trying ::1...
[Dec 31 09:26:59][chn0] CURL: Connected to localhost (::1) port 80 (#0)
[Dec 31 09:26:59][chn0] CURL: Sent 24 bytes..
[Dec 31 09:26:59][chn0] CURL: Sent '[ [ 1451550418422, 1 ] ]' bytes
[Dec 31 09:26:59][chn0] CURL: upload completely sent off: 24 out of 24 bytes
[Dec 31 09:26:59][chn0] CURL: HTTP 1.0, assume close after body
[Dec 31 09:26:59][chn0] CURL: Received 26 bytes
[Dec 31 09:26:59][chn0] CURL: Received '{"version":"0.3","rows":1}' bytes
[Dec 31 09:26:59][chn0] CURL: Closing connection 0
[Dec 31 09:26:59][chn0] CURL Request succeeded with code: 200
[Dec 31 09:27:04][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:05][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:06][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:07][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Dec 31 09:27:07][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Dec 31 09:27:07][mtr0] Got 2 new readings from meter:
[Dec 31 09:27:07][mtr0] Reading: id=Power/StringItentifier: value=4146.51 ts=1451550427104
[Dec 31 09:27:07][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1451550427104
[Dec 31 09:27:07][chn0] Adding reading to queue (value=1.00 ts=1451550427104)
[Dec 31 09:27:07][chn0] Buffer dump (size=1): {1.0000,}
[Dec 31 09:27:07][chn0] ==> number of tuples: 1
[Dec 31 09:27:07][chn0] compare: 1451550418422 1451550427104
[Dec 31 09:27:07][chn0] JSON request body: [ [ 1451550427104, 1 ] ]
[Dec 31 09:27:07][chn0] CURL: Hostname was found in DNS cache
[Dec 31 09:27:07][chn0] CURL:   Trying ::1...
[Dec 31 09:27:07][chn0] CURL: Connected to localhost (::1) port 80 (#1)
[Dec 31 09:27:07][chn0] CURL: Sent 24 bytes..
[Dec 31 09:27:07][chn0] CURL: Sent '[ [ 1451550427104, 1 ] ]' bytes
[Dec 31 09:27:07][chn0] CURL: upload completely sent off: 24 out of 24 bytes
[Dec 31 09:27:07][chn0] CURL: HTTP 1.0, assume close after body
[Dec 31 09:27:07][chn0] CURL: Received 26 bytes
[Dec 31 09:27:07][chn0] CURL: Received '{"version":"0.3","rows":1}' bytes
[Dec 31 09:27:07][chn0] CURL: Closing connection 1
[Dec 31 09:27:07][chn0] CURL Request succeeded with code: 200
[Dec 31 09:27:12][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Dec 31 09:27:12][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Dec 31 09:27:12][mtr0] Got 2 new readings from meter:
[Dec 31 09:27:12][mtr0] Reading: id=Power/StringItentifier: value=7198.56 ts=1451550432105
[Dec 31 09:27:12][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1451550432105
[Dec 31 09:27:12][chn0] Adding reading to queue (value=1.00 ts=1451550432105)
[Dec 31 09:27:12][chn0] Buffer dump (size=1): {1.0000,}
[Dec 31 09:27:12][chn0] ==> number of tuples: 1
[Dec 31 09:27:12][chn0] compare: 1451550427104 1451550432105
[Dec 31 09:27:12][chn0] JSON request body: [ [ 1451550432105, 1 ] ]
[Dec 31 09:27:12][chn0] CURL: Hostname was found in DNS cache
[Dec 31 09:27:12][chn0] CURL:   Trying ::1...
[Dec 31 09:27:12][chn0] CURL: Connected to localhost (::1) port 80 (#2)
[Dec 31 09:27:12][chn0] CURL: Sent 24 bytes..
[Dec 31 09:27:12][chn0] CURL: Sent '[ [ 1451550432105, 1 ] ]' bytes
[Dec 31 09:27:12][chn0] CURL: upload completely sent off: 24 out of 24 bytes
[Dec 31 09:27:12][chn0] CURL: HTTP 1.0, assume close after body
[Dec 31 09:27:12][chn0] CURL: Received 26 bytes
[Dec 31 09:27:12][chn0] CURL: Received '{"version":"0.3","rows":1}' bytes
[Dec 31 09:27:12][chn0] CURL: Closing connection 2
[Dec 31 09:27:12][chn0] CURL Request succeeded with code: 200
[Dec 31 09:27:18][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:19][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:20][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:21][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:22][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:22][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Dec 31 09:27:23][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Dec 31 09:27:23][mtr0] Got 2 new readings from meter:
[Dec 31 09:27:23][mtr0] Reading: id=Power/StringItentifier: value=3373.00 ts=1451550442778
[Dec 31 09:27:23][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1451550442778
[Dec 31 09:27:23][chn0] Adding reading to queue (value=1.00 ts=1451550442778)
[Dec 31 09:27:23][chn0] Buffer dump (size=1): {1.0000,}
[Dec 31 09:27:23][chn0] ==> number of tuples: 1
[Dec 31 09:27:23][chn0] compare: 1451550432105 1451550442778
[Dec 31 09:27:23][chn0] JSON request body: [ [ 1451550442778, 1 ] ]
[Dec 31 09:27:23][chn0] CURL: Hostname was found in DNS cache
[Dec 31 09:27:23][chn0] CURL:   Trying ::1...
[Dec 31 09:27:23][chn0] CURL: Connected to localhost (::1) port 80 (#3)
[Dec 31 09:27:23][chn0] CURL: Sent 24 bytes..
[Dec 31 09:27:23][chn0] CURL: Sent '[ [ 1451550442778, 1 ] ]' bytes
[Dec 31 09:27:23][chn0] CURL: upload completely sent off: 24 out of 24 bytes
[Dec 31 09:27:23][chn0] CURL: HTTP 1.0, assume close after body
[Dec 31 09:27:23][chn0] CURL: Received 26 bytes
[Dec 31 09:27:23][chn0] CURL: Received '{"version":"0.3","rows":1}' bytes
[Dec 31 09:27:23][chn0] CURL: Closing connection 3
[Dec 31 09:27:23][chn0] CURL Request succeeded with code: 200
[Dec 31 09:27:27][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Dec 31 09:27:28][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Dec 31 09:27:28][mtr0] Got 2 new readings from meter:
[Dec 31 09:27:28][mtr0] Reading: id=Power/StringItentifier: value=7198.56 ts=1451550447779
[Dec 31 09:27:28][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1451550447779
[Dec 31 09:27:28][chn0] Adding reading to queue (value=1.00 ts=1451550447779)
[Dec 31 09:27:28][chn0] Buffer dump (size=1): {1.0000,}
[Dec 31 09:27:28][chn0] ==> number of tuples: 1
[Dec 31 09:27:28][chn0] compare: 1451550442778 1451550447779
[Dec 31 09:27:28][chn0] JSON request body: [ [ 1451550447779, 1 ] ]
[Dec 31 09:27:28][chn0] CURL: Hostname was found in DNS cache
[Dec 31 09:27:28][chn0] CURL:   Trying ::1...
[Dec 31 09:27:28][chn0] CURL: Connected to localhost (::1) port 80 (#4)
[Dec 31 09:27:28][chn0] CURL: Sent 24 bytes..
[Dec 31 09:27:28][chn0] CURL: Sent '[ [ 1451550447779, 1 ] ]' bytes
[Dec 31 09:27:28][chn0] CURL: upload completely sent off: 24 out of 24 bytes
[Dec 31 09:27:28][chn0] CURL: HTTP 1.0, assume close after body
[Dec 31 09:27:28][chn0] CURL: Received 26 bytes
[Dec 31 09:27:28][chn0] CURL: Received '{"version":"0.3","rows":1}' bytes
[Dec 31 09:27:28][chn0] CURL: Closing connection 4
[Dec 31 09:27:28][chn0] CURL Request succeeded with code: 200
[Dec 31 09:27:33][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:34][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:35][S0]   MeterS0:HWIF_GPIO:first poll returned 0
^C[Dec 31 09:27:36]       MapContainer::quit terminating on signal 2.
[Dec 31 09:27:36]       Closing connections to terminate
[Dec 31 09:27:36][main] MeterMap::cancel entered...
[Dec 31 09:27:36][main] MeterMap::cancel wait for readingthread
[Dec 31 09:27:36][main] MeterMap::cancel wait for meter::close
[Dec 31 09:27:36][S0]   MeterS0:HWIF_GPIO:first poll returned 0
[Dec 31 09:27:36][s0]   Counter thread stopped with 0 imp
[Dec 31 09:27:36][main] MeterMap::cancel finished.
[Dec 31 09:27:36][main] MapContainer::quit finished.
[Dec 31 09:27:36][]     Server stopped.
[Dec 31 09:27:36][]     Trying to delete curlSessionProvider...
*** Error in `vzlogger': free(): corrupted unsorted chunks: 0x018ab3a0 ***
Abgebrochen
root at raspberrypi:/home/pi#
-------------- next part --------------
root at raspberrypi:/home/pi# cat vztest.conf
{
  "retry": 0,
  "daemon": false,
  "verbosity": 15,
// -> Log to Console //  "log": "/var/log/vzlogger.log",
  "local": {
    "enabled": false,
    "port": 8080,
    "index": false,
    "timeout": 0,
    "buffer": 0
  },
  "meters": [
        {
                "enabled": true,
                "allowskip": false,
                "interval": -1,
                "aggtime": -1,
                "aggfixedinterval": false,
                "protocol": "s0",
                "gpio": 25,
                "configureGPIO": true,
                "resolution": 100,
                "send_zero": false,
                "debounce_delay": 5000,
                "channels": [
        {
                        "uuid": "85984600-aefb-11e5-8e76-f15e7ee8f12d",
                        "identifier": "Impulse",
                        "api": "volkszaehler",
                        "middleware": "http://localhost/middleware.php",
                        "type": "device",
                        "aggmode": "none",
                        "duplicates": 0
        }
      ],
    }
  ]
}
root at raspberrypi:/home/pi#


More information about the volkszaehler-users mailing list