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


Recommended Posts

  • 4 weeks later...
  • 3 weeks later...
  • 2 weeks later...

Can anyone shed some light on how to setupd the xml entry.

Under unraid usb devices I have this:
 

Bus 005 Device 002 Port 5-2ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]

 

So what numbers need to be where in the xaml entry?

This is my current entry:

 <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2132783-if00'/>
      <target type='usb-serial' port='5'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial1'/>
      <address type='usb' bus='0' port='5'/>
    </serial>

I can see the device in home assistant but it fails to connect so I guess some value is wrong

Link to comment
26 minutes ago, Todilo said:

Can anyone shed some light on how to setupd the xml entry.

Under unraid usb devices I have this:
 

Bus 005 Device 002 Port 5-2ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]

 

So what numbers need to be where in the xaml entry?

This is my current entry:

 <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2132783-if00'/>
      <target type='usb-serial' port='5'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial1'/>
      <address type='usb' bus='0' port='5'/>
    </serial>

I can see the device in home assistant but it fails to connect so I guess some value is wrong

Have you removed the device mapping in the VM template?

 

also name will be different in HA.

 

https://community.home-assistant.io/t/solved-conbee-2-fails-to-connect-to-zha-ha-in-unraid-vm/431276/2

Link to comment
1 hour ago, SimonF said:

Have you removed the device mapping in the VM template?

 

also name will be different in HA.

 

https://community.home-assistant.io/t/solved-conbee-2-fails-to-connect-to-zha-ha-in-unraid-vm/431276/2

image.png.cf7064e6655aa4469c44f798b5ac4740.png
Is this the device mapping you are referring to? I have tried both ways but doesn't seem to help. I can actually see the device in HA like this, now with a very weird name:

image.thumb.png.0f2809c29ad069937529f853d903f815.png

 

Edit: With this new setup it actually seem to work. I just have to reboot my entire system to see if the names stick. I now use:

/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.7-4-if00-port0

which seems, odd :)

Edited by Todilo
Link to comment
3 minutes ago, Todilo said:

image.png.cf7064e6655aa4469c44f798b5ac4740.png
Is this the device mapping you are referring to? I have tried both ways but doesn't seem to help. I can actually see the device in HA like this, now with a very weird name:

Yes that was the mapping, needs to be left unticked.

 

That name is correct and I use the by-id name in HA config.

Link to comment
2 minutes ago, SimonF said:

Yes that was the mapping, needs to be left unticked.

 

That name is correct and I use the by-id name in HA config.

Thank you. It seems to be working now. Is there a way to actually see the mapped name in Unraid. I mean home assistant could find the tricky name
/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.7-4-if00-port0

but if I go to command-line in unraid I will only see 
/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2132783-if00
 

I have also tried a reboot fully of the system now so that was awesome (last time I had a power outage and stuff stopped working)

Link to comment

Not that I know of, but you can see the attached USBs on the VM

 

root@computenode:~# 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-serial001016
  Device 0.2, Port 2, Speed 12 Mb/s, Product host:1.4, ID: hostdev0

Link to comment
  • 5 weeks later...

I apologize but I am not fully understanding the issue here. Can someone please write up a feature request for what we want to happen?

 

Some questions we need to answer:
* How can the VM manager identify these devices that need special treatment?
* What does the VM manager do with them today, and what does it need to do differently?
* If I need to buy a device to test with, can you give me an Amazon link to purchase one?
* What is the simplest possible test VM to prove whether or not it is working?

 

 

 

Edit: Many thanks to stefan.tomko for the info here: 
  https://forums.unraid.net/topic/122358-upgrade-from-692-610rc4-usb-in-vm-problem/page/2/#comment-1170445 
As this serial functionality is already handled by SimonF's excellent USB Manager plugin there is no urgency to add it to the base OS.

 

  • Like 1
Link to comment

Hello, so unfortunately I can not give any information about the technical problems, but for me personally runs the Phoscon ConBee II with Unraid "Version: 6.10.3" and Home Assistant (Home Assistant 2022.9.4; Supervisor 2022.08.6; Operating System 9.0; Frontend 20220907.2 - latest) very unstable. Since yesterday and an update of Home Assistant it now does not run at all.

With Unraid 6.9 I had no problems at all. I could simply select the stick in VM Manager (as seen in the screenshot) and it was detected cleanly in Home Assistant. Since the update to 6.10 the whole thing just doesn't work anymore.

Here is a link to the Phoscon ConBee II from Dresden Elektronik.

Can I provide more information logs etc?

Bildschirmfoto 2022-09-16 um 08.04.06.png

Edited by Pixelpaule
Link to comment

I followed instructions given by SimonF. I use USB manager but did not know that new feature has been added to pass device to VM in serial mode. So instead of modifying XML file, all you need to do is:

1) install USB manager plugin 

2) Do not attach any device in the VM properties. Instead go to USB manager menu, locate the device you want to pass to VM, and click on device settings here:

image.png.fc58db3189ccc29907f8a87927621056.png

 

3) Enable "connect as serial only"

image.png.c5ec7ab8b52ba4902e5d2d18f26c2b78.png

 

You can also select auto connect if you want to.

Side note - if you did pass the device via USB manager before, then you probably did not use serial only mode. By checking this, mode will change.

 

