[vz-dev] vzlogger - neuer Meter & Entwicklungsumgebung

Nico Prenzel nico.prenzel at pn-systeme.de
Tue Apr 23 17:21:58 CEST 2013


Hi Peter,

danke für die Info.
Dann werde ich mir meine Eclipse-Umgebung um CDT erweitern müssen. Hat schon jemand Erfahrung gesammelt mit dem Remote-Debugger in Eclipse CDT? Entwickeln würde ich nämlich gerne unter Windows (dann in Eclipse mit CDT) und Laufen soll der vzlogger natürlich unter Linux.

Danke auch für die Info zu deinem git Clone. Ich meine, den auch schon vorher gefunden zu haben. Allerdings wollte ich bisher davon absehen diesen als Entwicklungsbasis zu verwenden, da ich mir nicht sicher bin, ob ich dann meinen Code auch in das "offizielle" vzlogger-Projekt aufgenommen bekomme. Wie stehen denn da meine Chancen? Kann mir dazu jemand etwas sagen?

Auch vielen Dank für die Info's zu den Identifier.
Ich werde wohl meine Entwicklung zuerstmal in deinem git clone austesten und schauen wie weit ich damit komme.

Gruß
NicoP.


-----volkszaehler-dev-bounces at lists.volkszaehler.org schrieb: ----- 
An: "volkszaehler.org" <volkszaehler-dev at lists.volkszaehler.org>
Von: Peter Evertz 
Gesendet von: volkszaehler-dev-bounces at lists.volkszaehler.org
Datum: 23.04.2013 16:41
Betreff: Re: [vz-dev] vzlogger - neuer Meter & Entwicklungsumgebung


Am 23.04.2013 09:30, schrieb Nico Prenzel:
> Hallo volkszaehler Community,
>
> aktuell bin ich damit beschäftigt einen Meter für den vzlogger zu entwickeln.
> Es handelt sich dabei um das RF-Soap Modul von seegel-systeme. Wurde ja hier auf der Mailingliste schon mehrfach darüber berichtet:
> http://volkszaehler.org/pipermail/volkszaehler-dev/2012-March/001638.html
> http://volkszaehler.org/pipermail/volkszaehler-dev/2012-February/001521.html
>
> Da ich aber auch schon mehrere Fehler im vzlogger leidlich finden musste, möchte ich mich erstmal um eine anständige Entwicklungsumgebung mit Debug-Funktionalität kümmern. Was für eine IDE setzt ihr denn bisher für die vzlogger Entwicklung ein?
Ich entwickle unter eclipse und bin auch schon über den einen oder 
anderen Fehler gestolpert. Vielleicht schaust Du mal in mein git:
https://github.com/peterevertz/vzlogger/commits/master
Da sind schon diverse "fixes" drin.

Zu den Identifiern: Die sind im Orginal bis auf den ObisIdentifier 
kaputt ! Da werden immer pointer verglichen, wenn eigentlich der Inhalt 
verglichen werden sollte!

