Da kommt bei mir nichts:sihui hat geschrieben: ↑17. Jan 2022 07:16würde dir Gewissheit bringen. Das sieht dann ungefähr so aus:Code: Alles auswählen
sudo dmesg -T | grep tty
Code: Alles auswählen
[Fr Dez 13 10:53:00 2261] console [tty0] enabled [Fr Dez 13 10:53:08 2261] cdc_acm 1-2:1.0: ttyACM0: USB ACM device [Fr Dez 13 10:53:08 2261] usb 1-3: cp210x converter now attached to ttyUSB0
Code: Alles auswählen
openhabian@openhabian:~ $ sudo dmesg -T | grep tty
[sudo] password for openhabian:
openhabian@openhabian:~ $ sudo dmesg -T | grep tty
openhabian@openhabian:~ $ sudo dmesg -T | grep tty
openhabian@openhabian:~ $
Die configuration.yaml öffne ich so.
Code: Alles auswählen
openhabian@openhabian:~ $ nano /opt/zigbee2mqtt/data/configuration.yaml
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
- 15 weitere Zahlen
Wie die Datei echt aussehen soll, weiß ich nicht. Es gibt hier drei unterschiedliche Dateien (wobei aus network GENERATE immer der Key mit den 16 Zahlen wird:
1. https://www.zigbee2mqtt.io/guide/gettin ... requisites
Code: Alles auswählen
# Let new devices join our zigbee network
permit_join: true
# Docker-Compose makes the MQTT-Server available using "mqtt" hostname
mqtt:
base_topic: zigbee2mqtt
server: mqtt://mqtt
# Zigbee Adapter path
serial:
port: /dev/ttyUSB0
# Enable the Zigbee2MQTT frontend
frontend:
port: 8080
# Let Zigbee2MQTT generate a new network key on first start
advanced:
network_key: GENERATE
Code: Alles auswählen
# MQTT settings
mqtt:
# MQTT base topic for Zigbee2MQTT MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://localhost'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of the adapter (see first step of this guide)
port: /dev/ttyACM0
Inhalt nur ab advanced
Code: Alles auswählen
advanced:
# Optional: ZigBee pan ID (default: shown below)
# Setting pan_id: GENERATE will make Zigbee2MQTT generate a new panID on next startup
pan_id: 0x1a62
# Optional: Zigbee extended pan ID (default: shown below)
ext_pan_id: [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD]
# Optional: ZigBee channel, changing requires re-pairing of all devices. (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)
# (default: 11)
channel: 11
# Optional: network encryption key, will improve security
# Note: changing requires repairing of all devices (default: shown below)
network_key: [ 1, 3, 5, 7, 9, 11, 13, 15, 0, 2, 4, 6, 8, 10, 12, 13 ]
Code: Alles auswählen
GNU nano 5.4 /opt/zigbee2mqtt/data/configuration.yaml *
permit_join: true
mqtt:
base_topic: zigbee2mqtt
server: mqtt://localhost
user: openhabian
password: meinpasswort
serial:
port: /dev/ttyUSB0
frontend:
port: 8080
advanced:
# Optional: ZigBee pan ID (default: shown below)
# Setting pan_id: GENERATE will make Zigbee2MQTT generate a new panID on next startup
pan_id: GENERATE
# Optional: Zigbee extended pan ID (default: shown below)
# ext_pan_id: [0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD, 0xDD]
# Optional: ZigBee channel, changing requires re-pairing of all devices. (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)
# (default: 11)
channel: 11
# Optional: network encryption key, will improve security
# Note: changing requires repairing of all devices (default: shown below)
network_key: GENERATE
Dann habe ich zigbee neu gestartet (sieht gut aus):
Code: Alles auswählen
openhabian@openhabian:~ $ sudo systemctl stop zigbee2mqtt
openhabian@openhabian:~ $ sudo systemctl start zigbee2mqtt
openhabian@openhabian:~ $ systemctl status zigbee2mqtt.service
● zigbee2mqtt.service - zigbee2mqtt
Loaded: loaded (/etc/systemd/system/zigbee2mqtt.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2022-01-17 17:31:33 CET; 1s ago
Main PID: 11311 (npm)
Tasks: 19 (limit: 4915)
CPU: 1.681s
CGroup: /system.slice/zigbee2mqtt.service
├─11311 npm
├─11322 sh -c node index.js
└─11323 node index.js
openhabian@openhabian:~ $
Und mit dem npm Befehl gibt es jetzt neue Fehler:
Code: Alles auswählen
openhabian@openhabian:~ $ cd /opt/zigbee2mqtt
openhabian@openhabian:/opt/zigbee2mqtt $ npm start
> zigbee2mqtt@1.22.2 start /opt/zigbee2mqtt
> node index.js
(node:11861) UnhandledPromiseRejectionWarning: YAMLException: bad indentation of a mapping entry (5:2)
2 | mqtt:
3 | base_topic: zigbee2mqtt
4 | server: mqtt://localhost
5 | user: openhabian
------^
6 | password: meinpasswort
7 | serial:
at generateError (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:187:9)
at readBlockMapping (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:1182:7)
at composeNode (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:1441:12)
at readDocument (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:1625:3)
at loadDocuments (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.load (/opt/zigbee2mqtt/node_modules/js-yaml/lib/loader.js:1714:19)
at Object.read (/opt/zigbee2mqtt/lib/util/yaml.ts:7:21)
at read (/opt/zigbee2mqtt/lib/util/settings.ts:288:20)
at getInternalSettings (/opt/zigbee2mqtt/lib/util/settings.ts:384:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:11861) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:11861) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
openhabian@openhabian:/opt/zigbee2mqtt $
Was nun?