zigbee2mqtt / hassio-zigbee2mqtt

Official Zigbee2MQTT Home Assistant add-on
https://www.zigbee2mqtt.io
Apache License 2.0
1.02k stars 360 forks source link

after update to 1.39-01 ver Add-on try to start but fails #625

Closed arripeo closed 2 days ago

arripeo commented 2 days ago

Description of the issue

After update to the last version the add-on try to star ricursively then fails and stop. this is my config file that was the same for all the past version

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: homeassistant server: mqtt://192.168.1.12:1883 user: xxxxxxx password: xxxxxxx serial: port: /dev/ttyUSB0 external_converters: [] devices: devices.yaml groups: groups.yaml homeassistant: true permit_join: false advanced: log_level: info pan_id: 6755 channel: 11 network_key:

Addon version

1.39.0-1

Platform

Core 2024.6.4 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240610.1

Logs of the issue (if applicable)

[09:34:55] INFO: Preparing to start... [09:34:55] INFO: Socat not enabled [09:34:56] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. [2024-07-02 09:34:59] info: z2m: Logging to console, file (filename: log.log) Error: 'homeassistant.discovery_topic' cannot not be equal to the 'mqtt.base_topic' (got 'homeassistant') at new HomeAssistant (/app/lib/extension/homeassistant.ts:191:19) at new Controller (/app/lib/controller.ts:124:45) at start (/app/index.js:152:18) [09:34:59] INFO: Preparing to start... [09:35:00] INFO: Socat not enabled [09:35:00] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. [2024-07-02 09:35:03] info: z2m: Logging to console, file (filename: log.log) Error: 'homeassistant.discovery_topic' cannot not be equal to the 'mqtt.base_topic' (got 'homeassistant') at new HomeAssistant (/app/lib/extension/homeassistant.ts:191:19) at new Controller (/app/lib/controller.ts:124:45) at start (/app/index.js:152:18) [09:35:04] INFO: Preparing to start... [09:35:04] INFO: Socat not enabled [09:35:05] INFO: Starting Zigbee2MQTT... Starting Zigbee2MQTT without watchdog. [2024-07-02 09:35:07] info: z2m: Logging to console, file (filename: log.log) Error: 'homeassistant.discovery_topic' cannot not be equal to the 'mqtt.base_topic' (got 'homeassistant') at new HomeAssistant (/app/lib/extension/homeassistant.ts:191:19) at new Controller (/app/lib/controller.ts:124:45) at start (/app/index.js:152:18)

N3rdix commented 2 days ago

Probably this issue: https://github.com/Koenkk/zigbee2mqtt/pull/23209

Adjusting your base-topic might help, but check other implications

arripeo commented 2 days ago

my homeassistant.discovery and mqtt.basetopic are the same and are "homeassistant". I haven't understood if they should be different or equal. In my opinion shal be equal

N3rdix commented 2 days ago

They must not be the same topic, that's why it's failing.

As far as I know base topic default is zigbee2mqtt

arripeo commented 2 days ago

So if i change the Mqtt base topic, will i lost all my entities and shall i re-enter all my entities? Thank

N3rdix commented 2 days ago

never touched the base topic, but you probably loose the devices if they are subscribed to those topics. But I am not technically deep enough involved to be certain.

You anyway do not have an choice (at least long-term if you do not want to be stuck on the previous version) and need to change it, I would go for a backup of everything and give it a try unless no one else can give a better advice 😄 According to https://github.com/Koenkk/zigbee2mqtt/issues/23109#issuecomment-2198491025 is seems to have worked

arripeo commented 2 days ago

Ok I've changed the base topic devices and entities was lost, then after a full bootstarp of the server everything goes up. The only thing that are missing are the alias of some entities but it's a small problem.

arripeo commented 2 days ago

The issue is solved