[Plugin] USB_Manager


SimonF

Recommended Posts

I'm having a problem. I can't get Windows 11 to connect to the USBIP on my Unraid. 

 

I'm trying to connect device 5-1. On Unraid side everything looks good:

 

image.thumb.png.fbb85a6b13b0cf860c63997b3969f192.png

 

On Windows side I followed this guide: https://sourceforge.net/p/usbip/git-windows/ci/master/tree/trunk/driver/USAGE

 

but I'm getting errors:

 

C:\Users\andrz\Downloads>usbip -l 192.168.2.5
- 192.168.2.5
usbip err: usbip_network.c: 121 (usbip_recv_op_common) recv op_common, -1
usbip err:       usbip.c: 216 (query_exported_devices) recv op_common
usbip err:       usbip.c: 288 (show_exported_devices) query

 

Am I doing something wrong?

Link to comment
6 hours ago, Trylo said:

I'm having a problem. I can't get Windows 11 to connect to the USBIP on my Unraid. 

 

I'm trying to connect device 5-1. On Unraid side everything looks good:

 

image.thumb.png.fbb85a6b13b0cf860c63997b3969f192.png

 

On Windows side I followed this guide: https://sourceforge.net/p/usbip/git-windows/ci/master/tree/trunk/driver/USAGE

 

but I'm getting errors:

 

C:\Users\andrz\Downloads>usbip -l 192.168.2.5
- 192.168.2.5
usbip err: usbip_network.c: 121 (usbip_recv_op_common) recv op_common, -1
usbip err:       usbip.c: 216 (query_exported_devices) recv op_common
usbip err:       usbip.c: 288 (show_exported_devices) query

 

Am I doing something wrong?

Not loaded a client on windows before, but tested this one list works, but couldn't get the driver to work for attach.

 

https://github.com/barbalion/usbip-win-client

Edited by SimonF
  • Like 1
Link to comment
  • 2 weeks later...
2 hours ago, Snipe3000 said:

I'm seeing a Virsh Error on one of the USB devices I'm passing into a VM, does anyone know what that means?

What error detail do you get if you hover over the message?

 

This will show errors in the state file.

cat /usr/local/emhttp/state/usb.ini | grep error

Link to comment
On 4/5/2023 at 11:06 PM, SimonF said:

What error detail do you get if you hover over the message?

 

This will show errors in the state file.

cat /usr/local/emhttp/state/usb.ini | grep error

virsherror = ""
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHome Assistant-002-017.xml
error: internal error: unable to execute QEMU command 'chardev-add': Failed to add chardev 'charua-serial002017': Could not open '/dev/serial/by-id/': Is a directory
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHome Assistant-002-016.xml
error: internal error: unable to execute QEMU command 'chardev-add': Failed to add chardev 'charua-serial002016': Could not open '/dev/serial/by-id/': Is a directory

 

I see that whenever I try to connect my two devices as serial

 

612554058_Screenshot2023-04-09200150.thumb.jpg.f6fbc17d44c1b21b1646568ab855850c.jpg

Link to comment
2 hours ago, Snipe3000 said:
virsherror = ""
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHome Assistant-002-017.xml
error: internal error: unable to execute QEMU command 'chardev-add': Failed to add chardev 'charua-serial002017': Could not open '/dev/serial/by-id/': Is a directory
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHome Assistant-002-016.xml
error: internal error: unable to execute QEMU command 'chardev-add': Failed to add chardev 'charua-serial002016': Could not open '/dev/serial/by-id/': Is a directory

 

I see that whenever I try to connect my two devices as serial

 

612554058_Screenshot2023-04-09200150.thumb.jpg.f6fbc17d44c1b21b1646568ab855850c.jpg

You may not need to use the serial option, it is mainly for devices that dont work(Conbee II) if you pass as whole USB device. Try not using the serial option. want does ls /dev/serial/by-id show?

Link to comment
13 minutes ago, SimonF said:

You may not need to use the serial option, it is mainly for devices that dont work(Conbee II) if you pass as whole USB device. Try not using the serial option. want does ls /dev/serial/by-id show?

Using lsusb I get this:

 image.png.39961e234fa6ea59d0f3f8eedc7c1afc.png

 

