安装脚本:
docker run -it -v /storage/lib/zigbee2mqtt/data:/app/data -e "TZ=Asia/Shanghai" -v /run/udev:/run/udev:ro --privileged koenkk/zigbee2mqtt:latest-dev
配置文件:
# Home Assistant integration (MQTT discovery)
homeassistant: false
# allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://192.168.123.33'
# MQTT server authentication, uncomment if required:
user: user
password: password
# Serial settings
serial:
# Location of CC2531 USB sniffer
#port: /dev/ttyACM0
port: 'tcp://192.168.123.53:8880'
报错信息:
zigbee2mqtt:info 2020-03-27 11:15:46: Logging to console and directory: ‘/app/data/log/2020-03-27.11-15-45’ filename: log.txt
zigbee2mqtt:info 2020-03-27 11:15:46: Starting zigbee2mqtt version 1.12.0-dev (commit #4fe2384)
zigbee2mqtt:info 2020-03-27 11:15:46: Starting zigbee-herdsman...
zigbee2mqtt:error 2020-03-27 11:15:47: Error while starting zigbee-herdsman
zigbee2mqtt:error 2020-03-27 11:15:47: Failed to start zigbee
zigbee2mqtt:error 2020-03-27 11:15:47: Exiting...
zigbee2mqtt:error 2020-03-27 11:15:47: Error: Error while opening socket
at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:162:28)
at Socket.emit (events.js:323:22)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zigbee2mqtt@1.12.0-dev start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zigbee2mqtt@1.12.0-dev 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! /root/.npm/_logs/2020-03-27T03_15_47_164Z-debug.log
麻烦大佬