Zigbee2mqtt avec cloudfare

Bonjour,

Afin de pourvoir accéder à HA à distance j’ai utilisé la méthode de Makernix en utilisant OVH et Cloudfare, tout fonctionne bien.
Jusqu’ici j’utilise ZHA pour mes appareils Zigbee mais j’aimerais utiliser zigbee2mqtt, j’ai donc suivi le tuto de domo-blog mais j’ai un souci, l’ouverture semble bloquée par cloudfare.

Ma question, est-ce que les deux systèmes sont compatible ?
Quelles valeurs dois-je compléter dans la configuration de zigbee2mqtt ?

Voici ma configuration pour l’instant

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
  user: mqtt
  password: XxX
serial:
  port: /dev/ttyACM0

Merci pour votre aide.

Ma configuration


[center]## System Information

version core-2024.2.3
installation_type Home Assistant Supervised
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.12.1
os_name Linux
os_version 5.4.180
arch aarch64
timezone Europe/Paris
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 5000
Installed Version 1.34.0
Stage running
Available Repositories 1400
Downloaded Repositories 7
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Debian GNU/Linux 11 (bullseye)
update_channel stable
supervisor_version supervisor-2024.02.0
agent_version 1.5.1
docker_version 24.0.2
disk_total 14.4 GB
disk_used 8.7 GB
healthy true
supported true
supervisor_api ok
version_api ok
installed_addons Terminal & SSH (9.9.0), Mosquitto broker (6.4.0), Studio Code Server (5.15.0), File editor (5.8.0), Duck DNS (1.15.0), Zigbee2MQTT (1.35.3-1), Cloudflared (5.1.4)
Dashboards
dashboards 3
resources 1
views 8
mode storage
Recorder
oldest_recorder_run 18 février 2024 à 14:35
current_recorder_run 26 février 2024 à 19:43
estimated_db_size 169.36 MiB
database_engine sqlite
database_version 3.44.2
[/center]

Bonjour,
Je ne comprends pas pourquoi Z2M a un rapport avec Cloudflare.
Tu dois avoir ton Z2M entre tes devices (locaux) et ton Broker MQTT (local) avec HA ou non (en local également).
Que veux tu faire avec Cloudflare dans ton système Local ?

Bonjour,
Je me suis certainement mal exprimé et j’aurais peut être dû mettre en sujet Z2M conflit Cloudflare.
Mon problème, lorsque je veux lancer Z2M j’ai une page de Cloudflare qui s’affiche, je pense donc qu’il bloque son utilisation.

Salut
Au lieu de passer par le menu à gauche, va dans le module complémentaire, clique sur zigbee2mqtt et clique sur « Ouvrir l’interface ».
As-tu le même comportement ?

Oui c’est identique, exactement le même comportement.

Hello

Tu accède comment à ton HA lorsque tu as ce pb ? Via son nom de domaine externe ou via son IP locale ?
Essai en ouvrant ton dashboard en local

Alors là je suis avec mon nom de domaine externe.
De retour à mon domicile j’essayerai avec l’IP locale mais je pense que dans mes souvenirs j’ai le même résultat.
Je donne la réponse ce soir.

De retour à la maison, j’ai fais un essai avec mon IP locale.
Toujours pas de possibilité d’accéder à Z2M mais pas le même message, le voici


erreur 502

Il faut regarder les logs du module complémentaire.

Ce n’est pas le même message.
Dans ce dernier cas ton Z2M est mal configuré et ne démarre pas alors que le précédent depuis l’extérieur ressemble plus un pb de réseau.qui peut justement s’expliquer du fait que Z2M n’a pas démarré.
Au moins on a une piste maintenant que tu as testé en local :wink:

Les logs Z2M, les conf Z2M et Mqtt STP

Désolé, j’ai mon ordinateur qui a planté. Comment je récupère les logs ?
Configuration de Z2M

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
  user: mqtt
  password: xXX
serial:
  port: /dev/ttyACM0

De mosquitto

logins: []
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: false
  folder: mosquitto

Journal de Z2M

[20:33:37] INFO: Preparing to start...
[20:33:39] INFO: Socat not enabled
[20:33:43] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2024-02-27 20:33:52: Logging to console and directory: '/config/zigbee2mqtt/log/2024-02-27.20-33-52' filename: log.txt
Zigbee2MQTT:info  2024-02-27 20:33:52: Starting Zigbee2MQTT version 1.35.3 (commit #unknown)
Zigbee2MQTT:info  2024-02-27 20:33:52: Starting zigbee-herdsman (0.33.8)
Zigbee2MQTT:error 2024-02-27 20:34:13: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2024-02-27 20:34:13: Failed to start zigbee
Zigbee2MQTT:error 2024-02-27 20:34:13: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2024-02-27 20:34:13: Exiting...
Zigbee2MQTT:error 2024-02-27 20:34:13: 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:103:27)
    at Controller.start (/app/node_modules/zigbee-herdsman/src/controller/controller.ts:132:29)
    at Zigbee.start (/app/lib/zigbee.ts:60:27)
    at Controller.start (/app/lib/controller.ts:109:27)
    at start (/app/index.js:107:5)

