Da muss ich mal blöd nachfragen, ob ich alles richtig mache.
libmosquitto-dev installiere ich mit
Code: Alles auswählen
sudo apt-get install libmosquitto-dev
Mosquitto läuft bereits:
Code: Alles auswählen
openhabian@openHABianDevice:~ $ sudo systemctl status mosquitto
● mosquitto.service - Mosquitto MQTT Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mosquitto.service.d
└─override.conf
Active: active (running) since Mon 2022-08-29 18:20:13 CEST; 1h 26min ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Main PID: 763 (mosquitto)
Tasks: 1 (limit: 3839)
CGroup: /system.slice/mosquitto.service
└─763 /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Aug 29 18:20:12 openHABianDevice systemd[1]: Starting Mosquitto MQTT Broker...
Aug 29 18:20:13 openHABianDevice systemd[1]: Started Mosquitto MQTT Broker.
Mit diesem Prozedere?
Code: Alles auswählen
sudo systemctl stop vzlogger
cd vzlogger
git pull
./install.sh vzlogger
sudo systemctl start vzlogger
Code: Alles auswählen
{
"retry" : 0, /* how long to sleep between failed requests, in seconds */
//"daemon": false,
"verbosity" : 1, /* 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" : 8090, /* the TCP port for the local HTTPd */
"index" : true, /* should we provide a index listing of available channels? */
"timeout" : 0, /* timeout for long polling comet requests, 0 disables comet, in seconds */
"buffer" : -1 /* how long to buffer readings for the local interface, in seconds */
},
"meters" : [{
"enabled" : true, /* disabled meters will be ignored */
"protocol" : "sml", /* use 'vzlogger -h' for list of available protocols */
"device" : "/dev/ttyUSB_emlog",
"interval": 10,
//"baudrate": 9600,
//"parity": "8n1",
"use_local_time": true,
//"aggtime" : -1,
//"aggfixedinterval" : false,
"channels": [{
"api": "influxdb", // use the InfluxDB api
"uuid": "fde8f1d0-c5d0-11e0-856e-f9e4360ced10",
//"middleware": "http://localhost/middleware.php",
"identifier": "1-0:16.7.0",
"host": "127.0.0.1:8086", // This assumes that InfluxDB is running on localhost
"database": "openhab_db",
"username": "vzlogger", // Optional: When InfluxDB Auth is enabled you need to set the correct user and password
"password": "vzlogger",
"measurement_name": "vz_verbrauch",
//"aggmode": "none",
"duplicates": 10
},{
"api": "influxdb", // use the InfluxDB api
"uuid": "a8da012a-9eb4-49ed-b7f3-38c95142a90c",
//"middleware": "http://localhost/middleware.php",
"identifier": "1-0:1.8.0",
"host": "127.0.0.1:8086", // This assumes that InfluxDB is running on localhost
"database": "openhab_db",
"username": "vzlogger", // Optional: When InfluxDB Auth is enabled you need to set the correct user and password
"password": "vzlogger",
"measurement_name": "vz_zstand",
//"aggmode": "none",
"duplicates": 10
}]
}
]}