September 1, 20196 yr Is there a command that I can ssh into Unraid and execute to have it be the equivalent of unplugging and reinserting a USB Device? I am passing a USB zigbee coordinator cc2531 to my zigbee2mqtt docker.... everything works fine, however when the docker updates it does not start. When I am home this is no big deal as I just unplug then replug the USB dongle then start the docker container....however sometimes I am away so I would love a command line way to do this. Thanks, Dan
April 18, 20206 yr +1, this is essential apart from that, what are your experiences, are you happy with it? I am planning to use it with Home Assistant and Mosquitto, each in a docker container. Does that work? Edited April 18, 20206 yr by b0m541
April 18, 20206 yr Google is your friend https://unix.stackexchange.com/questions/7412/how-to-reconnect-a-logically-disconnected-usb-device But, you would have to be very careful to not detach the boot flash drive, as then you'll run into other problems.
April 18, 20206 yr On 9/1/2019 at 1:44 PM, goinsnoopin said: I am passing a USB zigbee coordinator cc2531 to my zigbee2mqtt docker.... there is no unraid container for zigbee2mqtt. which docker hub container are you using? koenkk?
January 12, 20215 yr On 4/18/2020 at 10:34 AM, Squid said: Google is your friend https://unix.stackexchange.com/questions/7412/how-to-reconnect-a-logically-disconnected-usb-device But, you would have to be very careful to not detach the boot flash drive, as then you'll run into other problems. I followed the instructions here which works well via command line. The usbfs interaction seems to have changed a number of times since this question was originally answered. So, here's how I cycle hub port power on Ubuntu Oneiric Ocelot from a Bash shell. Search for the bus and device number: sudo lsusb -v|less Locate the device in the bus / hub port hierarchy using the bus and device number: sudo lsusb -t|less The syntax seems to be 'bus-port.port.port.port.port...' For example, my mouse is connected to an external hub which connects to my computer's hub which internally connects to a root hub: /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci_hcd/2p, 480M |__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/6p, 480M |__ Port 1: Dev 3, If 0, Class=hub, Driver=hub/3p, 480M |__ Port 1: Dev 6, If 0, Class=HID, Driver=usbhid, 1.5M So, '2-1.1.1' in the above case. Finally, cycle the port power: echo '2-1.1.1'|sudo tee /sys/bus/usb/drivers/usb/unbind sleep 1 echo '2-1.1.1'|sudo tee /sys/bus/usb/drivers/usb/bind Is there a way to automate this to execute at reboot (or at restart of VM, or restart of OZWDaemon docker)? Edited January 12, 20215 yr by Rick_Sanchez
Archived
This topic is now archived and is closed to further replies.