home-assistant智趣盒子对接第三方zigbee设备的教程--zigbee2mqtt


第一,集成裡沒有tuya v2

sha1跟application id變成必填,跟說明的不一樣

app應用沒有體驗的選項可以讓管理工具進行掃描

这个集成前几天新出的,目前固件没有集成。请看我上面发的官方教程操作。你提到的要填的信息官方那个指引都有的。

第二部分的,你应该搞错了。正常的不是建立这个APP的。你看看官方的教程

https://developer.tuya.com/cn/docs/iot/Configuration_Guide_custom?id=Kamcfx6g5uyot


照步驟的選項是這裡沒錯呀?


萝卜大佬,以前LQI都有60-70的,现在除了门窗传感器都很低,是为什么啊?

Zigbee2MQTT:error 2021-11-10 12:42:06: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-11-10 12:42:06: Failed to start zigbee
Zigbee2MQTT:error 2021-11-10 12:42:06: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-11-10 12:42:06: Exiting…
Zigbee2MQTT:error 2021-11-10 12:42:06: Error: Error while opening serialport ‘Error: Error: No such file or directory, cannot open /dev/ttyUSB0’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[12:42:07] INFO: Handing over control to Zigbee2mqtt Core …

zigbee2mqtt@1.22.0 start
node index.js
Zigbee2MQTT:error 2021-11-10 12:42:17: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-11-10 12:42:17: Failed to start zigbee
Zigbee2MQTT:error 2021-11-10 12:42:17: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-11-10 12:42:17: Exiting…
Zigbee2MQTT:error 2021-11-10 12:42:17: Error: Error while opening serialport ‘Error: Error: No such file or directory, cannot open /dev/ttyUSB0’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[12:42:18] INFO: Handing over control to Zigbee2mqtt Core …
zigbee2mqtt@1.22.0 start
node index.js
Zigbee2MQTT:error 2021-11-10 12:42:27: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-11-10 12:42:27: Failed to start zigbee
Zigbee2MQTT:error 2021-11-10 12:42:27: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-11-10 12:42:27: Exiting…
Zigbee2MQTT:error 2021-11-10 12:42:27: Error: Error while opening serialport ‘Error: Error: No such file or directory, cannot open /dev/ttyUSB0’
at SerialPort. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:146:28)
at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
[12:42:28] INFO: Handing over control to Zigbee2mqtt Core …
zigbee2mqtt@1.22.0 start
node index.js

502: Bad Gateway

我的zigbee2mqtt 启动总报错,重装了也这样 :sob: :sob:

  1. zigbee需要硬件网关才能启动
  2. 你是否插上zigbeeusb网关了呢?

因为z2m的旧库不更新了,我删除了zigbee2mqtt重新下了,现在按照在论坛上的配置文件保存好启动之后显示502: Bad Gateway,日志里显示的是提供的配置和adapter的设置不符,但我改成日志里写的adapter的配置,也还是badgateway

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] socat.sh: executing…
[14:28:25] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing…
[14:28:27] INFO: MQTT available, fetching server detail …
[14:28:28] INFO: Previous config file found, checking backup
[14:28:28] INFO: Creating backup config in ‘/config/zigbee2mqtt/.configuration.yaml.bk’
[14:28:28] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks …
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:28:30] INFO: Handing over control to Zigbee2mqtt Core …

zigbee2mqtt@1.23.0 start
node index.js
!!!
READ THIS CAREFULLY
Refusing to start because configuration is not valid, found the following errors:

  • devices must match pattern “^0x[\d\w]{16}$”
  • devices property name must be valid
    If you don’t know how to solve this, read https://www.zigbee2mqtt.io/guide/configuration
    !!!
    [14:28:36] INFO: Handing over control to Zigbee2mqtt Core …

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
base_topic: zigbee2mqtt
server: mqtt://172.17.0.1/:1883
user: mqtt
password: mqtt
force_disable_retain: false
serial:
port: /dev/ttyUSB0
advanced:
log_level: warn
pan_id: 6754
channel: 11
network_key:
- 1
- 3
- 5
- 7
- 9
- 11
- 13
- 15
- 0
- 2
- 4
- 6
- 8
- 10
- 12
- 14
availability_blocklist: []
availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
port: 8099
experimental: {}
availability: false
socat:
enabled: false
master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
options: ‘-d -d’
log: false

我自己按照提示改了几个配置,现在的日志就是上面的部分,我不知道还有哪里有问题了,麻烦帮我解决下,谢谢谢谢

你截图看看红色字体部分的提示

[s6-init] making user provided files available at /var/run/s6/etc…exited 0.
[s6-init] ensuring user provided files have correct perms…exited 0.
[fix-attrs.d] applying ownership & permissions fixes…
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts…
[cont-init.d] socat.sh: executing…
[10:11:33] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing…
[10:11:34] INFO: MQTT available, fetching server detail …
[10:11:34] INFO: Previous config file found, checking backup
[10:11:34] INFO: Creating backup config in ‘/config/zigbee2mqtt/.configuration.yaml.bk’
[10:11:35] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks …
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:11:35] INFO: Handing over control to Zigbee2mqtt Core …

zigbee2mqtt@1.24.0 start
node index.js
Zigbee2MQTT:error 2022-03-09 10:12:04: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2022-03-09 10:12:04: Failed to start zigbee
Zigbee2MQTT:error 2022-03-09 10:12:04: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2022-03-09 10:12:04: Exiting…
Zigbee2MQTT:error 2022-03-09 10:12:04: Error: Failed to connect to the adapter (Error: SRSP - SYS - ping after 6000ms)
at ZStackAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/adapter/zStackAdapter.ts:102:27)
at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:123:29)
at Zigbee.start (/app/lib/zigbee.ts:58:27)
at Controller.start (/app/lib/controller.ts:100:27)
at start (/app/index.js:101:5)
[10:12:04] INFO: Handing over control to Zigbee2mqtt Core …
zigbee2mqtt@1.24.0 start
node index.js

开始运行成功,在30秒后运行报错了,请帮忙看一下是什么问题,配置文件使用的是默认的配置。

截图,看红色报错部分

你看看是不是mqtt没有启动

MQTT启动了,这是MQTT的日志


没有链接成功。你检查一下 你的addon里面的mqtt服务器、集成里面的mqtt客户端,你的zigbee2mqtt里面的mqtt配置,他们的用户名和密码是否一致。
提示表示没有链接成功。

配置完全参考上面的,以下是填的配置文件
MQTT


zigbee2mqtt