Zigbee2mqtt on unraid

Need help with setup of zigbee2mqtt on unraid.

I have a cc2531 stick flashed with zigbee2mqtt and i installed the zigbee2mqtt docker by koenkk however it keep failing to start. I have added a container path as well but no luck with starting

Error:

Using '/app/data' as data directory

> [email protected] start /app
> node index.js

e[32mzigbee2mqtt:info e[39m 2020-08-08 03:15:59: Logging to console and directory: '/app/data/log/2020-08-08.03-15-59' filename: log.txt
e[32mzigbee2mqtt:info e[39m 2020-08-08 03:15:59: Starting zigbee2mqtt version 1.14.2 (commit #faaf3e4)

e[32mzigbee2mqtt:info e[39m 2020-08-08 03:15:59: Starting zigbee-herdsman...
e[31mzigbee2mqtt:errore[39m 2020-08-08 03:15:59: Error while starting zigbee-herdsman

e[31mzigbee2mqtt:errore[39m 2020-08-08 03:15:59: Failed to start zigbee

e[31mzigbee2mqtt:errore[39m 2020-08-08 03:15:59: Exiting...

e[31mzigbee2mqtt:errore[39m 2020-08-08 03:15:59: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'

at Znp.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:135:32)
at Generator.next (<anonymous>)
at /app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
at new Promise (<anonymous>)
at __awaiter (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:133:49)
at SerialPort._error (/app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
at /app/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node index.js`
npm ERR! Exit status 1


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! /root/.npm/_logs/2020-08-07T19_15_59_888Z-debug.log

Require any and all help thanks

Error: Error: No such file or directory, cannot open /dev/ttyACM0'

Either you have the wrong port specified or your adapter is not identifying itself correctly.

i have confirmed that thats the correct port

What does log say?

its what ive attached and more is here. https://github.com/Koenkk/zigbee2mqtt/issues/2997#issuecomment-670678717

So there is nothing more in /root/.npm/_logs/2020-08-07T19_15_59_888Z-debug.log ?

This is the output

cat /var/lib/docker/btrfs/subvolumes/49107e302d42179f37b5d8ecdf981bf18b9f6c5586d5d8324536eab2d2ba7f5f/root/.npm/_logs/2020-08-07T19_37_19_717Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 info lifecycle [email protected]~start: [email protected]
7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/app/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]~start: CWD: /app
10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ]
11 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
12 info lifecycle [email protected]~start: Failed to exec start script
13 verbose stack Error: [email protected] start: `node index.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:311:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:311:20)
13 verbose stack     at maybeClose (internal/child_process.js:1021:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid [email protected]
15 verbose cwd /app
16 verbose Linux 4.19.107-Unraid
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v12.16.1
19 verbose npm  v6.13.4
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] start: `node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

Also, what is your docker commandline?

/usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name='zigbee2mqtt' --net='br0' --ip='192.168.1.214' -e TZ="Asia/Singapore" -e HOST_OS="Unraid" -v '/mnt/cache/appdata/zigbee2mqtt':'/app/data':'rw' 'koenkk/zigbee2mqtt' 
a733da0b8cff547400269facc57d493df66389425e996c7038fdd8705d42b0aeQ

This is what i know it ran when i installed zigbee2mqtt

The docs say

docker run -it -v $(pwd)/data:/app/data --device=/dev/ttyACM0  -e TZ=Europe/Amsterdam  -v /run/udev:/run/udev:ro  --privileged=true koenkk/zigbee2mqtt

First, I notice you haven’t passed a device through, which seems a likely candidate given your error message.

Second the recommended way is --net=host - not sure what difference that will make.

oh shit using extra parameter for unraid words. Thanks so much have been so troubled by this for so long.

That caught me out too. The path to the adaptor needs to be added to the configuration.yaml for zigbee2mqtt AND as a device in the docker config