[vz-users] Anfängerfrage

Karl-Otto Feger karl-otto.feger at smuldom.de
Mo Apr 20 09:42:32 CEST 2020


Sehr gerne:
pi at vz:~ $ sudo netstat -lp --inet
Aktive Internetverbindungen (Nur Server)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 localhost:mysql         0.0.0.0:*               LISTEN      504/mysqld
tcp        0      0 0.0.0.0:5582            0.0.0.0:*               LISTEN      451/php
tcp        0      0 0.0.0.0:http-alt        0.0.0.0:*               LISTEN      447/php
tcp        0      0 0.0.0.0:http            0.0.0.0:*               LISTEN      368/lighttpd
tcp        0      0 0.0.0.0:8082            0.0.0.0:*               LISTEN      451/php
tcp        0      0 0.0.0.0:ssh             0.0.0.0:*               LISTEN      456/sshd
udp        0      0 0.0.0.0:bootpc          0.0.0.0:*                           444/dhcpcd
udp        0      0 0.0.0.0:51809           0.0.0.0:*                           279/avahi-daemon: r
udp        0      0 0.0.0.0:mdns            0.0.0.0:*                           279/avahi-daemon: r

Von: volkszaehler-users <volkszaehler-users-bounces at demo.volkszaehler.org> Im Auftrag von Maik Weidemann
Gesendet: Sonntag, 19. April 2020 23:47
An: volkszaehler-users at demo.volkszaehler.org
Betreff: Re: [vz-users] Anfängerfrage

Hallo Karl-Otto,

poste doch mal das Ergebnis von diesem Kommando:
sudo netstat -lp --inet

Gruß
Maik


Am 19.04.20 um 23:05 schrieb Karl-Otto Feger:
Hallo Maik,
leider gleicher Effekt. Localhost ist nicht erreichbar:

pi at vz:~ $ wget -o haus1.txt http://localhost:8080/api
pi at vz:~ $ cat haus1.txt
--2020-04-19 23:02:44--  http://localhost:8080/api
Auflösen des Hostnamens localhost (localhost)… ::1, 127.0.0.1
Verbindungsaufbau zu localhost (localhost)|::1|:8080 … fehlgeschlagen: Verbindungsaufbau abgelehnt.
Verbindungsaufbau zu localhost (localhost)|127.0.0.1|:8080 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 400 Bad Request
2020-04-19 23:02:44 FEHLER 400: Bad Request.


Von: volkszaehler-users <volkszaehler-users-bounces at demo.volkszaehler.org><mailto:volkszaehler-users-bounces at demo.volkszaehler.org> Im Auftrag von Maik Weidemann
Gesendet: Sonntag, 19. April 2020 22:23
An: volkszaehler-users at demo.volkszaehler.org<mailto:volkszaehler-users at demo.volkszaehler.org>
Betreff: Re: [vz-users] Anfängerfrage

Hallo Karl-Otto,

wenn du versuchst das Frontend zu erreichen benutzt du den Port 8080 und nicht den Standardport 80.
Du müsstest dann ggf. http://localhost:8080/api benutzten.

Gruß
Maik
Am 19.04.20 um 22:09 schrieb Karl-Otto Feger:
Das sagt wget und Du hast recht:

pi at vz:~ $ wget -o haus1.txt http://localhost/api
pi at vz:~ $ cat haus1.txt
--2020-04-19 22:07:35--  http://localhost/api
Auflösen des Hostnamens localhost (localhost)… ::1, 127.0.0.1
Verbindungsaufbau zu localhost (localhost)|::1|:80 … verbunden.
HTTP-Anforderung gesendet, auf Antwort wird gewartet … 404 Not Found
2020-04-19 22:07:35 FEHLER 404: Not Found.




Von: volkszaehler-users <volkszaehler-users-bounces at demo.volkszaehler.org><mailto:volkszaehler-users-bounces at demo.volkszaehler.org> Im Auftrag von Andreas Goetz
Gesendet: Sonntag, 19. April 2020 21:58
An: volkszaehler.org - users <volkszaehler-users at demo.volkszaehler.org><mailto:volkszaehler-users at demo.volkszaehler.org>
Betreff: Re: [vz-users] Anfängerfrage

…das sagt allerdings nichts darüber ob es lokal unter "http://localhost/api” erreichbar ist. Laut Logfile ja anscheinend nicht?!

Viele Grüße, Andreas





On 19. Apr 2020, at 21:56, Karl-Otto Feger <karl-otto.feger at smuldom.de<mailto:karl-otto.feger at smuldom.de>> wrote:

