Sauvegarde de la db de zigbee2mqtt

Cest parfait cela a tres bien fonctionné !

Sur NAS pas de commande supplémentaire à faire, c’est cool.

Absolument pas apres on peut le faire a la mano aussi en passant par dsm et en copiant les fichiers extrait ^^

Bonjour, j’ai fait une tentative de sauvegarde des 3 informations nécessaires à restaurer après un backup sur z2m.
Je pense que pour tester il suffit de :

  1. Configurer une instance Gladys avec z2m
  2. Arrêter Gladys
  3. Supprimer/arrêter le container docker z2m
  4. Déplacer/supprimer les informations du container
  5. Démarrer Gladys
  6. Vérifier que le fichier /var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml contient les mêmes « network_key / pan_id / channel » qu’avant
  7. Vérifier que les devices déjà enregistrés répondent toujours

N’ayant pas de dongle z2m, j’ai fait le dev à l’aveugle.
Je recommande de tester sur un environnement de test, plutôt que sacrifier votre « prod ».

L’image : atrovato/galdys:zigbee2mqtt

Merci, bon chance.

6 « J'aime »

:heart_eyes: ça va faire plaisir à du monde ça ! Merci beaucoup @AlexTrovato.

Au besoin, si personne se dévoue je ferais un test de mon côté, c’est vraiment une fonctionnalité importante.

Est-ce que tu gère le cas des instances existantes qui ont pas les paramètres en DB pour l’instant mais qui suite à une mise à jour devront sauvegarder cette clé ?

En théorie :

  1. le container z2m n’existe pas
  • si aucune information n’est stockée en DB : création du container avec des valeurs générées par l’image, puis lecture de ces valeurs pour sauvegarde en DB
  • si les valeurs sont en DB : création du container avec les valeurs stockées
  1. si le container z2m existe
  • sauvegarde en DB (override si les variables existent déjà)

La PR est pour l’instant uniquement sur mon espace perso

j’en ai profité pour modifier quelques lourdeurs dans les tests, et quelque logs.

1 « J'aime »

On en sait plus ici ?

Désolé j’avais zappé la PR ! C’est propre :slight_smile:

Les cas que tu décris ci-dessus c’est si jamais l’utilisateur demande d’installer un container Z2M ?

Si je restaure une sauvegarde sur une instance Gladys vide, est-ce que le service va relancer les containers ?

A tester sinon, moi ça me parait bien !

Sinon je sais pas ce que t’en pense, mais j’ai jamais été fan de mettre du code bash dans Gladys (c’est pas compté dans les unit-tests du coup, c’est un peu bancal)

Je parle du fichier server/services/zigbee2mqtt/docker/gladys-z2m-zigbee2mqtt-env.sh, à mon sens ça devrait être un fichier JS ! :smiley: Bon ça concerne pas forcément cette PR mais typiquement si on pouvait le mettre en JS à un moment ça serait pas mal ^^

@AlexTrovato Petite relance par rapport à mon message ci-dessus !

Oups désolé j’ai oublié

On est obligé d’installer un container Z2M via Gladys actuellement.

Oui, si les conditions car ce sont les variables en db qui conditionnent la création des containers.

Si le container z2m est déjà la, il mettra a jour les valeurs networkId et les autres dans le container z2m et le redémarre, seulement si elles sont différentes.

EDIT : pour les scripts bash, je suis en train de migrer service par service.

1 « J'aime »

ça me parait bon du coup !

Ca serait chouette d’avoir des testeurs par contre, mais bon en ce moment c’est calme plat sur le forum ^^

Je peux tester semaine prochaine. Il faudrait juste réfléchir aux différents scénarios

J’ai reçu mon dongle sonoff ce matin mais pas encore les périphériques :wink:
Si je peux aider…

J’ai reçu un Sonoff ZBMini-L
Je peux donc tester ceci:

  • Restauration sans service ZigBee (au cas où mais pas sur que ce soit si utile) ;
  • Restauration après migration de matériel (d’un Pi à l’autre, 32bit et 64bit) ;
  • Restauration du même matos avec et sans changement de port USB.

