Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB change port sometimes and zigbee2mqtt can't find the usb-stick #125

Open
stiech82 opened this issue Dec 3, 2023 · 1 comment
Open

Comments

@stiech82
Copy link

stiech82 commented Dec 3, 2023

Hi,

i have the problem, that my raspberry changed sometimes te usb-port. from /dev/ttyUSB0
to /dev/ttyUSB1 and back.
I don't know when it happens exactly. After a few weeks.

But zigbee2mqtt didn't found it until i changed the port in the zigbee2mqtt config.

Is it possible to give the USB-Stick a fix port or to use in zigbee2mqtt config both ports to keep running zigbee if the stick changes the port?

Thanks so much.

@StephanStS
Copy link
Contributor

Maybe you could work with udev rules?

If you get via lsusb the idVendor and idProduct you could edit udev rule file, e.g. /etc/udev/rules.d/99-usb-zigbee.rules

Depending on the USB device, these values could be the entry:

  • SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="zigbee"
  • SUBSYSTEM=="tty", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="ZigBee_CC2531"

Then (after a reboot) you would find the USB stick not only via /dev/ttyUSBx, you also find it via /dev/zigbee resp. /dev/ZigBee_CC2531 (depending your udev entries).
You can also find your stick via ls -l /dev/serial/by-id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants