Upgrade from 6.9.2 -> 6.10.RC4 USB in VM problem


Recommended Posts

15 minutes ago, stefan.tomko said:

Same happened to me when I was once playing with VM and adapters. But it happened for devices that I passed normally and as serial. At some point, I had 3 "virsh error" messages for 3 adapters. That was already on 6.11.0. Rebooted Unraid, rebooted VM... no luck. After few moments, I did detach and attach devices again, and virsh error was gone.

Hmm, so I tried a couple detach/attach, and it didn't seem to help.

 

However, I toggled off 'Connect as Serial Only' for both USBs - to put them back into device mode - and it seems to be working ok now? unRAID shows "Connected(Device)" again for both USBs - see below. And as far as I can tell, Z-Wave JS and Zigbee2MQTT inside HA don't show any errors - and my Z-Wave and Zigbee devices seem to be all in working order and connected. What behavior/error should I be on the lookout for to determine if switching to 'Serial Only' is even required for me? Was that only needed for Conbee II, and doesn't apply to the types of USB devices I have?

 

In case it matters: In my specific case, my two USBs have the exact same controller/ID: "Silicon Labs CP210x UART Bridge". Does that preclude me from being able to run both as serial or something? Or does it mean I don't even need to bother with serial-only in the first place?

 

image.thumb.png.d9311ff8c74b0ac318258e02caba5141.png

Edited by Magic815
Link to comment
7 minutes ago, Magic815 said:

Hmm, so I tried a couple detach/attach, and it didn't seem to help.

 

However, I toggled off 'Connect as Serial Only' for both USBs - to put them back into device mode - and it seems to be working ok now? unRAID shows "Connected(Device)" again for both USBs - see below. And as far as I can tell, Z-Wave JS and Zigbee2MQTT inside HA don't show any errors - and my Z-Wave and Zigbee devices seem to be all in working order and connected. What behavior/error should I be on the lookout for to determine if switching to 'Serial Only' is even required for me? Was that only needed for Conbee II, and doesn't apply to the types of USB devices I have?

 

In case it matters: In my specific case, my two USBs have the exact same controller/ID: "Silicon Labs CP210x UART Bridge". Does that preclude me from being able to run both as serial or something? Or does it mean I don't even need to bother with serial-only in the first place?

 

image.thumb.png.d9311ff8c74b0ac318258e02caba5141.png

If you get a Virsh error if you hover over it will give more details.

 

Did you set each serial mapping to a unique device ID, defaults to 04 but they need to be different and also those need to be available on the guest.

 

Only device I know that needs to be serial is Conbee II

Link to comment
59 minutes ago, SimonF said:

If you get a Virsh error if you hover over it will give more details.

 

Did you set each serial mapping to a unique device ID, defaults to 04 but they need to be different and also those need to be available on the guest.

 

Only device I know that needs to be serial is Conbee II

Can you expand on "needs to be available on the guest"? On one of my attempts, I thought I tried changing the 04 to 05 on one of the USBs, but it still didn't seem to work. Maybe there was an additional step I needed to take for the guest availability aspect?

 

Knowing that I'm not using Conbee II, are there other benefits of switching to serial-only? I'm starting to wonder if device-mode seems to work with my USBs in unRAID 6.10.3, should I just let it lie as-is?

Edited by Magic815
Link to comment
6 minutes ago, Magic815 said:

Knowing that I'm not using Conbee II, are there other benefits of switching to serial-only? I'm starting to wonder if device-mode seems to work with my USBs in unRAID 6.10.3, should I just let it lie as-is?

The only benefit of serial and the reason I added it to the plugin is Conbee II doesnt seem to work correctly on later kernels if passed through as a device. My ZWAVE Stick is mapped as a device and works fine.

 

image.thumb.png.7889d4dc3c5f3ca8b26d01bc7eca7e8c.png

 

the following command will show the guest ports, replace Linux4 with your VM name.

 

root@computenode:/mnt/user/appdata# virsh qemu-monitor-command Linux4 --hmp info usb
  Device 0.2, Port 1, Speed 480 Mb/s, Product QEMU USB Tablet, ID: input0
  Device 0.0, Port 2, Speed 1.5 Mb/s, Product USB Host Device, ID: hostdev0
  Device 0.0, Port 3, Speed 1.5 Mb/s, Product USB Host Device, ID: hostdev1