Je ne sais pas tester

  • Restauration avec changement de dongle (même ou autre modèle)
    Vous pensez à autre chose?

Par contre, aucune idée de comment créer une image de test au départ d’une PR, si vous voyez où je veux en venir :wink:

Édit: Typo

Pour info, en général, je génère une image de test :wink:
Je suis en train d’en générer une plus à jour sur le core commun (intégrer les dernière modifications), elle devrait être dispo d’ici 1 heure.

1 « J'aime »

Protocole de test suivi:

  • install clean depuis ton image :whale: :white_check_mark:
  • activation du service zigbee2mqtt :white_check_mark:
  • ajout de périphériques et test du service zigbee2mqqt :white_check_mark:
  • arrêt de gladys (et de tous les containers) :white_check_mark:
  • suppression des fichiers de configuration z2m et du container gladys-z2m-zigbee2mqtt :white_check_mark:
  • réactivation du service Zigbee2mqtt :white_check_mark:
  • test du service zigbee2mqqt :no_entry:

Lors du premier lancement du service Zigbee2Mqtt, j’ai l’erreur suivante

2022-07-20T21:54:11+0200 <error> installZ2mContainer.js:77 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt failed to backup Docker container configuration Error: ENOENT: no such file or directory, open '/var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml'
    at Object.openSync (fs.js:498:3)
    at Object.readFileSync (fs.js:394:35)
    at Zigbee2mqttManager.installZ2mContainer (/src/server/services/zigbee2mqtt/lib/installZ2mContainer.js:70:36)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Zigbee2mqttManager.init (/src/server/services/zigbee2mqtt/lib/init.js:66:5)
    at async connect (/src/server/services/zigbee2mqtt/api/zigbee2mqtt.controller.js:34:5) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/var/lib/gladysassistant/zigbee2mqtt/z2m/configuration.yaml'
}

J’ai relancé et ça a marché. Mais les données en base sont bizarres

Si je supprime tout et restaure une sauvegarde, le fichier configuration.yaml contient

advanced:
  # Optional: ZigBee pan ID (default: shown below)
  # Setting pan_id: GENERATE will make Zigbee2MQTT generate a new panID on next startup
  pan_id: 0xGENERATE
  # Optional: ZigBee channel, changing requires re-pairing of all devices. (Note: use a ZLL channel: 11, 15, 20, or 25 to avoid Problems)
  # (default: 11)
  channel: 11
  # Optional: network encryption key, will improve security
  # Note: changing requires repairing of all devices (default: shown below)
  network_key: GENERATE
2 « J'aime »

Tout apparaît comme si rien ne s’était passé

sauf que… Aucune réaction du périphérique lié
Voici le log du container Z2m après suppression du dossier Z2m (sudo rm -r /var/lib/gladysassistant/zigbee2mqtt/) et redémarrage de Gladys

Zigbee2MQTT:info  2022-07-25 19:43:52: Stopping zigbee-herdsman...
Using '/app/data' as data directory
Creating configuration file...
Zigbee2MQTT:info  2022-07-25 19:47:33: Logging to console and directory: '/app/data/log/2022-07-25.19-47-33' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:47:34: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:47:34: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:47:58: zigbee-herdsman started (reset)
Zigbee2MQTT:info  2022-07-25 19:47:58: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:47:58: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:47:58: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:47:58: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:47:58: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:47:58: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:47:58: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:47:59: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:47:59: Exiting...
Zigbee2MQTT:info  2022-07-25 19:47:59: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:48:11: Stopped zigbee-herdsman
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:48:26: Logging to console and directory: '/app/data/log/2022-07-25.19-48-26' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:48:26: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:48:26: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:48:28: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:48:28: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:48:28: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:48:28: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:48:28: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:48:28: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:48:28: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:48:29: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:48:29: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:48:29: Exiting...
Zigbee2MQTT:info  2022-07-25 19:48:29: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:48:41: Stopped zigbee-herdsman

