[vz-users] vzlogger aggmode mit s0

Karlheinz karlheinz.es at gmx.de
Fri Sep 18 15:46:35 CEST 2015


Hallo,

jetzt habe ich schon einiges probiert, aber leider noch nicht die 
richtige Einstellung für eine Zusammenfassung (60 Sekunden) von 
S0-Impulsen und Anzeige mit dem local-vzlogger-httpd gefunden.
Mit
             "aggtime": 60,  // aggregate all signals and give one 
update to midd
             "aggmode": "SUM",
unter channels werden die Impulse komplett addiert. Unter "value" steht 
im Log immer nur 899.76 bei zwei Impulsen oder 1799.76 bei einem Impuls??

s. LOG:
...
[Sep 18 15:18:22][mtr1] Got 2 new readings from meter:
[Sep 18 15:18:22][mtr1] Reading: id=Power/StringItentifier: value=899.76 
ts=1442
[Sep 18 15:18:22][mtr1] Reading: id=Impulse/StringItentifier: value=2.00 
ts=1442
[Sep 18 15:18:22][chn1] Adding reading to queue (value=2.00 
ts=1442582302281)
[Sep 18 15:18:22][SUM]  1506.000000 @ 1442582301280
[Sep 18 15:18:22][SUM]  2.000000 @ 1442582302281
[Sep 18 15:18:22][SUM]  RESULT 1508.000000 @ 1442582302281
[Sep 18 15:18:22][chn1] Buffer dump (size=1): {1508.0000,}
[Sep 18 15:18:22][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Sep 18 15:18:23][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
[Sep 18 15:18:23][mtr1] Got 2 new readings from meter:
[Sep 18 15:18:23][mtr1] Reading: id=Power/StringItentifier: 
value=1799.76 ts=144
[Sep 18 15:18:23][mtr1] Reading: id=Impulse/StringItentifier: value=1.00 
ts=1442
[Sep 18 15:18:23][chn1] Adding reading to queue (value=1.00 
ts=1442582303281)
[Sep 18 15:18:23][SUM]  1508.000000 @ 1442582302281
[Sep 18 15:18:23][SUM]  1.000000 @ 1442582303281
[Sep 18 15:18:23][SUM]  RESULT 1509.000000 @ 1442582303281
[Sep 18 15:18:23][chn1] Buffer dump (size=1): {1509.0000,}
[Sep 18 15:18:23][S0]   MeterS0:HWIF_GPIO:first poll returned 1
[Sep 18 15:18:23][S0]   MeterS0:HWIF_GPIO:first poll returned 1
...
Der lokale vzlogger-daemon zeigt sekündlich ändernde Werte anstatt pro 
Minute einen Wert:

{ "version": "0.4.4", "generator": "vzlogger", "data": [ { "uuid": "7836dd20-00d5-11e0-bab1-856ed5f95918", "last": 0, "interval": -1, "protocol": "s0" }, { "uuid": "7836dd20-00d5-11e0-bab1-856ed5f95919", "last": 1442582613335, "interval": -1, "protocol": "s0", "tuples": [ [ 1442582554325, 1805.000000 ], [ 1442582555325, 1806.000000 ], [ 1442582556325, 1807.000000 ], [ 1442582557325, 1808.000000 ], [ 1442582558325, 1809.000000 ], [ 1442582559326, 1810.000000 ], [ 1442582560326, 1811.000000 ], [ 1442582561326, 1812.000000 ], [ 1442582562326, 1813.000000 ], [ 1442582563326, 1814.000000 ], [ 1442582564326, 1815.000000 ], [ 1442582565327, 1816.000000 ], [ 1442582566327, 1817.000000 ], [ 1442582567327, 1818.000000 ], [ 1442582568327, 1819.000000 ], [ 1442582569327, 1820.000000 ], [ 1442582570327, 1821.000000 ], [ 1442582571328, 1822.000000 ], [ 1442582572328, 1823.000000 ], [ 1442582573328, 1824.000000 ], [ 1442582574328, 1826.000000 ], [ 1442582576328, 1827.000000 ], [ 1442582577329, 1828.000000 ], [ 1442582578329, 1829.000000 ], [ 1442582579329, 1830.000000 ], [ 1442582580329, 1831.000000 ], [ 1442582581329, 1832.000000 ], [ 1442582582330, 1833.000000 ], [ 1442582583330, 1834.000000 ], [ 1442582584330, 1835.000000 ], [ 1442582585330, 1836.000000 ], [ 1442582586330, 1837.000000 ], [ 1442582587330, 1838.000000 ], [ 1442582588331, 1840.000000 ], [ 1442582589331, 1841.000000 ], [ 1442582590331, 1842.000000 ], [ 1442582591331, 1843.000000 ], [ 1442582592331, 1844.000000 ], [ 1442582593332, 1845.000000 ], [ 1442582594332, 1846.000000 ], [ 1442582595332, 1847.000000 ], [ 1442582596332, 1848.000000 ], [ 1442582597332, 1849.000000 ], [ 1442582598332, 1850.000000 ], [ 1442582599333, 1851.000000 ], [ 1442582600333, 1852.000000 ], [ 1442582601333, 1854.000000 ], [ 1442582602333, 1855.000000 ], [ 1442582603333, 1856.000000 ], [ 1442582604333, 1857.000000 ], [ 1442582605334, 1858.000000 ], [ 1442582606334, 1859.000000 ], [ 1442582607334, 1860.000000 ], [ 1442582608334, 1862.000000 ], [ 1442582609334, 1863.000000 ], [ 1442582610335, 1864.000000 ], [ 1442582611335, 1865.000000 ], [ 1442582612335, 1866.000000 ], [ 1442582613335, 1867.000000 ] ] } ] }

Hat jemand einen Tip für mich?

Gruß
Karlheinz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20150918/f312625f/attachment.html>
-------------- next part --------------
{
"retry" : 30,			/* how long to sleep between failed requests, in seconds */
"daemon": false ,		/* run periodically */
"verbosity" : 15,		/* between 0 and 15 */
//"log" : "/var/log/vzlogger.log",/* path to logfile, optional */
"log" : "/home/pi/vzloggers0.log",/* path to logfile, optional */

"local" : {
    "enabled" : true,	/* should we start the local HTTPd for serving live readings? */
    "port" : 8081,		/* the TCP port for the local HTTPd */
    "index" : true,		/* should we provide a index listing of available channels if no UUID was requested? */
    "timeout" : 30,		/* timeout for long polling comet requests, 0 disables comet, in seconds */
    "buffer" : 60		/* default=600 how long to buffer readings for the local interface, in seconds */
//    "buffer" : -1		/* negative values: how many readings for the local interface */

},

"meters" : [
    {
    "enabled" : false , // Beginn S0
    "skip": false,
    "protocol" : "s0", 
    "mode" : "gpio",         // neu 6.9.15
    "aggtime": 60,  // aggregate all signals and give one update to middleware every x seconds
    "device": "sys/class/gpio/gpio18/value",
//    "device" : "/dev/ttyAMA0",
//    "interval" : 30, // Wartezeit bis zum nächsten Pull
	"channels": [{
	    "api" : "NULL" ,
	    "uuid" : "7836dd20-00d5-11e0-bab1-856ed5f95918",
//	    "uuid" : "S0_PV",
            "identifier" : "Impulse", /* Impulszähler */
	    "aggmode": "SUM"
//            "middleware" : "http://localhost",
            }]
    },{
    "enabled" : true , // 11.9. nach http://wiki.volkszaehler.org/hardware/controllers/raspberry_pi_erweiterung_mit_schaltausgaengen#bestueckungsplan_und_anschlussplan
    "allowskip": false,
    "protocol" : "s0", 
    "resolution": 2000, // Kostal Piko 2000 Imp pro kWh
    "gpio": 18,
    "configureGPIO": true,
    "debounce_delay": 0,
//    "mode" : "gpio", 
    "interval": -1,
//    "aggtime": 60,  // aggregate all signals and give one update to middleware every x seconds
//    "aggmode": "SUM",
//    "device": "sys/class/gpio/gpio18/value",
//    "device" : "/dev/ttyAMA0",
//    "interval" : 30, // Wartezeit bis zum nächsten Pull
	"channels": [{
	    "api" : "NULL" ,
	    "uuid" : "7836dd20-00d5-11e0-bab1-856ed5f95919",
//	    "uuid" : "S0_PV",
            "identifier" : "Impulse", /* Impulszähler */
            "type": "device",
	    "scaler": 1, 	// neu
	    "aggtime": 60,  // aggregate all signals and give one update to middleware every x seconds
	    "aggmode": "SUM",   // 160915 "SUM"
//	    "aggmode": "none",   // 160915 "SUM"
//            "middleware" : "http://localhost",
	    "duplicates": 0	// neu

            }]


    }]
}


More information about the volkszaehler-users mailing list