WTH does Zigbee2MQTT refuse to load?

I have tried everything I can think of, plus anything I’ve found in the community:

  • Installed MQTT broker
  • Set up broker with user account (core-mosquitto:1883) and matching HA user
  • Plugged in controller (Sonoff)
  • Installed Zigbee2MQTT add-on store
  • Updated Z2M config:
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://core-mosquitto:1883
  user: USERNAME
  password: PASSWORD
serial:
  port: >-
    /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_bed832a8b319ec11bc6339cc47486eb0-if00-port0
  adapter: ezsp
homeassistant: true
permit_join: true
advanced:
  log_level: info
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
  host: 0.0.0.0
experimental:
  new_api: true
zigbee_herdsman_debug: true

…and after all that, STILL getting a 502: Bad gateway error.

Here’s the log:

info  2022-10-05 21:27:33: Logging to console and directory: '/config/zigbee2mqtt/log/2022-10-05.21-27-33' filename: log.txt
info  2022-10-05 21:27:33: Starting Zigbee2MQTT version 1.28.0 (commit #unknown)
info  2022-10-05 21:27:33: Starting zigbee-herdsman (0.14.62)
error 2022-10-05 21:30:54: Failed to call 'Frontend' 'stop' (TypeError: Cannot read properties of null (reading 'clients')
    at Frontend.stop (/app/lib/extension/frontend.ts:59:39)
    at Controller.callExtensions (/app/lib/controller.ts:314:40)
    at Controller.stop (/app/lib/controller.ts:191:9)
    at stop (/app/index.js:113:5)
    at process.handleQuit (/app/index.js:119:9))

Fought with this for 4 solid hours and still no luck. :frowning:

Change adapter: ezsp to adapter: zstack (or remove the adapter line entirely)

Also, I would recommend the following:

  • Generate a different network key since it looks like you’re using the default
  • Change the panID to something other than the default
  • Change the channel to 15, 20, or 25 depending on your Wi-Fi channel(s) at home
  • Change permit_join to false
1 Like

@Tediore Thank you! Your suggestions seems to have fixed it — although I didn’t change the channel. I wasn’t sure which to select, as our WiFi is an Eero mesh that changes channels whenever it wants.