[vz-users] S0-Impulse werden vom vzlogger nicht verarbeitet
Erich Hagen
erich.hagen at gmx.com
Wed Sep 23 07:25:00 CEST 2015
Guten Tag
Ich möchte einen S0-Zähler auslesen. Das funktioniert aber (noch) nicht.
Hardwareseitig habe ich den RPi2 mit dem "RaspberryPi-Erweiterung mit
Schaltausgängen_Rev.1" versehen.
Den S0-Ausgang meines Zählers habe ich auf GPIO 4 gelegt.
Mit wiringPi habe ich geprüft, ob der S0-Impuls ankommt. Das ist OK.
Der in der Konfiguration zu sehende "Random"-Zähler ist auf dem Frontend zu
sehen, wenn ich ihn aktiviere.
Wenn ich mit
"http://localhost/volkszaehler.org/middleware.php/data/...ea8df.json?operati
on=add
<http://localhost/volkszaehler.org/middleware.php/data/...ea8df.json?operati
on=add&value=1> &value=1"
Werte eintrage, dann sind sie auf dem Frontend ebenfalls zu sehen.
Was ich aber noch nicht geschafft habe, ist, die Zählerwerte vom S0-Eingang
(GPIO 4) selbst zu sehen.
Im Moment habe ich noch keine Idee, was ich falsch gemacht habe.
Vielleicht hat jemand von euch einen Tipp.
Schöne Grüße
Erich Hagen
----------------------------------------------------------------------------
---------------
Konfiguration
----------------------------------------------------------------------------
---------------
{
"retry": 1,
"daemon": false,
"verbosity": 15,
"log": "/var/log/vzlogger.log",
"meters": [
{
"enabled": false,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{
"uuid": "...8620a",
"identifier": "",
"api": "volkszaehler",
"middleware": "http://localhost/middleware.php",
"secretKey": "",
"type": "device",
"scaler": 1,
"aggmode": "none",
"duplicates": 0
}
],
"protocol": "random",
"min": 0.0,
"max": 10.0,
"device": "",
"gpio": -1,
"mmap": "",
"gpio_dir": -1,
"configureGPIO": false,
"resolution": 1000,
"send_zero": false,
"debounce_delay": 30,
"nonblocking_delay": 100000
},
{
"enabled": true,
"allowskip": false,
"interval": -1,
"aggtime": -1,
"aggfixedinterval": false,
"channels": [
{
"uuid": "...ea8df",
"identifier": "",
"api": "volkszaehler",
"middleware": "http://localhost/middleware.php",
"secretKey": "",
"type": "device",
"scaler": 1,
"aggmode": "SUM",
"aggtime": "5",
"duplicates": 0
}
],
"protocol": "s0",
"device": "",
"gpio": 4,
"mmap": "",
"gpio_dir": -1,
"configureGPIO": false,
"resolution": 1600,
"send_zero": false,
"debounce_delay": 30,
"nonblocking_delay": 100000
}
]
}
----------------------------------------------------------------------------
--------------------
Meldung aus dem Log-File
----------------------------------------------------------------------------
--------------------
[Sep 19 10:39:44] Opened logfile /var/log/vzlogger.log
[Sep 19 10:39:44][push] No pushDataServer defined.
[Sep 19 10:39:44][] ===> Start meters
[Sep 19 10:39:44][mtr0] Meter for protocol 'random' is disabled. Skipping.
[Sep 19 10:39:44][s0] counter_thread created
[Sep 19 10:39:44][s0] Counter thread started with blocking hwif
[Sep 19 10:39:44][mtr1] Meter connection established
[Sep 19 10:39:44][S0] MeterS0:HWIF_GPIO:first poll returned 1
[Sep 19 10:39:44][mtr1] Meter thread started
[Sep 19 10:39:44][mtr1] Meter is opened. Starting channels.
[Sep 19 10:39:44][mtr1] Number of readers: 4
[Sep 19 10:39:44][chn1] Logging thread started
[Sep 19 10:39:44][mtr1] Config.daemon: 0
[Sep 19 10:39:44][] Startup done.
[Sep 19 10:39:44][chn1] Start logging thread for volkszaehler-api. Running
as daemon: no
[Sep 19 10:39:44][mtr1] Config.local: 0
[Sep 19 10:39:44][chn1] Using default volkszaehler api.
[Sep 19 10:39:45][s0] Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Sep 19 10:39:45][mtr1] Got 2 new readings from meter:
[Sep 19 10:39:45][mtr1] Reading: id=Power/StringItentifier: value=2249.74
ts=1442651985034
[Sep 19 10:39:45][mtr1] Reading: id=Impulse/StringItentifier: value=1.00
ts=1442651985034
[Sep 19 10:39:45][chn1] Buffer dump (size=0): {}
[Sep 19 10:39:45][chn1] ==> number of tuples: 0
[Sep 19 10:39:45][chn1] JSON request body is null. Nothing to send now.
----------------------------------------------------------------------------
------
Meldung aus der Console
----------------------------------------------------------------------------
------
pi at raspberrypi ~ $ sudo vzlogger
[Sep 19 10:39:44][main] vzlogger v0.4.4 based on heads/master-0-g084fa52872
from Mon, 3 Aug 2015 23:00:48 +0200 started.
[Sep 19 10:39:44][mtr0] Creating new meter with protocol random.
[Sep 19 10:39:44][mtr0] Interval has to be set and positive!
[Sep 19 10:39:44][mtr0] Meter configured, disabled.
[Sep 19 10:39:44] New meter initialized (protocol=random)
[Sep 19 10:39:44] Configure channel.
[Sep 19 10:39:44][chn0] New channel initialized (uuid=...78620a
api=volkszaehler id=)
[Sep 19 10:39:44][mtr1] Creating new meter with protocol s0.
[Sep 19 10:39:44][s0] unknown option for mmap (). Falling back to normal
gpio.
[Sep 19 10:39:44][mtr1] Meter configured, enabled.
[Sep 19 10:39:44] New meter initialized (protocol=s0)
[Sep 19 10:39:44] Configure channel.
[Sep 19 10:39:44][chn1] New channel initialized (uuid=...3ea8df
api=volkszaehler id=)
[Sep 19 10:39:44] Have 2 meters.
[Sep 19 10:39:44][main] log level is 15
[Sep 19 10:39:44][main] daemon=0, local=0
[Sep 19 10:39:44] Process not daemonized...
[Sep 19 10:39:44] Opened logfile /var/log/vzlogger.log
[Sep 19 10:39:44][push] No pushDataServer defined.
[Sep 19 10:39:44][] ===> Start meters
[Sep 19 10:39:44][mtr0] Meter for protocol 'random' is disabled. Skipping.
[Sep 19 10:39:44][s0] counter_thread created
[Sep 19 10:39:44][s0] Counter thread started with blocking hwif
[Sep 19 10:39:44][mtr1] Meter connection established
[Sep 19 10:39:44][S0] MeterS0:HWIF_GPIO:first poll returned 1
[Sep 19 10:39:44][mtr1] Meter thread started
[Sep 19 10:39:44][mtr1] Meter is opened. Starting channels.
[Sep 19 10:39:44][mtr1] Number of readers: 4
[Sep 19 10:39:44][chn1] Logging thread started
[Sep 19 10:39:44][mtr1] Config.daemon: 0
[Sep 19 10:39:44][] Startup done.
[Sep 19 10:39:44][mtr1] [Sep 19 10:39:44][chn1] Start logging thread for
volkszaehler-api. Running as daemon: no
Config.local: 0
[Sep 19 10:39:44][chn1] Using default volkszaehler api.
[Sep 19 10:39:45][s0] Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Sep 19 10:39:45][mtr1] Got 2 new readings from meter:
[Sep 19 10:39:45][mtr1] Reading: id=Power/StringItentifier: value=2249.74
ts=1442651985034
[Sep 19 10:39:45][mtr1] Reading: id=Impulse/StringItentifier: value=1.00
ts=1442651985034
[Sep 19 10:39:45][chn1] Buffer dump (size=0): {}
[Sep 19 10:39:45][chn1] ==> number of tuples: 0
[Sep 19 10:39:45][chn1] JSON request body is null. Nothing to send now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20150923/140704dc/attachment.html>
More information about the volkszaehler-users
mailing list