SkyConnect + Zigbee2mqtt

Olá,

A minha skyconnect chegou

Tentei configurar com zigbee2mqtt mas sem sucesso.

Será que me conseguem ajudar?

Tenho um user chamado
MQTT-user

Tenho o mosquito broker add on instalado e configurado

logins:
  - username: MQTT-user
    password: ************
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: false
  folder: mosquitto

E o zigbee2mqtt:

data_path: /config/zigbee2mqtt
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
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto:1883
serial:
  port: /dev/ttyUSB0

Quando começa o zigbee2mqtt aparece este erro:


[18:19:18] INFO: Preparing to start...
[18:19:19] INFO: Socat not enabled
[18:19:21] INFO: Starting Zigbee2MQTT...
[2024-06-11 18:19:27] info: 	z2m: Logging to console, file (filename: log.log)
[2024-06-11 18:19:27] info: 	z2m: Starting Zigbee2MQTT version 1.38.0 (commit #unknown)
[2024-06-11 18:19:27] info: 	z2m: Starting zigbee-herdsman (0.49.2)
[2024-06-11 18:19:27] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyUSB0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-06-11 18:19:28] error: 	z2m: Error while starting zigbee-herdsman
[2024-06-11 18:19:28] error: 	z2m: Failed to start zigbee
[2024-06-11 18:19:28] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-06-11 18:19:28] error: 	z2m: Exiting...
[2024-06-11 18:19:28] error: 	z2m: Error: Error Resource temporarily unavailable Cannot lock port

O que me está a falhar?

O que me está a falhar?

Desactiva o ZHA

Olá,

Não tenho ZHA ativo

Não deves usar a porta mas antes o ID do dispositivo… algo como /dev/serial/by-id/usb-Nabu_Casa_SkyConnect_v1.0..., embora isto não seja o teu problema.
O SkyConnect usa ezsp ou EmberZNet que não é o padrão do Zigbee2MQTT portanto tens que dizer ao Z2M que estás a usar um dongle com EmberZNet para isso, a seguir à port tens que passar o parâmetro adapter: ember… ou seja, algo como isto:

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
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto:1883
serial:
  port: /dev/ttyUSB0 # aconselho a usares o serial by Id
  adapter: ember

Isso deve resolver o teu problema…

Se vires nos logs, ele diz que está a abrir a porta do teu dongle com os seguintes parâmetros:

[2024-06-11 18:19:27] info: 	zh:zstack:znp: ...

Zstack é o adapter da Texas Instruments que é usado no Dongle P da Sonoff e numa série de outros dispositivos… o SkyConnect utiliza um chip mais recente da SiliconLabs que é EmberZNet tal como o dongle E da Sonoff… podes ver as diferenças aqui:

Boas @Rui_Fernandes

Antes de mais, segue o concelho do @eduardoribeiro, é muito importante adicionar o parâmetro em falta, pode sr que no teu caso resolva a situação.

No entanto a minha história, eu tinha, desde o inicio deste ano o zigbee2mqtt num RaspberryPI dedicado única e exclusivamente a ele, com a minha SkyConnect.

No início tudo funcionou bem durante uns meses, no mês passado deixou de funcionar (com imensos erros no log). Tentei de tudo, inclusive baixar a versão do zigbee2mqtt para a versão que usava em janeiro e nada.
Simplesmente nada funciona agora (não faço ideia porquê), o RaspberryPI arranca, parece ter ficado a funcionar por uns minutos e nem 15 minutos aguenta e começa a disparar erros por tudo e por nada até simplesmente deixar de responder/funcionar.

Se este for o teu caso, talvez possamos comparar dados, a ver se percebemos o que está aqui a passar.

Boa sorte amigo.

Rui

boa noite, sou novo no grupo e estou a iniciar-me no home assistant. depois de instalar o home assiatant num raspeberry 5, e como tenho varios dispositivos zigbee, ao tentar meter o zigbee2mqtt com um dongle da sonoff-E que atualizei conforme um video da internet para ember, obtenho varios erros, os quais deixo aqui em baixo caso alguem me consiga ajudar.

mesmo metendo o id do dispositivo em vez do /dev/ttyACM0 obtenho os mesmos erros.

