Problem with ZWave and Zigbee dongles after restart

Ok I know this is probably not a real Home Assistant issue but maybe someone with “less basic” Linux knowledge that I have can help me :upside_down_face:

I have Home Assistant running in a docker container running on Ubuntu on an Intel NUC. I have two dongles on USB ports of the NUC:

  • An AEON Labs Z-Stick GEN5 (Z-Wave) dongle on /dev/ttyACM0
  • A Conbee II (Zigbee) dongle on /dev/ttyACM1

For Z-Wave, I have Z-Wave JS (zwavejs2mqtt) running in its own container, and the Z-Wave JS integration in HA.
For Zigbee, I am running the ZHA integration in HA.

The problem I have is, when for some reason the NUC reboots (after a power outage), the two dongles are mounted on the wrong mount points: Z-Wave on /dev/ttyACM1 and Zigbee on /dev/ttyACM0…

What I need to do is:

  • Remove the two dongles
  • Plug in the Z-Wave dongle and wait a couple of seconds for it to mount on /dev/ttyACM0
  • Plug in the Zigbee dongle and let it mount on /dev/ttyACM1
  • Reload the two integrations in Home Assistant

The obvious solution would be to swap the names of the decices in the docker configurations of homeassistant and zwavejs2mqtt. But simply swapping the names and recreating the containers didn’t work. Zwavejd2mqtt keeps looking for the “old” device name. It’s probably doable but I suspect it requires to either patch something in the zwavejs2mqtt config, or rebuild it completely from scratch, re-adding all devices again one by one…

Is there a way to force the two dongles to mount on specific mount points?

You need to setup the dongles using thier by-id addresses instead of the virtual port. What you have now. Because of the issue you are experiencing. You can get the by id addresses under hardware (full hardware list) in HA.