Da ich den RasPi headless betreibe kann ich nur aus meinem Netzwerk drauf.
Daher:
Antwort von 192.168.100.179:8080/api ist

„{"version":"0.3","exception":{"message":"Missing format","type":"Exception","code":0}}“



Also ja, erreichbar.

Gruß

ottO

Von: volkszaehler-users <volkszaehler-users-bounces at demo.volkszaehler.org<mailto:volkszaehler-users-bounces at demo.volkszaehler.org>> Im Auftrag von Andreas Goetz
Gesendet: Sonntag, 19. April 2020 21:37
An: volkszaehler.org<http://volkszaehler.org> - users <volkszaehler-users at demo.volkszaehler.org<mailto:volkszaehler-users at demo.volkszaehler.org>>
Betreff: Re: [vz-users] Anfängerfrage

Öffne mal localhost/api im Browser- geht das? Geht es ohne /api?

Viele Grüße, Andreas






On 19. Apr 2020, at 21:22, Karl-Otto Feger <karl-otto.feger at smuldom.de<mailto:karl-otto.feger at smuldom.de>> wrote:

Hallo Alle,
ich habe die ersten Schritte mit VZ gemacht und das RasPi-Image (7.7.2019) benutzt. Damit läuft vzlogger 0.8.0, das Frontend funktioniert.
Mein Zähler liefert sml mit den ObisIDs 1.8.0, 1.8.1, 1.8.2 … und, der interessiert mich zuerst, 16.7.0. Im log stehen folgende Daten (Auszug):
…
[Apr 19 20:50:15][mtr0] Got 7 new readings from meter:
[Apr 19 20:50:15][mtr0] Reading: id=1-0:1.8.0*255/ObisIdentifier:1-0:1.8.0*255 value=796802.80 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:1.8.1*255/ObisIdentifier:1-0:1.8.1*255 value=433872.20 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:1.8.2*255/ObisIdentifier:1-0:1.8.2*255 value=362930.60 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:2.8.0*255/ObisIdentifier:1-0:2.8.0*255 value=0.00 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:2.8.1*255/ObisIdentifier:1-0:2.8.1*255 value=0.00 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:2.8.2*255/ObisIdentifier:1-0:2.8.2*255 value=0.00 ts=2797728000
[Apr 19 20:50:15][mtr0] Reading: id=1-0:16.7.0*255/ObisIdentifier:1-0:16.7.0*255 value=1234.00 ts=1587322215556
[Apr 19 20:50:15][chn0] Adding reading to queue (value=1234.00 ts=1587322215556)
[Apr 19 20:50:15][MAX]  1234.000000 @ 1587322215556
[Apr 19 20:50:15][MAX]  RESULT 1234.000000 @ 1587322215556
[Apr 19 20:50:15][chn0] ==> number of tuples: 1
…
Der eintrag „RESULT“ sagt mir (glaube ich..), dass meine .conf das macht, was ich möchte. Allerdings tauchen die Daten nicht im Frontend auf, denn auch im Log steht folgende Fehlermeldung:
…
[Apr 19 20:50:15][chn0] CURL: Received '<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>404 Not Found</title>
</head>
<body>
  <h1>404 Not Found</h1>
</body>
</html>
' bytes
[Apr 19 20:50:15][chn0] CURL: Closing connection 11
[Apr 19 20:50:15][chn0] CURL Error from middleware: unexpected character
[Apr 19 20:50:15][chn0] Waiting 0 secs for next request due to previous failure

Ich habe keine Idee und auch nichts gefunden, was den Fehler aus der Middleware erklärt.
Hier meine .conf:
***************************************
{
  "retry": 0,
  "daemon": false,
  "verbosity": 15,
  "log": "/home/pi/haus1.log",
  "local": {
    "enabled": false,
    "port": 8080,
    "index": false,
    "timeout": 0,
    "buffer": 0
  },
"meters" : [{
                "protocol" : "sml",
                "enabled" : true,
                "device" : "/dev/lesekopf0",
                "parity" : "8N1",
                "baudrate" : 9600,
                "aggtime" : -1,
                "aggfixedinterval" : true,
                "channels": [{
                               "uuid" : "6a98c1a0-825b-11ea-b2ab-b5242325867d",
                               "middleware" : "http://localhost/api",
                               "identifier" : "1-0:16.7.0",
                               "aggmode" : "MAX"
                               }]
                }
]
}
*************************************************
Vielleicht eine dumme Frage. Wenn ja, dann verzeiht einem Anfänger.
ottO



-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20200420/5c35a5b5/attachment-0001.html>


More information about the volkszaehler-users mailing list