Ich habe diesen Befehl genutzt:
Code: Alles auswählen
openhabian@openhabian:~ $ sudo nano /etc/mosquitto/mosquitto.conf
Dann kam diese Datei:
Code: Alles auswählen
GNU nano 5.4 /etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
password_file /etc/mosquitto/passwd
listener 1883
allow_anonymous false
Ich habe in der letzten Zeile false durch true ersetzt.
Code: Alles auswählen
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
pid_file /run/mosquitto/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
password_file /etc/mosquitto/passwd
listener 1883
allow_anonymous true
Dann deinen Neustartbefehl und das Testtopic klappt:
Code: Alles auswählen
openhabian@openhabian:/opt/zigbee2mqtt $ mosquitto_sub -d -t testTopic
Client (null) sending CONNECT
Client (null) received CONNACK (0)
Client (null) sending SUBSCRIBE (Mid: 1, Topic: testTopic, QoS: 0, Options: 0x00)
Client (null) received SUBACK
Subscribed (mid: 1): 0
Ich bekomme aber immer noch Fehler beim Starten von Zigbee:
Code: Alles auswählen
openhabian@openhabian:/opt/zigbee2mqtt $ npm start
> zigbee2mqtt@1.22.2 start /opt/zigbee2mqtt
> node index.js
Zigbee2MQTT:info 2022-01-15 20:31:33: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2022-01-15.20-31-32' filename: log.txt
Zigbee2MQTT:info 2022-01-15 20:31:33: Starting Zigbee2MQTT version 1.22.2 (commit #301ba14b)
Zigbee2MQTT:info 2022-01-15 20:31:33: Starting zigbee-herdsman (0.13.188)
Zigbee2MQTT:error 2022-01-15 20:31:42: Configuration is not consistent with adapter state/backup!
Zigbee2MQTT:error 2022-01-15 20:31:42: - PAN ID: configured=6754, adapter=6754
Zigbee2MQTT:error 2022-01-15 20:31:42: - Extended PAN ID: configured=00124b00257917ee, adapter=00124b00257917ee
Zigbee2MQTT:error 2022-01-15 20:31:42: - Network Key: configured=d3a0aff2b28a088ece5acac6abf09c95, adapter=fbbe794d213ccea098c6a43efbea6132
Zigbee2MQTT:error 2022-01-15 20:31:42: - Channel List: configured=11, adapter=11
Zigbee2MQTT:error 2022-01-15 20:31:42: Please update configuration to prevent further issues.
Zigbee2MQTT:error 2022-01-15 20:31:42: If you wish to re-commission your network, please remove coordinator backup at /opt/zigbee2mqtt/data/coordinator_backup.json.
Zigbee2MQTT:error 2022-01-15 20:31:42: Re-commissioning your network will require re-pairing of all devices!
Zigbee2MQTT:error 2022-01-15 20:31:42: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-01-15 20:31:42: Failed to start zigbee
Zigbee2MQTT:error 2022-01-15 20:31:42: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-01-15 20:31:42: Exiting...
Zigbee2MQTT:error 2022-01-15 20:31:42: Error: startup failed - configuration-adapter mismatch - see logs above for more information
at ZnpAdapterManager.determineStrategy (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:229:35)
at ZnpAdapterManager.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/manager.ts:63:26)
at Controller.start (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
at Zigbee.start (/opt/zigbee2mqtt/lib/zigbee.ts:58:27)
at Controller.start (/opt/zigbee2mqtt/lib/controller.ts:100:27)
at start (/opt/zigbee2mqtt/index.js:97:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.22.2 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.22.2 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/openhabian/.npm/_logs/2022-01-15T19_31_43_031Z-debug.log
openhabian@openhabian:/opt/zigbee2mqtt $
Das kann an der Configdatei liegen.
Die öffne ich so:
Und darin steht:
Code: Alles auswählen
mqtt:
base_topic: zigbee2mqtt
server: mqtt://localhost
user: openhabian
password: meinpasswort
serial:
port: /dev/ttyUSB0
frontend:
port: 8080
advanced:
network_key:
- 211
Nach der 211 kommen noch viele Zeilen mit 1, 2 oder 3 Zahlen.
Ich habe vor User und password je ein # gemacht und Zigbee neu gestartet:
Die Fehler nach
Code: Alles auswählen
openhabian@openhabian:/opt/zigbee2mqtt $ cd /opt/zigbee2mqtt
openhabian@openhabian:/opt/zigbee2mqtt $ npm start
bleiben identisch