Zigbee2MQTT not starting after update to 2.0.0

I’m having problems after updating to the latest Zigbee2MQTT.
Anyone got a clue about the cause?
I went through the breaking changes, but still. I believe I’m not having a very complicated setup and using a Sonoff USB adapter.

This is from my log

[18:15:26] INFO: Preparing to start…
[18:15:26] INFO: Socat not enabled
[18:15:26] INFO: Starting Zigbee2MQTT…
Starting Zigbee2MQTT without watchdog.
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
(0, node_assert_1.default)(result instanceof Object)
at read (/app/lib/util/yaml.ts:24:15)
at Object.readIfExists (/app/lib/util/yaml.ts:36:34)
at readDevicesOrGroups (/app/lib/util/settings.ts:317:38)
at read (/app/lib/util/settings.ts:325:5)
at getPersistedSettings (/app/lib/util/settings.ts:393:21)
at Object.reRead (/app/lib/util/settings.ts:640:5)
at start (/app/index.js:130:14)

For now I restored back to 1.42.0, but it would be nice to stay up to speed

Thanks!

Did you follow these steps? Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198 · GitHub Please show your configuration.yaml

Thanks @fleskefjes Yes I tried to add that part in configuration.yaml

Here it is:

external_converters: []
devices:
  - devices.yaml
groups:
  - groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  user: ******
  password: *******
  server: mqtt://core-mosquitto:1883
serial:
  port: /dev/ttyUSB0
  adapter: zstack
advanced:
  log_level: debug
  pan_id: 6754
  channel: 15
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental: {}
availability: false

Now the log is telling me there maybe something wrong with devices or groups:

at readDevicesOrGroups (/app/lib/util/settings.ts:317:38)

Because my configuration has devices.yaml and groups.yaml, I went through those. groups.yaml is empty, which shouldn’t be a problem.
However in devices.yaml there were two old devices which I don’t have anymore. I removed these from the yaml.

Now I want to retry, however, my upgrade to 2.0.0 is not available anymore. How to get that back?

Edit: in the meantime 2.0.0.2 came through, but the problem persists

Allright solved it. The problem was also addressed by some others at Github.

In fact, the empty groups.yaml is the problem and should be deleted from configuration.yaml

Also, the recommended extra settings in that file, I had to put in.

advanced:
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false

I removed the one empty .yaml file that I had and added the above extra settings and I still get an error trying to start the add-on and access the UI. This started with the HA 2025.1 update. When I go back to Z2M 1.42.0-2, everything works correctly.

The solution to my problem was different. I added the line from this page: https://github.com/Koenkk/zigbee2mqtt/discussions/24364

After looking at the logs, I noticed my Zigbee dongle was not being recognized. Thought I would mention it here in case anyone else has the same issue.

To address both your posts:

Groups problem

What I meant here, is there is an empty groups.yaml which leads to a problem. I did not delete the groups.yaml, but instead removed the reference to it from the configuration.yaml, so the last two lines in the excerpt below:

devices:
  - devices.yaml
groups:
  - groups.yaml

Dongle problem

I added that line already before updating, after I’ve gone through the breaking changes, so I don’t know if that would have been a problem.
Good you mention it.

serial:
  port: /dev/ttyUSB0
  adapter: zstack

In my case it’s a zstack adapter (Sonoff), but might be different for others (like ember)

Hi,

I wanted to understand, if
homeassistant_legacy_triggers: false
is mandatory for V2.0, or if this also can be implemented with homeassistant_legacy_triggers: true

I have hundreds of triggers like sensor.bj_tastfeld_sideboard_rechts_action. If I add the line:
homeassistant_legacy_triggers: false to V1.42 nothings works anymore.

Thx.

I wouldn’t know about that. Acoording to the notes this gives the least amount of breaking changes. I guess make a backup and just try?