Après redémarrage manuel du container :

Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:51:59: Logging to console and directory: '/app/data/log/2022-07-25.19-51-59' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:51:59: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:51:59: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:52:02: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:52:02: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:52:02: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:52:02: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:52:02: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:52:02: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:52:02: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:52:02: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:52:02: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:52:02: Exiting...
Zigbee2MQTT:info  2022-07-25 19:52:02: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:52:14: Stopped zigbee-herdsman
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:52:29: Logging to console and directory: '/app/data/log/2022-07-25.19-52-29' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:52:29: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:52:29: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:52:32: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:52:32: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:52:32: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:52:32: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:52:32: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:52:32: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:52:32: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:52:32: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:52:33: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:52:33: Exiting...
Zigbee2MQTT:info  2022-07-25 19:52:33: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:52:45: Stopped zigbee-herdsman
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:53:00: Logging to console and directory: '/app/data/log/2022-07-25.19-52-59' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:53:00: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:53:00: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:53:02: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:53:02: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:53:02: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:53:02: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:53:02: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:53:02: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:53:02: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:53:02: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:53:03: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:53:03: Exiting...
Zigbee2MQTT:info  2022-07-25 19:53:03: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:53:15: Stopped zigbee-herdsman
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:53:30: Logging to console and directory: '/app/data/log/2022-07-25.19-53-30' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:53:30: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:53:30: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:53:33: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:53:33: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:53:33: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:53:33: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:53:33: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:53:33: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:53:33: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:53:33: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:53:33: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:53:34: Exiting...
Zigbee2MQTT:info  2022-07-25 19:53:34: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:53:46: Stopped zigbee-herdsman
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:54:01: Logging to console and directory: '/app/data/log/2022-07-25.19-54-00' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:54:01: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:54:01: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:error 2022-07-25 19:54:03: Not connected to MQTT server!
Zigbee2MQTT:error 2022-07-25 19:54:03: Cannot send message: topic: 'zigbee2mqtt/bridge/state', payload: '{"state":"offline"}
Zigbee2MQTT:info  2022-07-25 19:54:03: Disconnecting from MQTT server
TypeError: Cannot read properties of undefined (reading 'end')
    at MQTT.disconnect (/app/lib/mqtt.ts:111:21)
    at Controller.stop (/app/lib/controller.ts:197:9)
    at stop (/app/index.js:113:5)
    at process.handleQuit (/app/index.js:119:9)
