Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

USB Device command line restart?

Featured Replies

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

  • 7 months later...

+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 by b0m541

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?

  • 8 months later...
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 by Rick_Sanchez

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.