Raspberry Pi changes USB number port assignment on reboot?

My HA is not reliable after a boot because my two USB devices stop working after the USB numbers are switched. I have a Sonoff Zigbee radio and a USB ↔ Serial converter. The Serial normally boots as ttyUSB0 and the Sonoff as ttyUSB1. But sometimes they switch, so all the Zigbee devices stop working and my DAX88 Amplifier plugged into the serial converter fails. I have searched and have found a few references to setting the ports permanently, but the instructions were not clear. Pi experts talking to Pi experts are difficult to follow sometimes. Help… and thank you!

That is a known issue under Linux (not just on Pi’s). That is why every where you find the advise not to use /dev/ttyUSBx but to use /dev/serial/by-id/…

1 Like

Thank you. Do you still address it with Port: ?

In my configuration.yaml file my DAX88 is set as

media_player:

  • platform: xantech
    type: dax88
    port: /dev/ttyUSB1

Would it be:

media_player:

  • platform: xantech
    type: dax88
    port:
    /dev/serial/by-id/usb-FTDI_USB_Serial_Converter_FTDN69TN-if00-port0
1 Like

indeed. :slight_smile:

Mind if I ask a related question? I indeed see the same issue. I do see the 2 serial ports in the 2 USB ports I use in /dev/serial/by-id. But I cannot. specify that in the application in HA (see attached screen shot). Is there a work around for this
– Paul

What if the USB device is not shown under /dev/serial/by-id/…?

In my case: ESP32-S2 and DS9490R (Onewire busmaster, 04fa:2490) both on bus 1
ESP32-S2 can be accessed by-id, the DS9490R not:

What prerequisites must be given so that a USB device is shown by-id?