Zigbee2mqtt not starting / Device '' does not exist

Hi,

I’m new to zigbee2mqtt and having problems with starting it.

I’ve got the following error when trying to start with ‘npm start’:

pi@zig:/opt/zigbee2mqtt $ npm start

> zigbee2mqtt@1.10.0 start /opt/zigbee2mqtt
> node index.js

zigbee2mqtt:info  2020-02-19 20:11:28: Logging to console and directory: '/opt/zigbee2mqtt/data/log/2020-02-19.20-11-28' filename: log.txt
zigbee2mqtt:info  2020-02-19 20:11:29: Starting zigbee2mqtt version 1.10.0 (commit #8df6be8)
zigbee2mqtt:info  2020-02-19 20:11:29: Starting zigbee-herdsman...
zigbee2mqtt:info  2020-02-19 20:11:31: zigbee-herdsman started
zigbee2mqtt:info  2020-02-19 20:11:31: Coordinator firmware version: '{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}}'
zigbee2mqtt:info  2020-02-19 20:11:31: Currently 0 devices are joined:
zigbee2mqtt:warn  2020-02-19 20:11:31: `permit_join` set to  `true` in configuration.yaml.
zigbee2mqtt:warn  2020-02-19 20:11:31: Allowing new devices to join.
zigbee2mqtt:warn  2020-02-19 20:11:31: Set `permit_join` to `false` once you joined all devices.
zigbee2mqtt:info  2020-02-19 20:11:31: Zigbee: allowing new devices to join.
zigbee2mqtt:info  2020-02-19 20:11:31: Connecting to MQTT server at mqtt://192.168.0.138
zigbee2mqtt:info  2020-02-19 20:11:32: Connected to MQTT server
zigbee2mqtt:info  2020-02-19 20:11:32: MQTT publish: topic 'zigbee2mqtt/bridge/state', payload 'online'
zigbee2mqtt:info  2020-02-19 20:11:32: MQTT publish: topic 'zigbee2mqtt/bridge/config', payload '{"version":"1.10.0","commit":"8df6be8","coordinator":{"type":"zStack12","meta":{"transportrev":2,"product":0,"majorrel":2,"minorrel":6,"maintrel":3,"revision":20190608}},"log_level":"info","permit_join":true}'
**zigbee2mqtt:error 2020-02-19 20:11:43: Device '' does not exist**
**zigbee2mqtt:error 2020-02-19 20:11:43: Device '' does not exist**
**zigbee2mqtt:error 2020-02-19 20:11:43: Failed to call 'Groups' 'onMQTTMessage' (TypeError: Cannot read property '1' of null**
    at Groups.onMQTTMessage (/opt/zigbee2mqtt/lib/extension/groups.js:161:59)
    at Controller.callExtensionMethod (/opt/zigbee2mqtt/lib/controller.js:327:44)
    at processTicksAndRejections (internal/process/task_queues.js:97:5))

I really don’t know where the problem is.
I have node 12.16.1 and npm 6.13.4.

I tried zigbee2mqtt latest version from github.
My configuration.yaml ist as minimalistic as:

homeassistant: false
permit_join: true
# MQTT settings
mqtt:
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://192.168.0.138'
  # MQTT server authentication, uncomment if required:
  user: sonoff
  password: PASSWORD
serial:
  # Location of CC2531 USB sniffer
  port: /dev/ttyAMA0 

All files belong to pi:pi and are readable. The port /dev/ttyAMA0 is readable as checked as in the FAQs.

I tried Raspi V4 and now V3 - same error.

What can be the problem?
I did everything step by step as described on

Thanks for any help - after 2 nights I would be glad to find the error…
asys3

issue lsusb, then try

serial:
port: >-
/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B001949EE9C-if00

replace with what lsusb returns :slight_smile:

Yes, lsusb is the base. And privileges to access the device.
For my experience the device got always mapped at any RPI as /dev/ttyACMx so I would suggest double check your AMA path.

And once you tune the device you can follow with UDEV rules to make device name nicer and stable despite which USB port is used.

Hi there,

many thanks for the suggestions! But nothing works :face_with_raised_eyebrow:
I’m testing one usb device and a kind of raspi hat actually
https://electrolama.com/projects/zoe/
So I have two devices /dev/ttyACM0 and /dev/ttyAMA0.

Both belong to the dialout group and the user pi is part of it.

pi@zig:~ $ ls -al /dev/ttyA*
crw-rw---- 1 root dialout 166,  0 Feb 21 07:13 /dev/ttyACM0
crw-rw---- 1 root dialout 204, 64 Feb 20 09:25 /dev/ttyAMA0
pi@zig:~ $ test -w /dev/ttyACM0 && echo success || echo failure
success
pi@zig:~ $ test -w /dev/ttyAMA0 && echo success || echo failure
success

So I can’t see any problems with read/write access.

Is there a possibility to enhance the debug level?

Thanks for any further help!
Uwe

can you post the output of lsusb ?

pi@zig:/opt/zigbee2mqtt $ lsusb
Bus 001 Device 004: ID 0451:16a8 Texas Instruments, Inc. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

So you can see my usb dongle here, which I address via /dev/tty… or
/dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0001537504-if00

Uwe

I just tried some pairing and everything works :flushed:
So the error seems to be no real problem ?!
Even after pairing it occurs but there seems no problem when using the usb curl or the zoe adapter.

So I’m happy but don’t understand why noone else has this error, when starting on a clean installation.

Thanks for your tipps!
asys3