Zigbee2Mqtt fails to load

I am running Haas in supervisor mode on a raspberry pi. I got supervisor mode running following https://peyanski.com/how-to-install-home-assistant-supervised-official-way/ (i.e., I am not running haas OS).

I had gotten everything working with my sonoff USB dongle and a bunch of sonoff devices. However recently zigbee2mqtt appears to have stopped working with the following errors in the log:


> [email protected] start
> node index.js
(node:8164) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'null/configuration.yaml'
    at Object.openSync (fs.js:497:3)
    at Object.readFileSync (fs.js:393:35)
    at Object.read (/app/lib/util/yaml.ts:7:29)
    at read (/app/lib/util/settings.ts:310:20)
    at getInternalSettings (/app/lib/util/settings.ts:406:21)
    at Object.reRead (/app/lib/util/settings.ts:684:5)
    at start (/app/index.js:85:14)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:8164) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:8164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[20:23:49] INFO: Handing over control to Zigbee2mqtt Core ...

I am not able to figure out why it trying to find configuration.yaml in a null location. Below is the 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:
  base_topic: zigbee2mqtt
  user: <mqtt_user>
  password: <mqtt_password>
serial:
  port: /dev/ttyUSB0
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
advanced:
  log_level: debug
  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
experimental: {}
availability: false

Did you manage to resolve this? As it’s just happened to me

Same. Randomly started happening. Not after any update…

EDIT: mine got fixed after I added quotes around data_path: /share/zigbee2mqtt (resulting in data_path: "/share/zigbee2mqtt") in Zigbee addon config and restarted Z2M. The quotes get stripped upon saving the YAML but it works anyway…

How this randomly happens is absolutely beyond me.

1 Like

I had to stop Z2M and then Mosquitto broker. Then started again Mosquitto and Z2M.
It worked fine for me.

1 Like

thanks @Stooovie and @rosarioscavo went through your fixes and one of them sorted me out…how very odd, gotta to love these forums