The issues Im having is my zooz zwave stick works fine if I don't use the serial only option, but Z-Wave JS UI doesnt work unless I use serial only. If I do use serial only, zwave doesnt work in HA's integrations area anymore.

Then theres my skyconnect stick, Ive never been able to get it work properly, it always fails configuation, been trying for weeks. Currently I flashed it with Multi-pan firmware, but not having much luck there either.

 

This has all been very messy

Link to comment
12 hours ago, Snipe3000 said:

Using lsusb I get this:

 image.png.39961e234fa6ea59d0f3f8eedc7c1afc.png

 

The issues Im having is my zooz zwave stick works fine if I don't use the serial only option, but Z-Wave JS UI doesnt work unless I use serial only. If I do use serial only, zwave doesnt work in HA's integrations area anymore.

Then theres my skyconnect stick, Ive never been able to get it work properly, it always fails configuation, been trying for weeks. Currently I flashed it with Multi-pan firmware, but not having much luck there either.

 

This has all been very messy

can you provide ls /dev/seria!/by-id/ and diagnostics

Link to comment
  • 1 month later...

I found the HA settings, not sure what to change:

      {
        "entry_id": "2bb51ca17b7fa61b8d997ce1d3f2c8a2",
        "version": 3,
        "domain": "zha",
        "title": "ConBee II, s/n: DE2421314 - dresden elektronik ingenieurtechnik GmbH",
        "data": {
          "device": {
            "path": "/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0"
          },
          "radio_type": "deconz"
        },

The mappings now looks like this:

image.thumb.png.84d9007057e3df81c80256d9c601e000.png

Link to comment
1 hour ago, casperse said:

Looks like the z-wave is working but the Zigbee isnt (Both have the Virsh error)

image.thumb.png.736ba6795bf22ad752e9a95859213a6f.png

HA logs:

image.thumb.png.2e71a3c666d689b5fbc4c4dfe6698245.png

USB Logs
image.thumb.png.958e24d40d2ebfd9da4fdcc5a499744b.png
 

 

Connected out side means the device was connected outside USBM. Can you provide the output of 

cat /usr/local/emhttp/state/usb.ini | grep error

 

or

 

cat /usr/local/emhttp/state/usb.ini | grep vir

 

Link to comment
On 6/4/2023 at 12:42 PM, SimonF said:

Connected out side means the device was connected outside USBM. Can you provide the output of 

cat /usr/local/emhttp/state/usb.ini | grep error

 

or

 

cat /usr/local/emhttp/state/usb.ini | grep vir

 

Thanks (Everything worked before the Unraid update)
root@:~# cat /usr/local/emhttp/state/usb.ini | grep error
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHassio 1-001-059.xml
error: XML error: Duplicate USB address bus 0 port 4
root@~# cat /usr/local/emhttp/state/usb.ini | grep vir
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHassio 1-001-059.xml
root@:~# 

 

UPDATE (I am really trying to get this working not a happy house when Hassio isnt running 🙂
I have tried detach and attach and now get this:
image.thumb.png.8f39d66cd44bd62bda2477785a3ff45d.png

The one that says connected dosent work in HA?
I Dont now what the correct configuration should be in HA?
image.thumb.png.c56d98d69125e961e03cb8d85d6923ba.png

If anyone knows what the Blue line should be then let me know 🙂

Edited by casperse
Link to comment
1 hour ago, casperse said:

Thanks (Everything worked before the Unraid update)
root@:~# cat /usr/local/emhttp/state/usb.ini | grep error
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHassio 1-001-059.xml
error: XML error: Duplicate USB address bus 0 port 4
root@~# cat /usr/local/emhttp/state/usb.ini | grep vir
virsherror = 1
virsh = "error: Failed to attach device from /tmp/libvirthotplugusbbybusHassio 1-001-059.xml
root@:~# 

Are you able to see what devices are mapped in the VM in HA? You may need to change the serial port

Link to comment
14 hours ago, SimonF said:

Are you able to see what devices are mapped in the VM in HA? You may need to change the serial port

I finally took the courage to delete and re-add the ZHA integration in HA (Hoping it would recover all my devices again!)

And the new path is:

 

      {
        "entry_id": "1c7ac4a53b85198687c853f65f3a7fa6",
        "version": 3,
        "domain": "zha",
        "title": "/dev/ttyUSB0",
        "data": {
          "device": {
            "path": "/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0"
          },
          "radio_type": "deconz"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }

And it seem to be working for both USB now! 🙂
But only one is listed as connected? the other one still says "Virsh Error"?
Both use the port 4 as "Connect as serial" I have not been able to change them.
Can I just ignore this error? it looks like it working ok in HA
image.thumb.png.c61a51de496b5b4e75c6be69e528c7c4.png

Link to comment
4 hours ago, casperse said:

I finally took the courage to delete and re-add the ZHA integration in HA (Hoping it would recover all my devices again!)

And the new path is:

 

      {
        "entry_id": "1c7ac4a53b85198687c853f65f3a7fa6",
        "version": 3,
        "domain": "zha",
        "title": "/dev/ttyUSB0",
        "data": {
          "device": {
            "path": "/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0"
          },
          "radio_type": "deconz"
        },
        "options": {},
        "pref_disable_new_entities": false,
        "pref_disable_polling": false,
        "source": "user",
        "unique_id": null,
        "disabled_by": null
      }

And it seem to be working for both USB now! 🙂
But only one is listed as connected? the other one still says "Virsh Error"?
Both use the port 4 as "Connect as serial" I have not been able to change them.
Can I just ignore this error? it looks like it working ok in HA
image.thumb.png.c61a51de496b5b4e75c6be69e528c7c4.png

You shouldnt need serial for Zwave switch off connect as serial. Both are trying to connect as port 4 

 

image.png

Link to comment
  • 1 month later...
3 hours ago, dopeytree said:

Nothing was showing up but I'v found a workaround to add via my mac using esphome as a web app in chrome.

Just connected an esp32 + usb to serial to my system and both are detected.

 

Jul  8 12:28:24 computenode kernel: usb 1-13.4: new full-speed USB device number 19 using xhci_hcd
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager usb_add Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/bus/usb/001/019 001 019
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager Autoconnect Parent 1-13
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/bus/usb/001/019 001 019 port 1-13.4
Jul  8 12:28:24 computenode kernel: usbcore: registered new interface driver pl2303
Jul  8 12:28:24 computenode kernel: usbserial: USB Serial support registered for pl2303
Jul  8 12:28:24 computenode kernel: pl2303 1-13.4:1.0: pl2303 converter detected
Jul  8 12:28:24 computenode kernel: usb 1-13.4: pl2303 converter now attached to ttyUSB0
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager tty_add Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/ttyUSB0  
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager Processing tty attach Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/ttyUSB0  
Jul  8 12:28:24 computenode usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/ttyUSB0   port 
Jul  8 12:31:03 computenode kernel: usb 1-13.4: USB disconnect, device number 19
Jul  8 12:31:03 computenode kernel: pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
Jul  8 12:31:03 computenode kernel: pl2303 1-13.4:1.0: device disconnected
Jul  8 12:31:03 computenode usb_manager: Info: rc.usb_manager usb_remove  Prolific_Technology_Inc._USB-Serial_Controller_EPDPb109X16 /dev/bus/usb/001/019 001 019 
Jul  8 12:31:03 computenode usb_manager: Info: rc.usb_manager Device Match 001/019 vm:   001 019 
Jul  8 12:31:03 computenode usb_manager: Info: rc.usb_manager Removed 001/019 vm:  nostate 001 019
Jul  8 12:31:12 computenode kernel: usb 1-13.4: new full-speed USB device number 20 using xhci_hcd
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager usb_add Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001 /dev/bus/usb/001/020 001 020
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager Autoconnect Parent 1-13
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001 /dev/bus/usb/001/020 001 020 port 1-13.4
Jul  8 12:31:12 computenode kernel: usbcore: registered new interface driver cp210x
Jul  8 12:31:12 computenode kernel: usbserial: USB Serial support registered for cp210x
Jul  8 12:31:12 computenode kernel: cp210x 1-13.4:1.0: cp210x converter detected
Jul  8 12:31:12 computenode kernel: usb 1-13.4: cp210x converter now attached to ttyUSB0
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager tty_add Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001 /dev/ttyUSB0  
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager Processing tty attach Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001 /dev/ttyUSB0  
Jul  8 12:31:12 computenode usb_manager: Info: rc.usb_manager Autoconnect No Mapping found Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001 /dev/ttyUSB0   port 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.