Conbee II setup with Zigbee2MQTT

I am trying to get the Conbee II to work with Zigbee2MQTT in a Home Assistant VM. When trying to set up the add-on the logs show the device can’t be opened. I’ve passed through the usb device to the point where Home Assistant can see it as ttyACM0:

Setting up Zigbee2MQTT I then update the configuration.yml with:

serial:
  adapter: deconz

and add:

port: /dev/ttyACM0

to the serial value in the configuration.

With all of that done, when starting the add-on the below logs occur:

[12:11:00] INFO: Preparing to start...
[12:11:00] INFO: Socat not enabled
[12:11:01] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:info  2023-04-17 12:11:04: Logging to console and directory: '/config/zigbee2mqtt/log/2023-04-17.12-11-04' filename: log.txt
Zigbee2MQTT:info  2023-04-17 12:11:04: Starting Zigbee2MQTT version 1.30.3 (commit #unknown)
Zigbee2MQTT:info  2023-04-17 12:11:04: Starting zigbee-herdsman (0.14.103)
Zigbee2MQTT:error 2023-04-17 12:11:04: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-04-17 12:11:04: Failed to start zigbee
Zigbee2MQTT:error 2023-04-17 12:11:04: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-04-17 12:11:04: Exiting...
Zigbee2MQTT:error 2023-04-17 12:11:04: Error: Error while opening serialport 'Error: Error: I/O error, cannot open /dev/ttyACM0'
    at SerialPort.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/deconz/driver/driver.ts:200:28)
    at SerialPort._error (/app/node_modules/@serialport/stream/dist/index.js:76:22)
    at /app/node_modules/@serialport/stream/dist/index.js:112:18

Any thoughts on what could be causing the device from being usable?

I will say I did try the Conbee II with the Deconz add-on but it also was having issues fully seeing the device so I removed it, restarted HA and re-plugged in the Conbee II.

When you say “Home Assistant VM”, how exactly is the VM running? Proxmox? Hyper-V?

From the SSH & Web Terminal addon, what are the permissions on /dev/ttyACM0

ls -l /dev/ttyACM0

I am running Home Assistant in a LXD VM which uses QEMU underneath. LXD is running on a pretty standard Ubuntu Server host.

When looking at the permissions of the device inside the VM I get the below:

crw-rw----    1 root     audio     166,   0 Apr 17 18:51 /dev/ttyACM0

It root owns the device and at least has read/write permissions on it. I am unsure what permissions are needed on the Conbee stick to allow Home Assistant to utilize it. Any suggestions are welcome.

I had to google LXD - correct me if I am wrong, it controls LXC sessions?

I should probably asked, what user is home assistant running as in your VM?

Also you aren’t running ZHA (or accidentally still running Deconz) too are you?

You might try running (as root)

lsof|grep ttyACM0

just to make sure nothinng else is accessing the device.

LXD is actually a combination of a LXC Manager (containers something similar to docker) and also handles VM’s using QEMU. In this case I am using a VM and not an LXC container.

As for user, I did not change anything about the install so I assume it is running as root?? (I don’t know the default user that Home Assistant runs as, but it should be using whatever the default is for Home Assistant OS).

As for ZHA or Deconz, they are not “running” but previously I did try the conbee with deconz and even then the same error presented itself. I have removed the deconz add-on, restarted the VM and re-plugged in the conbee.

Finally, when running lsof | grep ttyACM0 i get no output (I am guessing that means nothing else is using the device?).

Any other ideas are welcome, Since it’s throwing an I/O Error, I did see on these forums a while ago that Unraid users where having issues due to how the conbee was passed to the VM. Currently I am passing the conbee as a USB device. I am wondering if it needs to be passed as a unix or serial device instead so it’s usable but I am not sure.

I did a little more digging and put Zigbee2MQTT into debug mode. Below is the output:

