[vz-users] MQTT aktivieren

Christian Wulff christianwulff at gmx.de
So Aug 2 00:56:05 CEST 2020


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/0af26cbc/attachment.html>


Mehr Informationen über die Mailingliste volkszaehler-users