Using '/app/data' as data directory
Zigbee2MQTT:info  2022-07-25 19:54:18: Logging to console and directory: '/app/data/log/2022-07-25.19-54-18' filename: log.txt
Zigbee2MQTT:info  2022-07-25 19:54:18: Starting Zigbee2MQTT version 1.26.0 (commit #cd23aea)
Zigbee2MQTT:info  2022-07-25 19:54:18: Starting zigbee-herdsman (0.14.40)
Zigbee2MQTT:info  2022-07-25 19:54:20: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-07-25 19:54:20: Coordinator firmware version: '{"meta":{"maintrel":1,"majorrel":2,"minorrel":7,"product":1,"revision":20210708,"transportrev":2},"type":"zStack3x0"}'
Zigbee2MQTT:info  2022-07-25 19:54:20: Currently 0 devices are joined:
Zigbee2MQTT:warn  2022-07-25 19:54:20: `permit_join` set to  `true` in configuration.yaml.
Zigbee2MQTT:warn  2022-07-25 19:54:20: Allowing new devices to join.
Zigbee2MQTT:warn  2022-07-25 19:54:20: Set `permit_join` to `false` once you joined all devices.
Zigbee2MQTT:info  2022-07-25 19:54:20: Zigbee: allowing new devices to join.
Zigbee2MQTT:info  2022-07-25 19:54:21: Connecting to MQTT server at mqtt://localhost
Zigbee2MQTT:error 2022-07-25 19:54:21: MQTT failed to connect: connect ECONNREFUSED 127.0.0.1:1883
Zigbee2MQTT:error 2022-07-25 19:54:21: Exiting...
Zigbee2MQTT:info  2022-07-25 19:54:21: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-07-25 19:54:33: Stopped zigbee-herdsman
Using '/app/data' as data directory

Et le log de Gladys :

> gladys-server@ start:prod /src/server
> cross-env NODE_ENV=production node index.js
2022-07-25T21:47:06+0200 <info> job.purge.js:17 (Job.purge) Deleting all background jobs created before = Mon Jul 18 2022 21:47:06 GMT+0200 (Central European Summer Time)
Initialising OpenZWave 1.6.0 binary addon for Node.JS.
        OpenZWave Security API is ENABLED
        ZWave device db    : /usr/local/etc/openzwave
        User settings path : /src/server/services/zwave/node_modules/openzwave-shared/build/Release/../../
        Option Overrides : --Logging false --ConsoleOutput false --SaveConfiguration true
2022-07-25T21:47:14+0200 <info> index.js:14 (Object.start) starting Alexa service
2022-07-25T21:47:14+0200 <info> index.js:19 (Object.start) Starting example service
2022-07-25T21:47:14+0200 <info> index.js:64 (Object.start) Starting CalDAV service
2022-07-25T21:47:15+0200 <info> index.js:16 (Object.start) Starting zwave service
2022-07-25T21:47:15+0200 <info> service.start.js:40 (Service.start) Service zwave is not configured, so it was not started.
2022-07-25T21:47:15+0200 <info> index.js:14 (Object.start) starting GoogleActions service
2022-07-25T21:47:15+0200 <info> init.js:38 (Zigbee2mqttManager.init) Zigbee2mqtt USB dongle attached to /dev/ttyUSB0
2022-07-25T21:47:15+0200 <info> installMqttContainer.js:104 (Zigbee2mqttManager.installMqttContainer) MQTT broker container successfully started
2022-07-25T21:47:15+0200 <info> installZ2mContainer.js:88 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container is starting...
2022-07-25T21:47:21+0200 <info> installZ2mContainer.js:94 (Zigbee2mqttManager.installZ2mContainer) Zigbee2mqtt container successfully started
2022-07-25T21:47:21+0200 <info> connect.js:14 (Zigbee2mqttManager.connect) Connecting Gladys to mqtt://localhost:1884 MQTT broker...
2022-07-25T21:47:22+0200 <info> connect.js:24 (MqttClient.<anonymous>) Connected to MQTT container mqtt://localhost:1884
2022-07-25T21:47:22+0200 <info> subscribe.js:12 (Zigbee2mqttManager.subscribe) Subscribing to MQTT topic zigbee2mqtt/#
2022-07-25T21:47:22+0200 <info> index.js:18 (Object.start) Starting TP-Link service
2022-07-25T21:47:22+0200 <info> index.js:17 (Object.start) Starting eWeLink service
2022-07-25T21:47:22+0200 <info> service.start.js:40 (Service.start) Service ewelink is not configured, so it was not started.
2022-07-25T21:47:22+0200 <info> index.js:15 (Object.start) Starting Bluetooth service
2022-07-25T21:47:23+0200 <error> index.js:20 (process.<anonymous>) uncaughtException catched: uncaughtException
2022-07-25T21:47:23+0200 <error> index.js:21 (process.<anonymous>) Error: ENODEV, No such device
    at Hci.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/hci.js:100:35)
    at NobleBindings.init (/src/server/services/bluetooth/node_modules/@abandonware/noble/lib/hci-socket/bindings.js:78:13)
    at /src/server/services/bluetooth/node_modules/@abandonware/noble/lib/noble.js:60:24
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  errno: 19,
  code: 'ENODEV',
  syscall: 'bind'
}
2022-07-25T21:47:23+0200 <info> index.js:15 (Object.start) Starting Tasmota service
2022-07-25T21:47:23+0200 <info> index.js:14 (Object.start) Starting Xiaomi service
2022-07-25T21:47:23+0200 <info> index.js:13 (Object.start) Starting usb service
2022-07-25T21:47:24+0200 <info> index.js:19 (Object.start) Starting Telegram service
2022-07-25T21:47:24+0200 <info> service.start.js:40 (Service.start) Service telegram is not configured, so it was not started.
2022-07-25T21:47:24+0200 <info> index.js:16 (Object.start) Starting RTSP service
2022-07-25T21:47:24+0200 <info> index.js:18 (Object.start) Starting Philips Hue service
2022-07-25T21:47:24+0200 <info> index.js:16 (Object.start) Starting MQTT service
2022-07-25T21:47:24+0200 <info> updateContainer.js:13 (MqttHandler.updateContainer) MQTT: checking for required changes...
2022-07-25T21:47:24+0200 <info> service.start.js:40 (Service.start) Service mqtt is not configured, so it was not started.
2022-07-25T21:47:24+0200 <info> index.js:20 (Object.start) Starting Open Weather service
2022-07-25T21:47:24+0200 <info> service.start.js:40 (Service.start) Service openweather is not configured, so it was not started.
2022-07-25T21:47:24+0200 <info> scene.dailyUpdate.js:58 () Sunrise today is at 6:1 today, in your timezone = Europe/Luxembourg
2022-07-25T21:47:24+0200 <info> scene.dailyUpdate.js:59 () Sunset today is at 21:38 today, in your timezone = Europe/Luxembourg

