Z2m bad gateway502

Ah…ok.Je n’avais pas compris

Comment je peux modifier ça ?

Tu as le lien de la doc juste au dessus

Le tuto dis çà sur ‹ zigate ›
Clé zigate:

serial:
  port: >-
    /dev/serial/by-id/usb-FTDI_ZiGate_ZIGATE+-if00-port0
  adapter: zigate

Dans la section materiel de HA, j’ai çà

DEVLINKS: /dev/serial0
DEVNAME: /dev/ttyAMA0
DEVPATH: /devices/platform/soc/3f201000.serial/tty/ttyAMA0
MAJOR: '204'
MINOR: '64'
SUBSYSTEM: tty
TAGS: ':systemd:'
USEC_INITIALIZED: '5598773'

Faut que je mette quoi exactement dans la partie ‹ serial › de z2m ?

dans le matériel, c’est chemin d’accès au périphérique ou le ID à utiliser.
image

Dans serial:
port: /dev/…
adapter: zigate

Dans la partie MQTT, il faut mettre un user et pass, que tu as créé quand tu as installé mosquitto broker.
Ou tu laisses vide et au lancement de Z2M, il te créera un user et pass avec les informations du server automatiquement.

1 « J'aime »

Exactement dans le tuto/doc il y a 2 infos important : le path et le adpater.
Avec 50% des infos fournies à z2m, il ne s’y retrouve pas

Donc dans la partie serial je rajoute simplement
adaptater: zigate ??

1 « J'aime »

oui, comme je viens de te le dire. il faut port et adapter.


[2024-10-11 19:41:23] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyAMA0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-10-11 19:41:23] info: 	zh:zstack:znp: Serialport opened
[2024-10-11 19:41:23] info: 	zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-10-11 19:41:24] info: 	zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-10-11 19:41:43] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-11 19:41:43] error: 	z2m: Failed to start zigbee
[2024-10-11 19:41:43] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-11 19:41:43] error: 	z2m: Exiting...
[2024-10-11 19:41:43] error: 	z2m: 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:113:27)

comme ta déja lancer Z2M, les modifications par l’UI ne sont plus prise en compte car il a créer un fichier configuration.yaml dans le dossier zigee2mqtt. Il faut modifier dans le fichier directement.
Sinon, tu peut supprimer le fichier et modifier de l’ui et relancer Z2M pour être sur .

Montre ton fichier configuration.yaml du dossier de Z2M, par file editor.

Bonjour,
Je reprends la conversation :

homeassistant: true
advanced:
  network_key:
    - 205
    - 13
    - 132
    - 58
    - 91
    - 62
    - 227
    - 63
    - 118
    - 11
    - 222
    - 169
    - 65
    - 98
    - 212
    - 179
  pan_id: 26204
  ext_pan_id:
    - 187
    - 183
    - 187
    - 222
    - 114
    - 231
    - 24
    - 153
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto:1883
serial:
  port: /dev/ttyAMA0
frontend:
  port: 8099

J’ai ajouté ‹ adaptater: zigate ›

serial:
  port: /dev/ttyAMA0
  adaptater: zigate

Redémarrage de HA. Voici les logs de z2m:

[12:20:44] INFO: Preparing to start...
[12:20:46] INFO: Socat not enabled
[12:20:51] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-10-12 12:21:08] info: 	z2m: Logging to console, file (filename: log.log)
[2024-10-12 12:21:09] info: 	z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
[2024-10-12 12:21:09] info: 	z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-12 12:21:10] error: 	zh:zstack:znp: Failed to determine if path is valid: 'Error: spawn udevadm ENOENT'
[2024-10-12 12:21:10] info: 	zh:zstack:znp: Opening SerialPort with {"path":"/dev/ttyAMA0","baudRate":115200,"rtscts":false,"autoOpen":false}
[2024-10-12 12:21:10] info: 	zh:zstack:znp: Serialport opened
[2024-10-12 12:21:10] info: 	zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-10-12 12:21:11] info: 	zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-10-12 12:21:30] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-12 12:21:30] error: 	z2m: Failed to start zigbee
[2024-10-12 12:21:30] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-12 12:21:30] error: 	z2m: Exiting...
[2024-10-12 12:21:30] error: 	z2m: 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:113:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:137:29)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:161:27)
    at start (/app/index.js:154:5)