>
>
> Zum Problem mit dem neuen MeterEMT7110:
> Immerhin habe ich es schonmal geschafft, das RF-Soap Modul anzubinden und die gewünschten Daten auszulesen. Nur habe ich jetzt Schwierigkeiten die empfangenen Daten korrekt in der middleware zu speichern. Irgendwo bei der Zuordnung von gemessenem/empfangen Wert und dem Channel stimmt etwas nicht.
> Evtl. verwende ich auch den falschen Identifier bzw. StringItentifier!? Kann mir dabei jemand weiterhelfen. Ich stehe wohl auf dem Schlauch für was genau die StringItentifier oder NilItentifier usw. eingesetzt werden sollen.
>
>
> Meine vzlogger.conf meter Konfiguration:
> "meters" : [{
>
> "enabled" : true, /* disabled meters will be ignored */
> "protocol" : "emt7110",
> "device" : "/dev/ttyUSB0",
> "rewind" : false, /* reset file pointer each interval to the beginning of the file */
> "channels" : [{
> "uuid" : "4bf20df0-a908-11e2-9738-b760d94f1697",
> "middleware" : "http://localhost/volkszaehler/middleware.php",
> "identifier" : "Power",
> }, {
> "uuid" : "202db620-a908-11e2-b294-916f2f6ce2d1",
> "middleware" : "http://localhost/volkszaehler/middleware.php",
> "identifier" : "Current"
> }, {
> "uuid" : "e1174720-a8e5-11e2-931c-11b4ee8cbd76",
> "middleware" : "http://localhost/volkszaehler/middleware.php",
> "identifier" : "Work"
> }, {
> "uuid" : "5709e440-a8ef-11e2-9329-ade263902dc5",
> "middleware" : "http://localhost/volkszaehler/middleware.php",
> "identifier" : "Voltage"
> }]
> }]
> }
>
> Anbei poste ich mal mein Logging. Vielleicht kann man mir damit schon jemand weiterhelfen.
>
> [Apr 21 13:47:05][]     MeterEMT7110::read: '{"ID":"EMT::256A54A1","READINGS":[{"NAME":"Power","SYMBOL":"P","VALUE":1,"UNIT":"W"},{"NAME":"Current","SYMBOL":"I","VALUE":70,"UNIT":"mA"},{"NAME":"Voltage","SYMBOL":"U","VALUE":227.5,"UNIT":"V"},{"NAME":"Work","SYMBOL":"W","VALUE":4800,"UNIT":"Wh"}],"DUMP":"256A54A140020046C741E00C"}'
> [Apr 21 13:47:05]       key: ID value: EMT::256A54A1 type: string
> [Apr 21 13:47:05]       key: READINGS value: [ { "NAME": "Power", "SYMBOL": "P", "VALUE": 1, "UNIT": "W" }, { "NAME": "Current", "SYMBOL": "I", "VALUE": 70, "UNIT": "mA" }, { "NAME": "Voltage", "SYMBOL": "U", "VALUE": 227.500000, "UNIT": "V" }, { "NAME": "Work", "SYMBOL": "W", "VALUE": 4800, "UNIT": "Wh" } ] type: array
> [Apr 21 13:47:05]       key: DUMP value: 256A54A140020046C741E00C type: string
> [Apr 21 13:47:05][mtr0] Got 4 new readings from meter:
> [Apr 21 13:47:05][mtr0] mtr->name(): mtr0
> [Apr 21 13:47:05][mtr0] identifier: Power
> [Apr 21 13:47:05][mtr0] rds[i].identifier()->toString().c_str(): StringItentifier:
> [Apr 21 13:47:05][mtr0] rds[i].value(): 1.00
> [Apr 21 13:47:05][mtr0] rds[i].tvtod(): 1366544825.926
> [Apr 21 13:47:05][mtr0] Reading: id=Power/StringItentifier: value=1.00 ts=1366544825.926
> [Apr 21 13:47:05][mtr0] mtr->name(): mtr0
> [Apr 21 13:47:05][mtr0] identifier: Current
> [Apr 21 13:47:05][mtr0] rds[i].identifier()->toString().c_str(): StringItentifier:
> [Apr 21 13:47:05][mtr0] rds[i].value(): 70.00
> [Apr 21 13:47:05][mtr0] rds[i].tvtod(): 1366544825.926
> [Apr 21 13:47:05][mtr0] Reading: id=Current/StringItentifier: value=70.00 ts=1366544825.926
> [Apr 21 13:47:05][mtr0] mtr->name(): mtr0
> [Apr 21 13:47:05][mtr0] identifier: Voltage
> [Apr 21 13:47:05][mtr0] rds[i].identifier()->toString().c_str(): StringItentifier:
> [Apr 21 13:47:05][mtr0] rds[i].value(): 227.50
> [Apr 21 13:47:05][mtr0] rds[i].tvtod(): 1366544825.926
> [Apr 21 13:47:05][mtr0] Reading: id=Voltage/StringItentifier: value=227.50 ts=1366544825.926
> [Apr 21 13:47:05][mtr0] mtr->name(): mtr0
> [Apr 21 13:47:05][mtr0] identifier: Work
> [Apr 21 13:47:05][mtr0] rds[i].identifier()->toString().c_str(): StringItentifier:
> [Apr 21 13:47:05][mtr0] rds[i].value(): 4800.00
> [Apr 21 13:47:05][mtr0] rds[i].tvtod(): 1366544825.926
> [Apr 21 13:47:05][mtr0] Reading: id=Work/StringItentifier: value=4800.00 ts=1366544825.926
> [Apr 21 13:47:05][mtr0] Check channel , n=4
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn0] Adding reading to queue (value=1.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn0] Adding reading to queue (value=70.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn0] Adding reading to queue (value=227.50 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn0] Adding reading to queue (value=4800.00 ts=1366544825.926)
> [Apr 21 13:47:05][chn0] ==> number of tuples: 4
> [Apr 21 13:47:05][chn0] compare: 1366544810926 1366544825926 1366544825926.152100
> [Apr 21 13:47:05][chn0] compare: 1366544825926 1366544825926 1366544825926.176025
> [Apr 21 13:47:05][chn0] compare: 1366544825926 1366544825926 1366544825926.188965
> [Apr 21 13:47:05][chn0] compare: 1366544825926 1366544825926 1366544825926.199951
> [Apr 21 13:47:05][chn0] JSON request body: [ [ 1366544825926.152100, 1.000000 ] ]
> [Apr 21 13:47:05][chn0] CURL: Found bundle for host localhost: 0x94d72f0
> [Apr 21 13:47:05][chn0] CURL: Connection 20 seems to be dead!
> [Apr 21 13:47:05][chn0] CURL: Closing connection 20
> [Apr 21 13:47:05][chn0] CURL: About to connect() to localhost port 80 (#24)
> [Apr 21 13:47:05][chn0] CURL:   Trying 127.0.0.1...
> [Apr 21 13:47:05][chn0] CURL: Adding handle: conn: 0x951f600
> [Apr 21 13:47:05][chn0] CURL: Adding handle: send: 0
> [Apr 21 13:47:05][chn0] CURL: Adding handle: recv: 0
> [Apr 21 13:47:05][chn0] CURL: Curl_addHandleToPipeline: length: 1
> [Apr 21 13:47:05][chn0] CURL: - Conn 24 (0x951f600) send_pipe: 1, recv_pipe: 0
> [Apr 21 13:47:05][chn0] CURL: Connected to localhost (127.0.0.1) port 80 (#24)
> [Apr 21 13:47:05][chn0] CURL: Sent 38 bytes..
> [Apr 21 13:47:05][chn0] CURL: Sent '[ [ 1366544825926.152100, 1.000000 ] ]' bytes
> [Apr 21 13:47:05][chn0] CURL: upload completely sent off: 38 out of 38 bytes
> [Apr 21 13:47:05][chn0] Buffer dump (size=2 keep=32): {70.0000,4800.0000,}
> [Apr 21 13:47:05][mtr0] Check channel , n=4
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn1] Adding reading to queue (value=1.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn1] Adding reading to queue (value=70.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn1] Adding reading to queue (value=227.50 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn1] Adding reading to queue (value=4800.00 ts=1366544825.926)
> [Apr 21 13:47:05][chn1] ==> number of tuples: 4
> [Apr 21 13:47:05][chn1] compare: 1366544810926 1366544825926 1366544825926.152100
> [Apr 21 13:47:05][chn1] compare: 1366544825926 1366544825926 1366544825926.176025
> [Apr 21 13:47:05][chn1] compare: 1366544825926 1366544825926 1366544825926.188965
> [Apr 21 13:47:05][chn1] compare: 1366544825926 1366544825926 1366544825926.199951
> [Apr 21 13:47:05][chn1] JSON request body: [ [ 1366544825926.152100, 1.000000 ] ]
> [Apr 21 13:47:05][chn1] CURL: Found bundle for host localhost: 0x951cd20
> [Apr 21 13:47:05][chn1] CURL: Connection 21 seems to be dead!
> [Apr 21 13:47:05][chn1] CURL: Closing connection 21
> [Apr 21 13:47:05][chn1] CURL: About to connect() to localhost port 80 (#25)
> [Apr 21 13:47:05][chn1] CURL:   Trying 127.0.0.1...
> [Apr 21 13:47:05][chn1] CURL: Adding handle: conn: 0x951fab0
> [Apr 21 13:47:05][chn1] CURL: Adding handle: send: 0
> [Apr 21 13:47:05][chn1] CURL: Adding handle: recv: 0
> [Apr 21 13:47:05][chn1] CURL: Curl_addHandleToPipeline: length: 1
> [Apr 21 13:47:05][chn1] CURL: - Conn 25 (0x951fab0) send_pipe: 1, recv_pipe: 0
> [Apr 21 13:47:05][chn1] CURL: Connected to localhost (127.0.0.1) port 80 (#25)
> [Apr 21 13:47:05][chn1] CURL: Sent 38 bytes..
> [Apr 21 13:47:05][chn1] CURL: Sent '[ [ 1366544825926.152100, 1.000000 ] ]' bytes
> [Apr 21 13:47:05][chn1] CURL: upload completely sent off: 38 out of 38 bytes
> [Apr 21 13:47:05][chn1] Buffer dump (size=2 keep=32): {70.0000,4800.0000,}
> [Apr 21 13:47:05][mtr0] Check channel , n=4
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn2] Adding reading to queue (value=1.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn2] Adding reading to queue (value=70.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn2] Adding reading to queue (value=227.50 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn2] Adding reading to queue (value=4800.00 ts=1366544825.926)
> [Apr 21 13:47:05][chn2] ==> number of tuples: 4
> [Apr 21 13:47:05][chn2] compare: 1366544810926 1366544825926 1366544825926.152100
> [Apr 21 13:47:05][chn2] compare: 1366544825926 1366544825926 1366544825926.176025
> [Apr 21 13:47:05][chn2] compare: 1366544825926 1366544825926 1366544825926.188965
> [Apr 21 13:47:05][chn2] compare: 1366544825926 1366544825926 1366544825926.199951
> [Apr 21 13:47:05][chn2] JSON request body: [ [ 1366544825926.152100, 1.000000 ] ]
> [Apr 21 13:47:05][chn2] CURL: Found bundle for host localhost: 0x951d060
> [Apr 21 13:47:05][chn2] CURL: Connection 22 seems to be dead!
> [Apr 21 13:47:05][chn2] CURL: Closing connection 22
> [Apr 21 13:47:05][chn2] CURL: About to connect() to localhost port 80 (#26)
> [Apr 21 13:47:05][chn2] CURL:   Trying 127.0.0.1...
> [Apr 21 13:47:05][chn2] CURL: Adding handle: conn: 0x951eca0
> [Apr 21 13:47:05][chn2] CURL: Adding handle: send: 0
> [Apr 21 13:47:05][chn2] CURL: Adding handle: recv: 0
> [Apr 21 13:47:05][chn2] CURL: Curl_addHandleToPipeline: length: 1
> [Apr 21 13:47:05][chn2] CURL: - Conn 26 (0x951eca0) send_pipe: 1, recv_pipe: 0
> [Apr 21 13:47:05][chn2] CURL: Connected to localhost (127.0.0.1) port 80 (#26)
> [Apr 21 13:47:05][chn2] CURL: Sent 38 bytes..
> [Apr 21 13:47:05][chn2] CURL: Sent '[ [ 1366544825926.152100, 1.000000 ] ]' bytes
> [Apr 21 13:47:05][chn2] CURL: upload completely sent off: 38 out of 38 bytes
> [Apr 21 13:47:05][chn2] Buffer dump (size=2 keep=32): {70.0000,4800.0000,}
> [Apr 21 13:47:05][mtr0] Check channel , n=4
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn3] Adding reading to queue (value=1.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn3] Adding reading to queue (value=70.00 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn3] Adding reading to queue (value=227.50 ts=1366544825.926)
> [Apr 21 13:47:05][mtr0] found channel
> [Apr 21 13:47:05][chn3] Adding reading to queue (value=4800.00 ts=1366544825.926)
> [Apr 21 13:47:05][chn3] ==> number of tuples: 4
> [Apr 21 13:47:05][chn3] compare: 1366544810926 1366544825926 1366544825926.152100
> [Apr 21 13:47:05][chn3] compare: 1366544825926 1366544825926 1366544825926.176025
> [Apr 21 13:47:05][chn3] compare: 1366544825926 1366544825926 1366544825926.188965
> [Apr 21 13:47:05][chn3] compare: 1366544825926 1366544825926 1366544825926.199951
> [Apr 21 13:47:05][chn3] JSON request body: [ [ 1366544825926.152100, 1.000000 ] ]
> [Apr 21 13:47:05][chn3] CURL: Found bundle for host localhost: 0x94f9100
> [Apr 21 13:47:05][chn3] CURL: Connection 23 seems to be dead!
> [Apr 21 13:47:05][chn3] CURL: Closing connection 23
> [Apr 21 13:47:05][chn3] CURL: About to connect() to localhost port 80 (#27)
> [Apr 21 13:47:05][chn3] CURL:   Trying 127.0.0.1...
> [Apr 21 13:47:05][chn3] CURL: Adding handle: conn: 0x9520068
> [Apr 21 13:47:05][chn3] CURL: Adding handle: send: 0
> [Apr 21 13:47:05][chn3] CURL: Adding handle: recv: 0
> [Apr 21 13:47:05][chn3] CURL: Curl_addHandleToPipeline: length: 1
> [Apr 21 13:47:05][chn3] CURL: - Conn 27 (0x9520068) send_pipe: 1, recv_pipe: 0
> [Apr 21 13:47:05][chn3] CURL: Connected to localhost (127.0.0.1) port 80 (#27)
> [Apr 21 13:47:05][chn3] CURL: Sent 38 bytes..
> [Apr 21 13:47:05][chn3] CURL: Sent '[ [ 1366544825926.152100, 1.000000 ] ]' bytes
> [Apr 21 13:47:05][chn3] CURL: upload completely sent off: 38 out of 38 bytes
> [Apr 21 13:47:05][chn3] Buffer dump (size=2 keep=32): {70.0000,4800.0000,}
> [Apr 21 13:47:06][chn3] CURL: Server Apache/2.2.22 (Debian) is not blacklisted
> [Apr 21 13:47:06][chn3] CURL: Received 17 bytes
> [Apr 21 13:47:06][chn3] CURL: Received '{"version":"0.2"}' bytes
> [Apr 21 13:47:06][chn3] CURL: Connection #27 to host localhost left intact
> [Apr 21 13:47:06][chn3] CURL Request succeeded with code: 200
> [Apr 21 13:47:06][chn2] CURL: Server Apache/2.2.22 (Debian) is not blacklisted
> [Apr 21 13:47:06][chn2] CURL: Received 17 bytes
> [Apr 21 13:47:06][chn2] CURL: Received '{"version":"0.2"}' bytes
> [Apr 21 13:47:06][chn2] CURL: Connection #26 to host localhost left intact
> [Apr 21 13:47:06][chn2] CURL Request succeeded with code: 200
> [Apr 21 13:47:06][chn0] CURL: Server Apache/2.2.22 (Debian) is not blacklisted
> [Apr 21 13:47:06][chn0] CURL: Received 17 bytes
> [Apr 21 13:47:06][chn0] CURL: Received '{"version":"0.2"}' bytes
> [Apr 21 13:47:06][chn0] CURL: Connection #24 to host localhost left intact
> [Apr 21 13:47:06][chn0] CURL Request succeeded with code: 200
> [Apr 21 13:47:06][chn1] CURL: Server Apache/2.2.22 (Debian) is not blacklisted
> [Apr 21 13:47:06][chn1] CURL: Received 17 bytes
> [Apr 21 13:47:06][chn1] CURL: Received '{"version":"0.2"}' bytes
> [Apr 21 13:47:06][chn1] CURL: Connection #25 to host localhost left intact
> [Apr 21 13:47:06][chn1] CURL Request succeeded with code: 200
>
>
> Vielen Danke & viele Grüße
>
> Nico Prenzel


More information about the volkszaehler-dev mailing list