hassio-zigbee2mqtt: Z2M won´t start - required add-on configuration ‘data_path’ option is missing!

Description of the issue

Hi I´m running HAOS and I’m using the default data_path of /config/zigbee2mqtt. Here’s my current Z2mqtt configuration:

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:
  server: mqtt://localhost:1883
  user: mqttuser
  password: password
serial:
  port: >-
    /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20230508112711-if00
  adapter: ezsp

When I try to Start the add-on, it will not and the log is filled with repetitive errors:

INFO: Preparing to start...
ERROR: Something went wrong contacting the API
FATAL: A required add-on configuration option is missing!
FATAL: Please set a value for the 'data_path' option.
FATAL: If unsure, check the add-on manual for more information

Addon version

1.41.0-1

Platform

Core: 2024.11.3 Supervisor: 2024.11.4 Operating System: 13.2 Frontend: 20241106.2

Logs of the issue (if applicable)

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (1 by maintainers)

Most upvoted comments

Here are the steps that I took in order to get my Z2M add-on back up and running:

  1. Install the HA Terminal add-on.
  2. Open the HA Terminal add-on.
  3. Remove the destination folder ‘zigbee2mqtt’ in the /addon_configs/45df7312_zigbee2mqtt/ location: 3.a) Issue the command: “cd /addon_configs/45df7312_zigbee2mqtt/” 3.b) Issue the command: “rm -rf zigbee2mqtt/”
  4. Return to the home directory: 4.a) Issue the command: “cd …” 4.b) Issue the command: “cd …”
  5. Copy the existing configuration folder to the new location: 5.a) Issue the command: “cp -r config/zigbee2mqtt/ addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt”
  6. Return to the Z2M add-on Configuration page and ensure the data_path is set to “/addon_configs/zigbee2mqtt”
  7. Start the add on.

I hope this is helpful, please use extreme caution with these instructions!

Here are the steps that I took in order to get my Z2M add-on back up and running:

  1. Install the HA Terminal add-on.
  2. Open the HA Terminal add-on.
  3. Remove the destination folder ‘zigbee2mqtt’ in the /addon_configs/45df7312_zigbee2mqtt/ location: 3.a) Issue the command: “cd /addon_configs/45df7312_zigbee2mqtt/” 3.b) Issue the command: “rm -rf zigbee2mqtt/”
  4. Return to the home directory: 4.a) Issue the command: “cd …” 4.b) Issue the command: “cd …”
  5. Copy the existing configuration folder to the new location: 5.a) Issue the command: “cp -r config/zigbee2mqtt/ addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt”
  6. Return to the Z2M add-on Configuration page and ensure the data_path is set to “/addon_config/zigbee2mqtt”
  7. Start the add on.

I hope this is helpful, please use extreme caution with these instructions!

Everything worked out! Thank you! only in point 6, the path is specified incorrectly! data_path is set to “/addon_configS/zigbee2mqtt”!!!

Oh, man 😃 This was the solution. It worked immediately.

I am so happy i can´t tell you.

I updated the firmware of my Sonoff dongle E with ncp-uart-hw-v7.4.5.0-zbdonglee-115200.gbl file and i updated the add on to 2.0.0.2 and it works.

Thank you very much. I learned a lot from your input.

Have a good time, thank you and good luck ! Regards Andreas

Thanks for the tip Alain, I hadn’t thought of that. My adapter is correct. I have found /dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20231220103737-if00

But i will check firmware update of the sonoff stick tomorrow.

I try and keep you informed. Have an nice evening BR from Germany Andreas

I changed the data_path back to /config/zigbee2mqtt in the Zigbee2MQTT Configuration page and it works again, but this has to be a temporary fix until I can figure out how to move the configuration files. I don’t know why I have faced this issue as AFAIK mine is just a ‘standard’ setup under HAOSS on a RaPi

Today after updating Home Assistant, my zigbee2mqtt addon refused to start, after reading update notes i discovered that a have to do this in order to make it work again :

[Unreleased]
Zigbee2MQTT configuration is now by default stored in the addon specific configuration directory rather than the main config directory.
This is required for Home Assistant's backup functionality to work correctly.
New installations and installations using the default settings will automatically migrate to the new path, existing setups with custom settings will continue to work but need to be manually migrated to make use of Home Assistant's backups:

Stop the addon
Move the /mnt/data/supervisor/homeassistant/zigbee2mqtt folder to /mnt/data/supervisor/addon_configs/45df7312_zigbee2mqtt/zigbee2mqtt (for example using SSH/SMB or the File Explorer/VSCode addon)
Go to the addon config and change the data_path from /config/zigbee2mqtt to /addon_config/zigbee2mqtt
Start the addon
Mount addon specific configuration into the addon container (/addon_config)

1.42.0-1

What i did to make it work : -i have Visual Studio Code addon, so with the addon a added this paths : File > Add folder to workspace > /addon_configs -right clic > copy (on the folder /confi/zigbee2mqtt) -right clic on the folder /addon_configs/45df7312_zigbee2mqtt then Paste (copies zigbee2mqtt folder to 45df7312_zigbee2mqtt folder) -then go to zigbee2mqtt Addon > config > Paths and put this value there : /addon_config/zigbee2mqtt -then restart the zigbee2mqtt Addon -then the addon works well again

After doin this it started again.

Best regards 😃

Capture d’écran 2024-12-02 à 10 49 53

Capture d’écran 2024-12-02 à 10 48 59