Hope it helps !

Après redémarrage complet du pi :


image
Donc voici son log :

1658775498: mosquitto version 2.0.14 starting
1658775498: Config loaded from /mosquitto/config/mosquitto.conf.
1658775498: Opening ipv4 listen socket on port 1884.
1658775498: Opening ipv6 listen socket on port 1884.
1658775498: mosquitto version 2.0.14 running
1658775504: mosquitto version 2.0.14 terminating
1658775505: mosquitto version 2.0.14 starting
1658775505: Config loaded from /mosquitto/config/mosquitto.conf.
1658775505: Opening ipv4 listen socket on port 1884.
1658775505: Opening ipv6 listen socket on port 1884.
1658775505: mosquitto version 2.0.14 running
1658775609: New connection from 127.0.0.1:60738 on port 1884.
1658775609: New client connected from 127.0.0.1:60738 as gladys-main-instance-341414 (p2, c1, k60, u'gladys').
1658775643: New connection from 127.0.0.1:60740 on port 1884.
1658775643: New client connected from 127.0.0.1:60740 as mqttjs_9c41c1bd (p2, c1, k60, u'z2m').
1658778196: Client gladys-main-instance-341414 closed its connection.
1658778232: Client mqttjs_9c41c1bd disconnected.
1658778442: New connection from 127.0.0.1:60742 on port 1884.
1658778442: New client connected from 127.0.0.1:60742 as gladys-main-instance-66014 (p2, c1, k60, u'gladys').
1658779732: mosquitto version 2.0.14 terminating
1658779782: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
1658779783: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
1658779785: Error: Unable to open config file /mosquitto/config/mosquitto.conf.
1658779786: Error: Unable to open config file /mosquitto/config/mosquitto.conf.

J’imagine qu’il faut donc restaurer ça aussi.
L’interface Z2m est inaccessible

Merci pour ces infos. Je vais regarder d’avantages, et je vous préviendrais pour une seconde phase de test. Merci encore.

3 « J'aime »

Et encore un peu :wink:
Le fichier z2m/configuration.yaml avant :

homeassistant: false
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://localhost:1884
  user: z2m
  password: L2LwEonI4RMeDhkvL5BP
serial:
  port: /dev/ttyACM0
frontend:
  port: 8080
map_options:
  graphviz:
    colors:
      fill:
        enddevice: '#fff8ce'
        coordinator: '#e04e5d'
        router: '#4ea3e0'
      font:
        coordinator: '#ffffff'
        router: '#ffffff'
        enddevice: '#000000'
      line:
        active: '#009900'
        inactive: '#994444'
advanced:
  pan_id: 48208 
 channel: 11
  network_key:
    - 85
    - 174
    - 157
    - 235
    - 124
    - 251
    - 237
    - 225
    - 131
    - 189
    - 177
    - 21
    - 138
    - 254
    - 205
    - 168
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false
devices:
  '0xXXXXXXXXXX':
    friendly_name: '0xXXXXXXXXXXX'

Et après :

homeassistant: false
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://localhost
serial:
  port: /dev/ttyACM0
advanced:
  homeassistant_legacy_entity_attributes: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false