[vz-users] MQTT aktivieren

Frank Richter frank.richter83 at gmail.com
So Aug 2 20:10:04 CEST 2020


Kein http://, nur IP oder Hostname!

Christian Wulff <christianwulff at gmx.de> schrieb am So., 2. Aug. 2020, 20:04:

> Moin,
>
>
>
> ja, mosquitto läuft auf demselben Pi.
>
> Die IP Adresse ist http://192.168.178.10/
>
> …..oder fehlt da das http:// ???
>
>
>
> Zuerst hatte ich ja als IP Adresse: 192.168.178.10
>
> Und damit kamen folgende Fehlermeldungen:
>
> [Aug 02 00:30:17][mqtt] MqttClient::MqttClient called
>
> [Aug 02 00:30:17][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 00:30:17][mqtt] mosquitto_connect failed. res=14 (101 Network is
> unreachable)! Stopped!
>
> [Aug 02 00:30:17][mqtt] ~MqttClient called
>
> [Aug 02 00:30:17][mqtt] mqtt client not configured. stopped.
>
>
>
> Ich probier es mal mit http://localhost
>
> Damit kommen folgende Fehlermeldungen:
>
> [Aug 02 19:49:52][mqtt] MqttClient::MqttClient called
>
> [Aug 02 19:49:52][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 19:49:52][mqtt] mosquitto_connect failed. res=15! Stopped!
>
> [Aug 02 19:49:52][mqtt] ~MqttClient called
>
> [Aug 02 19:49:52][mqtt] mqtt client not configured. stopped.
>
>
>
> Ich probier es mal mit http://localhost/
>
> Damit kommen folgende Fehlermeldungen:
>
> [Aug 02 19:52:44][mqtt] MqttClient::MqttClient called
>
> [Aug 02 19:52:44][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 19:52:44][mqtt] mosquitto_connect failed. res=15! Stopped!
>
> [Aug 02 19:52:44][mqtt] ~MqttClient called
>
> [Aug 02 19:52:44][mqtt] mqtt client not configured. stopped.
>
>
>
> Ich probier es mal mit http://192.168.178.10/
>
> Damit kommen folgende Fehlermeldungen:
>
> Aug 02 19:56:11][mqtt] MqttClient::MqttClient called
>
> [Aug 02 19:56:11][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 19:56:11][mqtt] mosquitto_connect failed. res=15! Stopped!
>
> [Aug 02 19:56:11][mqtt] ~MqttClient called
>
> [Aug 02 19:56:11][mqtt] mqtt client not configured. stopped.
>
>
>
> Ich probier es mal mit http://127.0.0.1/
>
> Damit kommen folgende Fehlermeldungen:
>
> [Aug 02 20:01:13][mqtt] MqttClient::MqttClient called
>
> [Aug 02 20:01:13][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 20:01:13][mqtt] mosquitto_connect failed. res=15! Stopped!
>
> [Aug 02 20:01:13][mqtt] ~MqttClient called
>
> [Aug 02 20:01:13][mqtt] mqtt client not configured. stopped.
>
>
>
>
>
> Hmm, ich weiss nun nicht genau was das Problem ist.
>
> Einerseits steht dort, dass die Verbindung nicht klappt
>
> Andererseits dass der mqtt client nicht konfiguriert wird.
>
> In der Doku habe ich aber gelesen, dass er auch nicht konfiguriert werden
> muss.
>
>
>
> Wer weiss denn da Rat?
>
>
>
> Danke und lieben Gruß,
>
> Chris
>
>
>
>
>
>
>
> *Von:* Frank Richter <frank.richter83 at gmail.com>
> *Gesendet:* Sonntag, 2. August 2020 02:23
> *An:* volkszaehler.org - users <volkszaehler-users at demo.volkszaehler.org>
> *Betreff:* Re: [vz-users] MQTT aktivieren
>
>
>
> Stimmt denn die IP? Wenn mosquitto auf dem gleichen Pi läuft, alternativ
> mal mit 127.0.0.1 oder localhost probieren.
>
>
>
> Ich würde davon ausgehen, dass dein vzlogger MQTT-Support eincompiliert
> hat, sonst würde nix von MQTT im Log stehen.
>
>
>
> Grüße
>
> Frank
>
>
>
> Christian Wulff <christianwulff at gmx.de> schrieb am So., 2. Aug. 2020,
> 00:56:
>
> Moin,
>
>
>
> ich würde gerne den Volkszähler MQTT Messages senden lassen.
>
> Mosquitto ist auf dem RPi installiert und läuft auch.
>
> In der vzlogger.conf habe ich den mqtt client support enabled:
>
>
>
>     // mqtt client support (if ENABLE_MQTT set at cmake generation)
>
>     "mqtt": {
>
>         "enabled": true,  // enable mqtt client. needs host and port as
> well
>
>         "host": "192.168.178.10", // mqtt server addr
>
>         "port": 1883, // 1883 for unencrypted, 8883 enc, 8884 enc cert
> needed,
>
>         "cafile": "", // optional file with server CA
>
>         "capath": "", // optional path for server CAs. see mosquitto.conf.
> Specify only cafile or capath
>
>         "certfile": "", // optional file for your client certificate (e.g.
> client.crt)
>
>         "keyfile": "", // optional path for your client certficate private
> key (e.g. client.key)
>
>         "keypass": "", // optional password for your private key
>
>         "keepalive": 30, // optional keepalive in seconds.
>
>         "topic": "vzlogger/data", // optional topic dont use $ at start
> and no / at end
>
>         "user": "", // optional user name for the mqtt server
>
>         "pass": "", // optional password for the mqtt server
>
>         "retain": false, // optional use retain message flag
>
>         "rawAndAgg": false, // optional publish raw values even if agg
> mode is used
>
>         "qos": 0, // optional quality of service, default is 0
>
>         "timestamp": false // optional whether to include a timestamp in
> the payload
>
>     },
>
>
>
> Leider kommen mit Verbosity 15 folgende Meldungen in der log Datei:
>
>
>
> [Aug 02 00:30:17][mqtt] MqttClient::MqttClient called
>
> [Aug 02 00:30:17][mqtt] using libmosquitto 1.5.7
>
> [Aug 02 00:30:17][mqtt] mosquitto_connect failed. res=14 (101 Network is
> unreachable)! Stopped!
>
> [Aug 02 00:30:17][mqtt] ~MqttClient called
>
> [Aug 02 00:30:17][mqtt] mqtt client not configured. stopped.
>
>
>
> Offenbar ist etwas noch nicht korrekt konfiguriert.
>
> Leider konnte ich keine Doku finden, wie man mosquitto korrekt
> konfiguriert.
> Aus folgendem Satz werde ich nicht schlau, wahrscheinlich fehlt mir das
> Hintergrundwissen : “(if ENABLE_MQTT set at cmake generation)"
>
> Google spuckt auch nichts brauchbares aus.
>
>
>
> Wer weiss wo es hakt und was man tun muss damit es läuft?
>
>
>
> Lieben Dank und liebe Grüße,
>
> Chris
>
>
>
>
>
>
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20200802/5f103ee1/attachment-0001.html>


Mehr Informationen über die Mailingliste volkszaehler-users