[02:23:13] INFO: Preparing to start…
[02:23:13] INFO: Socat not enabled
[02:23:14] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
[2024-07-02 02:23:15] info: z2m: Logging to console, file (filename: log.log)
[2024-07-02 02:23:15] info: z2m: Starting Zigbee2MQTT version 1.39.0 (commit #unknown)
[2024-07-02 02:23:15] info: z2m: Starting zigbee-herdsman (0.50.1)
[2024-07-02 02:23:16] info: zh:ember: Using default stack config.
[2024-07-02 02:23:16] info: zh:ember: ======== Ember Adapter Starting ========
[2024-07-02 02:23:16] info: zh:ember:ezsp: ======== EZSP starting ========
[2024-07-02 02:23:16] info: zh:ember:uart:ash: ======== ASH NCP reset ========
[2024-07-02 02:23:16] info: zh:ember:uart:ash: RTS/CTS config is off, enabling software flow control.
[2024-07-02 02:23:16] info: zh:ember:uart:ash: Serial port opened
[2024-07-02 02:23:16] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-07-02 02:23:16] error: zh:ember:uart:ash: Received frame with CRC error
[2024-07-02 02:23:16] error: zh:ember:uart:ash: Received ERROR from NCP while connecting, with code=ERROR_EXCEEDED_MAXIMUM_ACK_TIMEOUT_COUNT.
[2024-07-02 02:23:16] error: zh:ember:uart:ash: ASH disconnected | NCP status: ASH_NCP_FATAL_ERROR
[2024-07-02 02:23:16] error: zh:ember:uart:ash: Error while parsing received frame, status=ASH_NCP_FATAL_ERROR.
[2024-07-02 02:23:16] info: zh:ember:uart:ash: ======== ASH NCP reset ========
[2024-07-02 02:23:16] info: zh:ember:uart:ash: ======== ASH starting ========
[2024-07-02 02:23:17] info: zh:ember:uart:ash: ======== ASH connected ========
[2024-07-02 02:23:17] info: zh:ember:uart:ash: ======== ASH started ========
[2024-07-02 02:23:17] info: zh:ember:ezsp: ======== EZSP started ========
[2024-07-02 02:23:17] info: zh:ember: [STACK STATUS] Network up.
[2024-07-02 02:23:17] info: zh:ember: [INIT TC] NCP network matches config.
[2024-07-02 02:23:17] info: zh:ember: [CONCENTRATOR] Started source route discovery. 1248ms until next broadcast.
[2024-07-02 02:23:17] info: zh:ember:queue: Request dispatching started.
[2024-07-02 02:23:17] info: z2m: zigbee-herdsman started (resumed)
[2024-07-02 02:23:17] info: z2m: Coordinator firmware version: ‘{“meta”:{“build”:0,“ezsp”:13,“major”:7,“minor”:4,“patch”:3,“revision”:“7.4.3 [GA]”,“special”:0,“type”:170},“type”:“EmberZNet”}’
[2024-07-02 02:23:17] info: z2m: Currently 0 devices are joined:
[2024-07-02 02:23:17] info: z2m: Zigbee: disabling joining new devices.
[2024-07-02 02:23:17] info: z2m: Connecting to MQTT server at mqtt//core-mosquitto:1883
[2024-07-02 02:23:17] error: z2m: MQTT failed to connect, exiting…
[2024-07-02 02:23:17] info: z2m: Stopping zigbee-herdsman…
[2024-07-02 02:23:18] info: zh:controller: Wrote coordinator backup to ‘/config/zigbee2mqtt/coordinator_backup.json’
[2024-07-02 02:23:18] info: zh:ember:queue: Request dispatching stopped; queue=0 priorityQueue=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: ASH COUNTERS since last clear:
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Total frames: RX=66, TX=129
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Cancelled : RX=0, TX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: DATA frames : RX=65, TX=62
[2024-07-02 02:23:18] info: zh:ember:uart:ash: DATA bytes : RX=604, TX=645
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Retry frames: RX=0, TX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: ACK frames : RX=0, TX=66
[2024-07-02 02:23:18] info: zh:ember:uart:ash: NAK frames : RX=0, TX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: nRdy frames : RX=0, TX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: CRC errors : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Comm errors : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Length < minimum: RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Length > maximum: RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Bad controls : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Bad lengths : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Bad ACK numbers : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Out of buffers : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Retry dupes : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Out of sequence : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: ACK timeouts : RX=0
[2024-07-02 02:23:18] info: zh:ember:uart:ash: Port closed.
[2024-07-02 02:23:18] info: zh:ember:uart:ash: ======== ASH stopped ========
[2024-07-02 02:23:18] info: zh:ember:ezsp: ======== EZSP stopped ========
[2024-07-02 02:23:18] info: zh:ember: ======== Ember Adapter Stopped ========
[2024-07-02 02:23:18] info: z2m: Stopped zigbee-herdsman

obrigado e continuem o bom trabalho.

Olá @rsequeira pelo que estou a ver, o Zigbee2MQTT falha e desliga-se quando tenta conectar-se ao MQTT. Tens um erro no controlador Ember mas o processo continua apenas falha quando não se consegue conectar o MQTT:

[2024-07-02 02:23:17] info: z2m: Currently 0 devices are joined:
[2024-07-02 02:23:17] info: z2m: Zigbee: disabling joining new devices.
[2024-07-02 02:23:17] info: z2m: Connecting to MQTT server at mqtt//core-mosquitto:1883
[2024-07-02 02:23:17] error: z2m: MQTT failed to connect, exiting…
[2024-07-02 02:23:17] info: z2m: Stopping zigbee-herdsman…

Se reparares ele procura dispositivos em modo pareamento, termina o modo de pareamento e tenta ligar-se ao MQTT mas falha. Tens o AddOn Mosquitto Broker instalado? Se não tens, tens que instalar ou se quiseres usar um servidor MQTT noutra máquina, nas configurações do Zigbee2MQTT tens que indicar os dados do servidor MQTT que queres usar


Copyright © 2017-2021. Todos os direitos reservados
CPHA.pt - info@cpha.pt


FAQ | Termos de Serviço/Regras | Política de Privacidade