#Z2M 2.0 won't start

31 messages · Page 1 of 1 (latest)

crystal atlas
#

I've updated Z2M to 2.O from 1.4. I've read the breaking changes before I performed the upgrade.
My Z2M configuration.yaml contains:

    "adapter": zstack
    "port": "/dev/serial/by-id/usb-Silicon_Labs_slae.sh_cc2652rb_stick_-_slaesh_s_iot_stuff_00_12_4B_00_21_CC_47_C6-if00-port0"
  },
  "advanced": {
    "homeassistant_legacy_entity_attributes": false,
    "homeassistant_legacy_triggers": false,
    "legacy_api": false,
    "legacy_availability_payload": false,
    "log_level": "info",
    "pan_id": 6754,
    "channel": 11,
    "network_key": [```
The GUI gives: '502: Bad Gateway'
The log anyway shows:
```error:     z2m: Error: USB adapter discovery error (No valid USB adapter found). Specify valid 'adapter' and 'port' in your configuration.
    at discoverAdapter (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapterDiscovery.ts:523:15)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Function.create (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapter.ts:68:33)
    at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/controller/controller.ts:132:24)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:142:13)
    at start (/app/index.js:161:5)
[2025-01-14 19:17:49] error:     z2m: If this happens after updating to Zigbee2MQTT 2.0.0, see https://github.com/Koenkk/zigbee2mqtt/discussions/24364```
#

The "port" line already existed. I've only add "adapter": zstack and also already changed to "adapter": "zstack"

#

I've checked the github link. It explains the add of adapter and port in the configuration...

#

The syntax with all " " (for example "serial" instead of serial) already existed in Z2M 1.4

west orbit
#

Did you generate that YAML yourself? The way it's written, you need a trailing comma "adapter": zstack,

crystal atlas
#

No the yaml was created by the previous Z2M version

west orbit
#

What added the line "adapter": zstack then?

#

Reread, you did

#

try with the comma

crystal atlas
#

Tried with comma, restarted HA completely but same error

#
  homeassistant_legacy_entity_attributes: false
  homeassistant_legacy_triggers: false
  legacy_api: false
  legacy_availability_payload: false
device_options:
  legacy: false```
to my configuration
#

Strange because in the log I see data from devices:
2025-01-14 19:05:47] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/WC_person', payload '{"cli":" ","detection_delay":0,"fading_time":5,"illuminance_lux":4,"linkquality":131,"maximum_range":3.75,"minimum_range":0.3,"presence":true,"radar_sensitivity":9,"self_test":"check_success","target_distance":2.28}'
[2025-01-14 19:05:48] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/daikin', payload '{"child_lock":"UNLOCK","current":0,"energy":272.76,"indicator_mode":"off/on","linkquality":112,"power":0,"power_outagee":3.75,"minimum_range":0.3,"presence":true,"radar_sensitivity":9,"self_test":"check_success","target_distance":2.25}'
[2025-01-14 19:05:52] info: z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/wasmachine', payload '{"child_lock":"UNLOCK","current":0,"energy":850.41,"indicator_mode":"off/on","linkquality":47,"power":0,"power_outage_memory":"on","state":"ON","update":{"installed_version":69,"latest_version":69,"state":"idle"},"update_available":false,"voltage":225}'
But the GUI gives 502: Bad gateway

crystal atlas
#

I was not able to solve the problem and downgraded to V1.4. Restarted HA and Z2M works without any issue.
Checked the configuration.yaml and it still has the revised configuration.yaml file with "adapter" and "port".
Why Z2M works on V1.4 and won't start on V2.0

earnest meteor
#

Please share the new Z2M configuration YAML

crystal atlas
#

Thanks @earnest meteor

earnest meteor
#

What on earth is that?

crystal atlas
#

Euh, what do you mean

#

The code or the link?

earnest meteor
#

The Z2M config is YAML, not JSON

crystal atlas
#

I use Z2M since few years. Never touched the configuration.yaml. I'm not a programmer, so I suppose, years ago it was generated automatically. It remained working till 2.0 came. The file works with Z2M 1.4

#

So for 2.0 I've added the content on top of this thread

crystal atlas
#

Changed configuration.yaml from Z2M to https://codeshare.io/R7qoz4
Restarted HA and Z2M worked on 1.4.
Upgraded to 2.0.0.2 and restarted. Z2M gives again bad gateway.
HA Logs are showing:

    at discoverAdapter (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapterDiscovery.ts:523:15)
    at processTicksAndRejections (node:internal/process/task_queues:105:5)
    at Function.create (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/adapter/adapter.ts:68:33)
    at Controller.start (/app/node_modules/.pnpm/zigbee-herdsman@3.2.1/node_modules/zigbee-herdsman/src/controller/controller.ts:132:24)
    at Zigbee.start (/app/lib/zigbee.ts:69:27)
    at Controller.start (/app/lib/controller.ts:142:13)
    at start (/app/index.js:161:5)
[2025-01-15 21:27:31] error:     z2m: If this happens after updating to Zigbee2MQTT 2.0.0, see https://github.com/Koenkk/zigbee2mqtt/discussions/24364```
crystal atlas
#

Anyone able to tell me how to find the correct serial adapter. Seems maybe something has been changed

crystal atlas
#

Again downgraded to 1.42.0.2 with old configuration file and Z2M works again.

earnest meteor
#

Yeah, that points to the config not being right - did you check the 2.0 release notes and the link in the error above?

crystal atlas
#

Yes, I did, prior to the upgrade and once more after 2.0 won't start...

#

The USB dongle is no longer detected in 2.0 and it works in 1.4. The only thing for that I've added adapter: stack

crystal atlas
#

Hi, any idea how to run Z2M 2.0 with my USB dongle?