root@computenode:/mnt/user/appdata# virsh qemu-monitor-command HA  --hmp info usb
  Device 0.2, Port 1, Speed 480 Mb/s, Product QEMU USB Tablet, ID: input0
  Device 0.2, Port 4, Speed 12 Mb/s, Product QEMU USB Serial, ID: ua-serial001011
  Device 0.2, Port 2, Speed 12 Mb/s, Product host:1.4, ID: hostdev0

 

If you have the USB option in the VM defined as

 

image.png.abc17e1e54411ace34e3e307b81a6280.png

 

There are only 4 ports as I have on my HA vm. So Dev ID 5 will fail.

 

Hope that helps.

Link to comment

Ah, I see. This is the result I get:

image.png.e9d94c64ecc76b567270e1cd0ef36ec4.png

 

I do indeed have USB Controller set to 2.0 (EHCI).

 

I think for now I'll keep the two USBs linked as devices. However, if I run into issues in the future (like those with Conbee II are), and want to switch to serial-only for both USBs - what port numbers do you recommend I assign to each of those USBs (based on my above screenshot)?

 

As an aside (and a dumb question): I am expecting to finally get a Coral TPU next week to use with Frigate in my Home Assistant VM. It will be USB connected, and I was planning to run it in 'device' mode via USB manager. Am I "out of" USB ports that I can pass through to my HA VM? Is that an issue whether I run it via device mode or serial-only?

Edited by Magic815
Link to comment
5 minutes ago, Magic815 said:

Ah, I see. This is the result I get:

image.png.e9d94c64ecc76b567270e1cd0ef36ec4.png

 

I do indeed have USB Controller set to 2.0 (EHCI).

 

I think for now I'll keep the two USBs linked as devices. However, if I run into issues in the future (like those with Conbee II are), and want to switch to serial-only for both USBs - what port numbers do you recommend I assign to each of those USBs (based on my above screenshot)?

 

As an aside (and a dumb question): I am expecting to finally get a Coral TPU next week to use with Frigate in my Home Assistant VM. It will be USB connected, and I was planning to run it in 'device' mode via USB manager. Am I "out of" USB ports that I can pass through to my HA VM? Is that an issue whether I run it via device mode or serial-only?

I would say yes. You have an option to change to 3.0 which will give 14 ports but not sure if will create an issue with the existing ones.

 

If you have a spare USB flash device try and connect to the VM I suspect you will get a error of no available ports.

 

You can use hotplug part of my plugin to do that on VM tab without defining a map, you may have to enable hotplug in config for it to show.

Edited by SimonF
Link to comment

So I changed it to "3.0 (qemu XCHI)" - hopefully that is the recommended one out of the two 3.0 options that were listed?

 

After changing, I restarted the VM, and it seems like Z-Wave JS and Zigbee2MQTT connections are holding strong in Home Assistant, and I can still see all the end devices. Hopefully that means the switch didn't cause any issues with the existing ports? One interesting thing is my list only shows 3 line items now when I ran the command you gave me again:

image.png.fe0e46612d1481c53f837ae384a0c0d3.png

 

Is there any command I can run to verify I have 11 open USB ports now? Or I guess just something I'll find out for sure on when I plug in the Coral TPU via USB next week?

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

So I changed it to "3.0 (qemu XCHI)" - hopefully that is the recommended one out of the two 3.0 options that were listed?

 

After changing, I restarted the VM, and it seems like Z-Wave JS and Zigbee2MQTT connections are holding strong in Home Assistant, and I can still see all the end devices. Hopefully that means the switch didn't cause any issues with the existing ports? One interesting thing is my list only shows 3 line items now when I ran the command you gave me again:

image.png.fe0e46612d1481c53f837ae384a0c0d3.png

 

Is there any command I can run to verify I have 11 open USB ports now? Or I guess just something I'll find out for sure on when I plug in the Coral TPU via USB next week?

Yes that is the correct one. I dont know if they is a way to check free ports will have a look. You may have been ok on 2.0 as ome of the devices was a serial map and if you change back without disconnectimg first it womt be removed but is now as you restarted vm

Link to comment
  • 3 weeks later...
  • 1 month later...
  • 2 months later...
  • 3 weeks later...
  • 5 months later...

To answer ,y own question:

Wasn't "fixed" but it didn;t take me long to actually do it.
Used the USB plugin to connect the Conbe stick to the vm. Took it off in the VM settings before that.

Home assistant couldn't find the old one but I clicked through to mirgrate to a new radio inm ZHA and switch to the "new" connected one.

Please make a Home Assistant backup. First try all zigbee devices had the default name. Started again from a backup and then it worked.

 

Good luck.

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.