Celui de Mosquitto

2024-02-27 19:37:34: Client <unknown> closed its connection.
2024-02-27 19:39:34: New connection from 172.30.32.2:54708 on port 1883.
2024-02-27 19:39:34: Client <unknown> closed its connection.
2024-02-27 19:41:34: New connection from 172.30.32.2:54918 on port 1883.
2024-02-27 19:41:34: Client <unknown> closed its connection.
2024-02-27 19:43:34: New connection from 172.30.32.2:55226 on port 1883.
2024-02-27 19:43:34: Client <unknown> closed its connection.
2024-02-27 19:45:34: New connection from 172.30.32.2:55438 on port 1883.
2024-02-27 19:45:34: Client <unknown> closed its connection.
2024-02-27 19:47:34: New connection from 172.30.32.2:55660 on port 1883.
2024-02-27 19:47:34: Client <unknown> closed its connection.
2024-02-27 19:49:34: New connection from 172.30.32.2:55872 on port 1883.
2024-02-27 19:49:34: Client <unknown> closed its connection.
2024-02-27 19:51:34: New connection from 172.30.32.2:56078 on port 1883.
2024-02-27 19:51:34: Client <unknown> closed its connection.
2024-02-27 19:53:34: New connection from 172.30.32.2:56312 on port 1883.
2024-02-27 19:53:34: Client <unknown> closed its connection.
2024-02-27 19:55:34: New connection from 172.30.32.2:56528 on port 1883.
2024-02-27 19:55:34: Client <unknown> closed its connection.
2024-02-27 19:57:34: New connection from 172.30.32.2:56776 on port 1883.
2024-02-27 19:57:34: Client <unknown> closed its connection.
2024-02-27 19:59:34: New connection from 172.30.32.2:56986 on port 1883.
2024-02-27 19:59:34: Client <unknown> closed its connection.
2024-02-27 20:01:34: New connection from 172.30.32.2:57192 on port 1883.
2024-02-27 20:01:34: Client <unknown> closed its connection.
2024-02-27 20:03:34: New connection from 172.30.32.2:57418 on port 1883.
2024-02-27 20:03:34: Client <unknown> closed its connection.
2024-02-27 20:05:34: New connection from 172.30.32.2:57626 on port 1883.
2024-02-27 20:05:34: Client <unknown> closed its connection.
2024-02-27 20:05:46: Saving in-memory database to /data//mosquitto.db.
2024-02-27 20:07:34: New connection from 172.30.32.2:57862 on port 1883.
2024-02-27 20:07:34: Client <unknown> closed its connection.
2024-02-27 20:09:34: New connection from 172.30.32.2:58078 on port 1883.
2024-02-27 20:09:34: Client <unknown> closed its connection.
2024-02-27 20:11:34: New connection from 172.30.32.2:58294 on port 1883.
2024-02-27 20:11:34: Client <unknown> closed its connection.
2024-02-27 20:13:34: New connection from 172.30.32.2:58530 on port 1883.
2024-02-27 20:13:34: Client <unknown> closed its connection.
2024-02-27 20:15:34: New connection from 172.30.32.2:58730 on port 1883.
2024-02-27 20:15:34: Client <unknown> closed its connection.
2024-02-27 20:17:34: New connection from 172.30.32.2:58956 on port 1883.
2024-02-27 20:17:34: Client <unknown> closed its connection.
2024-02-27 20:19:34: New connection from 172.30.32.2:59164 on port 1883.
2024-02-27 20:19:34: Client <unknown> closed its connection.
2024-02-27 20:21:34: New connection from 172.30.32.2:59384 on port 1883.
2024-02-27 20:21:34: Client <unknown> closed its connection.
2024-02-27 20:23:34: New connection from 172.30.32.2:59628 on port 1883.
2024-02-27 20:23:34: Client <unknown> closed its connection.
2024-02-27 20:25:34: New connection from 172.30.32.2:59826 on port 1883.
2024-02-27 20:25:34: Client <unknown> closed its connection.
2024-02-27 20:27:34: New connection from 172.30.32.2:60072 on port 1883.
2024-02-27 20:27:34: Client <unknown> closed its connection.
2024-02-27 20:29:34: New connection from 172.30.32.2:60288 on port 1883.
2024-02-27 20:29:34: Client <unknown> closed its connection.
2024-02-27 20:31:34: New connection from 172.30.32.2:60504 on port 1883.
2024-02-27 20:31:34: Client <unknown> closed its connection.
2024-02-27 20:33:34: New connection from 172.30.32.2:60734 on port 1883.
2024-02-27 20:33:34: Client <unknown> closed its connection.
2024-02-27 20:35:34: New connection from 172.30.32.2:60956 on port 1883.
2024-02-27 20:35:34: Client <unknown> closed its connection.
2024-02-27 20:35:47: Saving in-memory database to /data//mosquitto.db.
2024-02-27 20:37:34: New connection from 172.30.32.2:32962 on port 1883.
2024-02-27 20:37:34: Client <unknown> closed its connection.
2024-02-27 20:39:34: New connection from 172.30.32.2:33172 on port 1883.
2024-02-27 20:39:34: Client <unknown> closed its connection.
2024-02-27 20:41:34: New connection from 172.30.32.2:33388 on port 1883.
2024-02-27 20:41:34: Client <unknown> closed its connection.
2024-02-27 20:43:34: New connection from 172.30.32.2:33620 on port 1883.
2024-02-27 20:43:34: Client <unknown> closed its connection.
2024-02-27 20:45:34: New connection from 172.30.32.2:33820 on port 1883.
2024-02-27 20:45:34: Client <unknown> closed its connection.
2024-02-27 20:47:34: New connection from 172.30.32.2:34048 on port 1883.
2024-02-27 20:47:34: Client <unknown> closed its connection.
2024-02-27 20:49:34: New connection from 172.30.32.2:34260 on port 1883.
2024-02-27 20:49:34: Client <unknown> closed its connection.
2024-02-27 20:51:34: New connection from 172.30.32.2:34468 on port 1883.
2024-02-27 20:51:34: Client <unknown> closed its connection.
2024-02-27 20:53:34: New connection from 172.30.32.2:34700 on port 1883.
2024-02-27 20:53:34: Client <unknown> closed its connection.
2024-02-27 20:55:34: New connection from 172.30.32.2:34922 on port 1883.
2024-02-27 20:55:34: Client <unknown> closed its connection.
2024-02-27 20:57:34: New connection from 172.30.32.2:35144 on port 1883.
2024-02-27 20:57:34: Client <unknown> closed its connection.
2024-02-27 20:59:34: New connection from 172.30.32.2:35354 on port 1883.
2024-02-27 20:59:34: Client <unknown> closed its connection.
2024-02-27 21:01:34: New connection from 172.30.32.2:35562 on port 1883.
2024-02-27 21:01:34: Client <unknown> closed its connection.
2024-02-27 21:03:34: New connection from 172.30.32.2:35792 on port 1883.
2024-02-27 21:03:34: Client <unknown> closed its connection.
2024-02-27 21:05:34: New connection from 172.30.32.2:35998 on port 1883.
2024-02-27 21:05:34: Client <unknown> closed its connection.
2024-02-27 21:05:48: Saving in-memory database to /data//mosquitto.db.
2024-02-27 21:07:34: New connection from 172.30.32.2:36264 on port 1883.
2024-02-27 21:07:34: Client <unknown> closed its connection.
2024-02-27 21:09:34: New connection from 172.30.32.2:36466 on port 1883.
2024-02-27 21:09:34: Client <unknown> closed its connection.
2024-02-27 21:11:34: New connection from 172.30.32.2:36682 on port 1883.
2024-02-27 21:11:34: Client <unknown> closed its connection.
2024-02-27 21:13:34: New connection from 172.30.32.2:36916 on port 1883.
2024-02-27 21:13:34: Client <unknown> closed its connection.

Tu as quoi comme clé zigbee ?
Pas de ZHA qui traine ?

Alors j’ai ZHA qui est activé


Si je le supprime, comment est il possible de le récupérer ?
La clé est une SONOFF ZigBee 3.0 USB Dongle Plus, EFR32MG21 Coordinator, Universelle USB ZigBee Hub, Passerelle ZigBee pour Home Assistant

Tu ne peux pas avoir ZHA et Zigbee2mqtt en même temps.
Soit tu supprimes ZHA, soit z2m.

Ben voilà…
Pas de Z2m et ZHA avec une seule clé zigbee :grin:
Faut faire un choix…

Si je n’arrive pas à faire fonctionner Z2M est il possible de réinstaller ZHA.
Si je le désactive, le conflit sera t’il toujours présent ?
Dois-je carrément supprimer ZHA ?

Non, plus de conflit, si tu le désactives.

Malheureusement en ayant désactivé ZHA et redémarré HA toujours le problème.

Capture

Par contre ta clé étant un modèle E ( expérimentale sous z2m), la conf n’est pas correcte

Il faut ajouter à la partie serial

adapter: ezsp

Je le rajoute dans serial ? Comme cela

serial:
  port: /dev/ttyACM0
  adapter: ezsp
1 « J'aime »