4) Shut down your VM and start it again, it should attach device to your selected VM in serial mode:

image.thumb.png.3dc7e4ce8c22508a8dc8dfa3d02d7532.png

 

Once that is done, all you need to do is change the path to device. I use Z2M - in Z2M configuration, I just changed path from /dev/serial/by-id/conbeeXYZ to /dev/serial/by-id/qemuXYZ

 

That is it. My Zigbee network works without any additional intervention needed, and I successfully upgraded to 6.10.3

 

More info can be found here as well: https://community.home-assistant.io/t/solved-conbee-2-fails-to-connect-to-zha-ha-in-unraid-vm/431276/8

One user reported that if you are using ZHA instead of Z2M, you need to change the config (within the VM terminal) to ~/config/.storage/core.config_entries and provide new device path

  • Like 2
  • Thanks 2
Link to comment
9 hours ago, stefan.tomko said:

I followed instructions given by SimonF. I use USB manager but did not know that new feature has been added to pass device to VM in serial mode. So instead of modifying XML file, all you need to do is:

 

Thank you for writing this up!  And thanks to SimonF for their excellent USB Manager plugin. These serial devices should not block anyone from upgrading to 6.10 and beyond.

Link to comment

@stefan.tomko unfortunately, this does not work for me, as you have described it to me... How did you connect the stick to Z2M? I have always installed Z2M according to these instructions. But unfortunately the stick is not recognized correctly in Unraid. 

 

Under port I used /dev/ttyUSB0.

 

 

Edit: These are my current settings:

751067428_Bildschirmfoto2022-09-23um18_52_41.thumb.png.3a327c5fef1ac5087475d80925a5f331.png

 

Home Assistant Hardware Infos (Settings -> System -> Hardware)

1550209035_Bildschirmfoto2022-09-23um18_58_06.thumb.png.2160a34306d737d0ad51dba60de035f7.png

 

Zigbee2MQTT Settings in HA:

1931270349_Bildschirmfoto2022-09-23um19_00_04.thumb.png.eae892624e1ff62ead5c97102e9301ed.png

And i only get this Messages in the error log from Z2M:

[19:05:53] INFO: Handing over control to Zigbee2MQTT Core ...
Zigbee2MQTT:info  2022-09-23 19:05:55: Logging to console and directory: '/config/zigbee2mqtt/log/2022-09-23.19-05-55' filename: log.txt
Zigbee2MQTT:info  2022-09-23 19:05:55: Starting Zigbee2MQTT version 1.27.2 (commit #unknown)
Zigbee2MQTT:info  2022-09-23 19:05:55: Starting zigbee-herdsman (0.14.53)
Zigbee2MQTT:info  2022-09-23 19:05:55: zigbee-herdsman started (resumed)
Zigbee2MQTT:info  2022-09-23 19:05:55: Coordinator firmware version: '{"meta":{"maintrel":0,"majorrel":38,"minorrel":114,"product":0,"revision":"0x26720700","transportrev":0},"type":"ConBee2/RaspBee2"}'
Zigbee2MQTT:info  2022-09-23 19:05:55: Currently 0 devices are joined:
Zigbee2MQTT:info  2022-09-23 19:05:55: Zigbee: disabling joining new devices.
Zigbee2MQTT:info  2022-09-23 19:05:57: Connecting to MQTT server at mqtt://core-mosquitto
Zigbee2MQTT:error 2022-09-23 19:05:57: MQTT failed to connect: Connection refused: Not authorized
Zigbee2MQTT:error 2022-09-23 19:05:57: Exiting...
Zigbee2MQTT:info  2022-09-23 19:05:57: Stopping zigbee-herdsman...
Zigbee2MQTT:info  2022-09-23 19:05:58: Stopped zigbee-herdsman


Edit Edit: 🤣

 

What surprises me the most: I have deactivated Z2M in Home Assistant and installed the ZHA integration. This works without problems and the stick is recognized correctly by ZHA. I did not change anything in the USB Manager settings.

Edited by Pixelpaule
  • Like 1
Link to comment

Here the Info for all Unraid user... This is my Post from the HA Forum

 

Okay, it works… It was a mistake in the configuration. In the first YouTube tutorial, the YouTuber did not specify a username or password in the Z2M configuration. In the updated version of the Video he does! So I had to put only the data from the mqtt-user in the configuration of Z2M! Now it seems to work!

  • Like 1
Link to comment
On 9/19/2022 at 8:52 AM, stefan.tomko said:

 

image.png.fc58db3189ccc29907f8a87927621056.png

 

3) Enable "connect as serial only"

image.png.c5ec7ab8b52ba4902e5d2d18f26c2b78.png

 

 

 

finally I update to unraid 6.11.0

 

It works great but, Do you know why my ConBeeII serial number change from DEXXXXXX in USB Manager to /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:YYY? Do you keep your original serial number in Unraid VM with USB Manager?

 

thanks

Link to comment
2 minutes ago, garion said:

 

finally I update to unraid 6.11.0

 

It works great but, Do you know why my ConBeeII serial number change from DEXXXXXX in USB Manager to /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:YYY? Do you keep your original serial number in Unraid VM with USB Manager?

 

thanks

No qemu creates a new virtual name for it in serial mode hence the new name. I use an alais on the config so i know the usb device.

  • Like 1
Link to comment

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.

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.