~~pi@raspberrypi ~ $ echo $'\x2f\x3f\x21\x0d' > /dev/ttyAMA0
pi@raspberrypi ~ $ /
/PAF5EC3gr00006
pi@raspberrypi ~ $ echo $'\x06\x30\x30\x30\x0d' > /dev/ttyAMA0
pi@raspberrypi ~ $ �00
�0.0.0(71579777)
0.0.1(PAF)
F.F(00)
0.2.0(1.27)
1.8.0*00(001146.55)
2.8.0*00(000889.21)
C.2.1(000000000000)( )
0.2.2(:::::G11)!
��
---------------------------------------------------------------------------------------
1.8.0 und 2.8.0 sind ja Bezug und Einspeisung, also das was ich haben möchte.
Nun zum vzlogger; hier erhalte ich folgende Fehlermeldung:
--------------------------------------------------------------------------------
Error in /etc/vzlogger.conf:41 object property name separator ':' expected at offset 9
Failed to parse configuration due to: Parse configuaration failed.
-------------------------------------------------------------------------------
Die Fehlermeldung kann ich erstmal nicht nachvollziehen, da ich den Syntaxfahler so nicht erkenne.
Hier die vzlogger.conf dazu:
----------------------------------------------------------------------------------------------------------------------
/**
* vzlogger configuration
*
* use proper encoded JSON with _javascript_ comments
*
* take a look at the wiki for detailed information:
* http://wiki.volkszaehler.org/software/controller/vzlogger#configuration
*/
{
"retry" : 30, /* how long to sleep between failed requests, in seconds */
"daemon": true, /* run periodically for true*/
//"foreground" : true, /* dont run in background (prevents forking) */
"verbosity" : 15, /* between 0 and 15 */
"log" : "/var/log/vzlogger.log",/* path to logfile, optional */
"local" : {
// "enabled" : false, /* should we start the local HTTPd for serving live readings? */
"port" : 8080, /* 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" : 600 /* how long to buffer readings for the local interface, in seconds */
},
"meters" : [
{
"protocol" : "random",
"enabled" : true,
"interval" : 60,
"max" : 40.0, /* has to be double! */
"min" : -5.0, /* has to be double! */
"channel" : {
"uuid" : "a301d8d0-903b-1234-94bb-d943d061b6a8",
"middleware" : "http://localhost/middleware.php"
}
},
{
"protocol" : "d0",
"enabled" : true,
"device" : "/dev/ttyAMA0",
"interval" : 60,
"channel" : {
"uuid" : "a301d8d0-903b-1234-94bb-d943d061b6a8",
"middleware" : "http://localhost/middleware.php"
} }]}
--------------------------------------------------------------------------------------------------------------------------
Den "random" habe ich drin gelassen um zu sehen, ob der vzlogger prinzipiell funktioniert. Das tut er. Woher kommt der Fehler was mache ich falsch?
So wie ich das sehe, muss ich den vzlogger zum "zuhören" bekommen und dann den Zähler anstoßen, damit er Daten sendet; habe ich das so richtig verstanden?
Oder muss ich ganz auf den vzclient oder ähnliches umsteigen, von dem ich bisher noch keine Ahnung habe?
Bin für jeden Tip dankbar.
