Zigbee2mqtt not starting

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
ZatarraNL
Posts: 28
Joined: Saturday 16 September 2017 9:02
Target OS: Linux
Domoticz version: 4.10717
Location: Netherlands
Contact:

Zigbee2mqtt not starting

Post by ZatarraNL »

Hello everybody,

I'm trying to install Zigbee2MQTT, but at starting Zigbee2MQTT I get the error: Port is not open.
My knowledge is limited, so I hope someone can help me. I tried searching al kinds of websites and forums, but allas, no results so far. I don't even know if it's usb related, sniffer firmware related, nodejs related or whatever. Help is appreciated.

Current situation:
- sniffer CC2531 flashed as described on zigbee2mqtt.io
- sniffer connected to pc with Debian 9 Stretch (Virtualbox on a Windows 10 machine) at port /dev/ttyACM1
- all the software installed as described on zigbee2mqtt.io, including the latest versions of node (v10.16.3) and npm (6.9.0).
- domoticz, latest version installed (not relevant yet, but just to be shure)
- /opt/zigbee2mqtt/data/configuration.yaml output:

Code: Select all

# Home Assistant integration (MQTT discovery)
homeassistant: false

# allow new devices to join
permit_join: true

# MQTT settings
mqtt:
  # MQTT base topic for zigbee2mqtt MQTT messages
  base_topic: zigbee2mqtt
  # MQTT server URL
  server: 'mqtt://localhost'
  # MQTT server authentication, uncomment if required:
  # user: my_user
  # password: my_password

# Serial settings
serial:
  # Location of CC2531 USB sniffer
  port: /dev/ttyACM1
- Output of npm start

Code: Select all

> [email protected] start /opt/zigbee2mqtt
> node index.js

  zigbee2mqtt:info 9/16/2019, 11:58:48 AM Logging to directory: '/opt/zigbee2mqtt/data/log/2019-09-16.11-58-44'
  zigbee2mqtt:info 9/16/2019, 11:58:49 AM Starting zigbee2mqtt version 1.6.0 (commit #e26ad2a)
  zigbee2mqtt:info 9/16/2019, 11:58:49 AM Starting zigbee-shepherd
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: Port is not open
    at SerialPort.close (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:425:29)
    at Znp.<anonymous> (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/znp/znp.js:107:37)
    at Generator.next (<anonymous>)
    at /opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/znp/znp.js:7:71
    at new Promise (<anonymous>)
    at __awaiter (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/znp/znp.js:3:12)
    at SerialPort.serialPort.open (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/dist/znp/znp.js:103:45)
    at SerialPort._error (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:197:14)
    at binding.open.then.err (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:241:12)
Emitted 'error' event at:
    at errorOrDestroy (internal/streams/destroy.js:107:12)
    at SerialPort.onerror (_stream_readable.js:733:7)
    at SerialPort.emit (events.js:198:13)
    at SerialPort._error (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:199:10)
    at process.nextTick (/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules/@serialport/stream/stream.js:204:31)
    at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/drijfhout/.npm/_logs/2019-09-16T09_58_49_938Z-debug.log
Does anybody know what's going wrong here?
gerbenvanasselt
Posts: 74
Joined: Friday 07 September 2018 14:46
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta 4.1
Location: Netherlands
Contact:

Re: Zigbee2mqtt not starting

Post by gerbenvanasselt »

Did you install the mosquito server (mqtt) on your system?

Verstuurd vanaf mijn ONEPLUS A6003 met Tapatalk

ZatarraNL
Posts: 28
Joined: Saturday 16 September 2017 9:02
Target OS: Linux
Domoticz version: 4.10717
Location: Netherlands
Contact:

Re: Zigbee2mqtt not starting

Post by ZatarraNL »

I had already checked the mosquitto server. Yes it is installed. v3.1 message broker. It's up and running as a daemon.
ZatarraNL
Posts: 28
Joined: Saturday 16 September 2017 9:02
Target OS: Linux
Domoticz version: 4.10717
Location: Netherlands
Contact:

Re: Zigbee2mqtt not starting

Post by ZatarraNL »

Update: I tried:

Code: Select all

sudo npm start

Adding 'sudo' works. So it seems to be a permission problem.
Maybe because i'm not using a rpi, but debian on a virtual machine. This means I do not have the user:group pi:pi. Could this be it?
Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 1 guest