adapter: zigate :sweat_smile:

Toujours pas :pensive:

[17:09:58] INFO: Preparing to start...
[17:10:00] INFO: Socat not enabled
[17:10:05] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-10-12 17:10:21] info: 	z2m: Logging to console, file (filename: log.log)
[2024-10-12 17:10:21] info: 	z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
[2024-10-12 17:10:21] info: 	z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-12 17:10:22] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-12 17:10:22] error: 	z2m: Failed to start zigbee
[2024-10-12 17:10:22] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-12 17:10:22] error: 	z2m: Exiting...
[2024-10-12 17:10:23] error: 	z2m: Error: failed to connect to zigate adapter Error: I/O error setting custom baud rate of 115200
    at ZiGateAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/zigate/adapter/zigateAdapter.ts:95:19)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:137:29)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:161:27)
    at start (/app/index.js:154:5)

Hello

Tu as bien flashé ta zigate avec le firmware conseillé dans la doc Z2M : ZigGate 3.1d firmware or later ?

1 « J'aime »

oui

sudo ./flashZigate.sh /dev/ttyAMA0 PI WiringPi ZiGate_v3.23-OPDM.bin
Checking Zigate type PI access on port /dev/ttyAMA0
- /dev/ttyAMA0 port found
- Port seems free
Configuring PI Zigate for 'flash' mode (lib=WiringPi)
Flashing Zigate
- Port tty: /dev/ttyAMA0
- Type    : PI
- Lib GPIO: WiringPi
- File    : ZiGate_v3.23-OPDM.bin

JennicModuleProgrammer Version: 0.7-r56124-Abeille
- Detected Chip: JN5168
- MAC Address  : 00:15:8D:00:01:ED:F8:8B
Setting baudrate: 115200
Opened firmware file size 194980
Module uses Bootloader v2 Header
Erasing:   100%
Writing Program to Flash
Writing:   100%
Verifying Program in Flash
Verifying: 100%
= Success
Restoring PI Zigate GPIOs config for prod mode
= Tout s'est bien passé. Vous pouvez fermer ce log.

Essai alors en ajoutant le paramètre baudrate à ta conf Z2M

serial:
  port: /dev/ttyAMA0
  adapter: zigate
  baudrate: 115200
1 « J'aime »

idem

17:41:09] INFO: Preparing to start...
[17:41:11] INFO: Socat not enabled
[17:41:16] INFO: Starting Zigbee2MQTT...
Starting Zigbee2MQTT without watchdog.
[2024-10-12 17:41:31] info: 	z2m: Logging to console, file (filename: log.log)
[2024-10-12 17:41:31] info: 	z2m: Starting Zigbee2MQTT version 1.40.2 (commit #unknown)
[2024-10-12 17:41:31] info: 	z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-12 17:41:33] error: 	z2m: Error while starting zigbee-herdsman
[2024-10-12 17:41:33] error: 	z2m: Failed to start zigbee
[2024-10-12 17:41:33] error: 	z2m: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
[2024-10-12 17:41:33] error: 	z2m: Exiting...
[2024-10-12 17:41:33] error: 	z2m: Error: failed to connect to zigate adapter Error: I/O error setting custom baud rate of 115200
    at ZiGateAdapter.start (/app/node_modules/zigbee-herdsman/src/adapter/zigate/adapter/zigateAdapter.ts:95:19)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:137:29)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:161:27)
    at start (/app/index.js:154:5)

Bon, j’ai supprimer le fichier yaml dans file editor et supprimer/réinstallé z2m et mis les infos données dans la partie serial et…miracle. Tout fonctionne.
Je ne sais pas pourquoi.
Merci à vous.

1 « J'aime »

Maintenant faut que je trouve un bon tuto pour intégrer mes volets profalux