- 积分
- 208
- 金钱
- 184
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 208
- 金钱
- 184
- HASS币
- 0
|
楼主 |
发表于 2023-7-24 02:37:34
|
显示全部楼层
麻烦安装过的人赐教下,看看我是不是哪里没配置好。
第一步按官网的教程 配置configuration.yaml 分别修改了ip(我填了armbian的地址)、用户名及密码三项,内容如下
# 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.5.2'
# MQTT server authentication, uncomment if required:
# user: admin
# password: admin
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
第二步 先运行以下命令
ls -l /dev/serial/by-id
total 0
lrwxrwxrwx 1 root root 13 Jul 23 14:16 usb-1a86_USB_Serial-if00-port0 -> ../../ttyUSB0
把上面的位置替换了官方的命令。
官方是:--device=/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0018ED3DDF-if00:/dev/ttyACM0 \
修改为:--device=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0:/dev/ttyACM0 \
运行命令出现以下错误:好像已经准备启动了,但连接不上,和之前的错误不一样了。
docker run \
> --name zigbee2mqtt\
> --restart=unless-stopped \
> --device=/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0:/dev/ttyACM0 \
> -p 8080:8080 \
> -v $(pwd)/data:/app/data \
> -v /run/udev:/run/udev:ro \
> -e TZ=Europe/Amsterdam \
> koenkk/zigbee2mqtt
Using '/app/data' as data directory
Zigbee2MQTT:info 2023-07-23 20:07:43: Logging to console and directory: '/app/data/log/2023-07-23.20-07-43' filename: log.txt
Zigbee2MQTT:info 2023-07-23 20:07:43: Starting Zigbee2MQTT version 1.32.1 (commit #4ccfdfc)
Zigbee2MQTT:info 2023-07-23 20:07:43: Starting zigbee-herdsman (0.16.0)
Zigbee2MQTT:info 2023-07-23 20:07:56: zigbee-herdsman started (resumed)
Zigbee2MQTT:info 2023-07-23 20:07:56: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20221226,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info 2023-07-23 20:07:56: Currently 0 devices are joined:
Zigbee2MQTT:warn 2023-07-23 20:07:56: `permit_join` set to `true` in configuration.yaml.
Zigbee2MQTT:warn 2023-07-23 20:07:56: Allowing new devices to join.
Zigbee2MQTT:warn 2023-07-23 20:07:56: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info 2023-07-23 20:07:56: Zigbee: allowing new devices to join.
Zigbee2MQTT:info 2023-07-23 20:07:57: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2023-07-23 20:07:57: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:07:57: MQTT failed to connect, exiting...
Zigbee2MQTT:info 2023-07-23 20:07:57: Stopping zigbee-herdsman...
Zigbee2MQTT:error 2023-07-23 20:07:58: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:07:59: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:00: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:01: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:02: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:03: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:04: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:05: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:06: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2023-07-23 20:08:07: MQTT error: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:info 2023-07-23 20:08:08: Stopped zigbee-herdsman
|
|