Erro when start the addon Zigbee2mqtt "Opening serialport 'Error: Error: No such file or directory"

In what add two temperature sensores SONOFF SNZB-02 to my HA. I have installed the Zigbee2mqtt addon from the store, flow the instructions in this site www.zigbee2mqtt.io but whem start the addon i get this error:

Zigbee2MQTT:info  2021-01-09 21:14:59: Logging to console and directory: '/share/zigbee2mqtt/log/2021-01-09.21-14-58' filename: log.txt
Zigbee2MQTT:info  2021-01-09 21:14:59: Starting Zigbee2MQTT version 1.17.0 (commit #1.17.0)
Zigbee2MQTT:info  2021-01-09 21:14:59: Starting zigbee-herdsman (0.13.46)
Zigbee2MQTT:error 2021-01-09 21:14:59: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-01-09 21:14:59: Failed to start zigbee
Zigbee2MQTT:error 2021-01-09 21:14:59: Exiting...
Zigbee2MQTT:error 2021-01-09 21:14:59: Error: Error while opening serialport 'Error: Error: No such file or directory, cannot open /dev/ttyACM0'
    at Znp.<anonymous> (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:136:32)
    at Generator.next (<anonymous>)
    at /zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:27:71
    at new Promise (<anonymous>)
    at __awaiter (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:23:12)
    at SerialPort.<anonymous> (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/dist/adapter/z-stack/znp/znp.js:134:49)
    at SerialPort._error (/zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:198:14)
    at /zigbee2mqtt-1.17.0/node_modules/zigbee-herdsman/node_modules/@serialport/stream/lib/index.js:242:12
npm 

My HA (hass.io) runs in a virtualbox and the hot OS is windows10. The hardware is a mini PC (BMAX PLUS)

Any ideia? Help will be good.

Have you passed the dongle through to the vm and verified the path in the container matches the path in the configuration?

@anon43302295 how can i do that?

By reading the virtualbox manual and doing whatever it says you need to do :man_shrugging:

I have made the serial port configuration like this.

Use virtualization software for serial port as you cam see in the image, then add it to virtual box.

The hardware list in HA.

Configuration:

serial:
  port: /dev/tty1

But the error still happen. Any ideia?

Not really, I don’t think I’ve ever used virtualbox (although that ui does look vaguely familiar), all I can say is that in proxmox you pass through the USB device itself, and then it creates the serial port in the vm, and you include that in the zigbee2mqtt configuration (/tty/ACM0 in my case).

Finally i understand the problem. It was my Cheap usb adapter Texas Instruments CC2531.
Thanks for your time.

1 Like