i have multiple usb devices connected,
when i lose power or do a reboot, HA configures the usb again,
sometimes things stop working and i need te switch some usb cables to make it work again,
is there a solution to give them permanent port number?
tried to use chatgpt to get a solution, but that didnt work
adding this to configuration.yaml only causes errors in all my devices :
sensor:
platform: serial
name: “USB Arduino”
serial_port: “/dev/usb-arduino”
baudrate: 115200
platform: serial
name: “Zigbee Dongle”
serial_port: “/dev/usb-zigbee”
baudrate: 115200
after that i tried to use the udev rule. (second suggestion of chatgp)
but that give this error in the therminal:
zsh: command not found: udevadm
does someone have this same problem and got a good solution?
i have HA working on a HP Thinclient
Ok, now we’re getting somewhere. Despite not telling us which integrations you use beyond mysensors, it seems you might be able to use the serial path when defining the config for your RS485 to arduino:
p1 smart meter cable — DSMR Smart meter
zigbee dongle — Zigbee home automation
modbus to heat pump (cp2102) — configured in configuration.yaml (now i see modbus as interation)
RS485 to ardiuno (cp2104) — mysensors
I selected the right port in the mysensors instalation,
but when i do a reboot ttyUSB1 can change in ttyUSB0 of ttyUSB2
so then it loses connection.
last reboot after update, it switched 2 usb conectors and lost my p1 smart meter and the mysensors
than i looked what usbs were different, switched the cables (faster than setting everting up again)
and then they work again,
If you entered dev/ttyACM during installation, then you didn’t set the “right” port. You simply selected the port that was currently assigned to your device.
As explained above, you should be using /dev/serial/by-id to avoid the issues you are experiencing. Unfortunately this means you will probably have to reconfigure (or delete & reinstall) your integration in order to get to the setup page.