[14:23:28] INFO: Preparing to start...
[14:23:28] INFO: Socat not enabled
[14:23:28] INFO: Zigbee Herdsman debug logging enabled
[14:23:29] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2023-04-18 14:23:32: Loaded state from file /config/zigbee2mqtt/state.json
Zigbee2MQTT:info  2023-04-18 14:23:32: Logging to console and directory: '/config/zigbee2mqtt/log/2023-04-18.14-23-32' filename: log.txt
Zigbee2MQTT:debug 2023-04-18 14:23:32: Removing old log directory '/config/zigbee2mqtt/log/2023-04-17.12-08-48'
Zigbee2MQTT:info  2023-04-18 14:23:32: Starting Zigbee2MQTT version 1.30.3 (commit #unknown)
Zigbee2MQTT:info  2023-04-18 14:23:32: Starting zigbee-herdsman (0.14.103)
Zigbee2MQTT:debug 2023-04-18 14:23:32: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[221,221,221,221,221,221,221,221],"networkKey":"HIDDEN","panID":6754},"serialPort":{"adapter":"deconz","path":"/dev/ttyACM0"}}'
2023-04-18T19:23:32.574Z zigbee-herdsman:adapter Failed to validate path: 'Error: spawn udevadm ENOENT'
2023-04-18T19:23:32.576Z zigbee-herdsman:deconz:driver Set delay to 0
2023-04-18T19:23:32.577Z zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[1,3,5,7,9,11,13,15,0,2,4,6,8,10,12,13],"panID":6754,"extendedPanID":[221,221,221,221,221,221,221,221],"channelList":[11]},"serialPort":{"path":"/dev/ttyACM0","adapter":"deconz"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","adapter":{"disableLED":false,"concurrent":null,"delay":null}}'
2023-04-18T19:23:32.578Z zigbee-herdsman:deconz:driver Opening with /dev/ttyACM0
2023-04-18T19:23:32.589Z zigbee-herdsman:deconz:driver Serialport opened
2023-04-18T19:23:32.589Z zigbee-herdsman:controller:log Started with result 'resumed'
2023-04-18T19:23:32.590Z zigbee-herdsman:controller:log Injected database: true, adapter: true
2023-04-18T19:23:32.591Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-04-18T19:23:32.625Z zigbee-herdsman:deconz:driver send read parameter request from queue. seqNr: 1 paramId: 1
2023-04-18T19:23:35.577Z zigbee-herdsman:deconz:adapter checking coordinator simple descriptor
2023-04-18T19:23:35.580Z zigbee-herdsman:deconz:driver DATA_REQUEST - destAddr: 0x0 EP:0 SeqNr. 2 request id: 1
2023-04-18T19:23:42.630Z zigbee-herdsman:deconz:driver Timeout for request - CMD: 0xa seqNr: 1
Zigbee2MQTT:error 2023-04-18 14:23:42: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-04-18 14:23:42: Failed to start zigbee
Zigbee2MQTT:error 2023-04-18 14:23:42: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-04-18 14:23:42: Exiting...
Zigbee2MQTT:error 2023-04-18 14:23:42: undefined

This time it did not give an I/O error but instead seems like a timeout issue relating to the driver and the usb.

Anybody have thoughts on what this could mean?

I did see that newer Conbee II firmware’s can cause issues with Zigbee2MQTT but I would need to check the firmware on this one.

Hi ZeroGravitas23
did you solve your problem? I’ m facing exactly the same issue as you described in your last post.

Hi, just a tip:

I could not recommend using Conbee II

I run into this issue: https://github.com/Koenkk/zigbee2mqtt/issues/11647

And Conbee Sticks do not support the Z2MQTT Backup so you can’t migrate to another Stick or to ZHA without setting up everything new.

Tried adding it by dev-id?
Here is my conf:

port: >-
  /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DF2482786-if00
adapter: deconz

It is also recommended, as there is a big change /dev/ttyACM0 won’t survive a restart, in contradiction to the ID; it will never change :wink:

I tried both alternatives:
/dev/ttyACM0
and
/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2151792-if00

But result is the same:

[20:31:58] INFO: Preparing to start...
[20:31:58] INFO: Socat not enabled
[20:31:58] INFO: Zigbee Herdsman debug logging enabled
[20:32:00] INFO: Starting Zigbee2MQTT...
Zigbee2MQTT:debug 2023-11-20 20:32:06: Can't load state from file /config/zigbee2mqtt/state.json (doesn't exist)
Zigbee2MQTT:info  2023-11-20 20:32:06: Logging to console and directory: '/config/zigbee2mqtt/log/2023-11-20.20-32-06' filename: log.txt
Zigbee2MQTT:info  2023-11-20 20:32:06: Starting Zigbee2MQTT version 1.33.2 (commit #unknown)
Zigbee2MQTT:info  2023-11-20 20:32:06: Starting zigbee-herdsman (0.21.0)
Zigbee2MQTT:debug 2023-11-20 20:32:06: Using zigbee-herdsman with settings: '{"adapter":{"concurrent":null,"delay":null,"disableLED":false},"backupPath":"/config/zigbee2mqtt/coordinator_backup.json","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","databasePath":"/config/zigbee2mqtt/database.db","network":{"channelList":[11],"extendedPanID":[63,217,92,147,160,152,174,238],"networkKey":"HIDDEN","panID":30111},"serialPort":{"adapter":"deconz","path":"/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2151792-if00"}}'
2023-11-20T19:32:06.975Z zigbee-herdsman:adapter Failed to validate path: 'Error: spawn udevadm ENOENT'
2023-11-20T19:32:06.980Z zigbee-herdsman:deconz:driver Set delay to 0
2023-11-20T19:32:06.982Z zigbee-herdsman:controller:log Starting with options '{"network":{"networkKeyDistribute":false,"networkKey":[233,214,202,193,248,147,236,99,70,72,12,79,179,1,190,188],"panID":30111,"extendedPanID":[63,217,92,147,160,152,174,238],"channelList":[11]},"serialPort":{"path":"/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2151792-if00","adapter":"deconz"},"databasePath":"/config/zigbee2mqtt/database.db","databaseBackupPath":"/config/zigbee2mqtt/database.db.backup","backupPath":"/config/zigbee2mqtt/coordinator_backup.json","adapter":{"disableLED":false,"concurrent":null,"delay":null}}'
2023-11-20T19:32:06.983Z zigbee-herdsman:deconz:driver Opening with /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2151792-if00
2023-11-20T19:32:07.000Z zigbee-herdsman:deconz:driver Serialport opened
2023-11-20T19:32:07.000Z zigbee-herdsman:controller:log Started with result 'resumed'
2023-11-20T19:32:07.001Z zigbee-herdsman:controller:log Injected database: true, adapter: true
2023-11-20T19:32:07.003Z zigbee-herdsman:controller:database:log Writing database to '/config/zigbee2mqtt/database.db'
2023-11-20T19:32:07.021Z zigbee-herdsman:deconz:driver send read parameter request from queue. seqNr: 1 paramId: 1
2023-11-20T19:32:09.983Z zigbee-herdsman:deconz:adapter checking coordinator simple descriptor
2023-11-20T19:32:09.992Z zigbee-herdsman:deconz:driver DATA_REQUEST - destAddr: 0x0 EP:0 SeqNr. 2 request id: 1
2023-11-20T19:32:17.023Z zigbee-herdsman:deconz:driver Timeout for request - CMD: 0xa seqNr: 1
Zigbee2MQTT:error 2023-11-20 20:32:17: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2023-11-20 20:32:17: Failed to start zigbee
Zigbee2MQTT:error 2023-11-20 20:32:17: Check https://www.zigbee2mqtt.io/guide/installation/20_zigbee2mqtt-fails-to-start.html for possible solutions
Zigbee2MQTT:error 2023-11-20 20:32:17: Exiting...
Zigbee2MQTT:error 2023-11-20 20:32:17: undefined

Hi Frank
at least I want to give it a try :wink:

Have you flashed the Conbee II with the latest firmware ?

And there is another issue you might want to check…

Have you installed ZHA by any change?

(or maybe it was installed automatically?)

thanks for your hints.
I tried a lot this weekend but at the end it does not work with zigbee2mqtt.
Finally I installed ZHA and it is working fine at the moment. So my Z2M experiment has come to an end :wink:
Maybe I will give it a new try later …

For sure it used to work. But now I also have issues with it