It has been reported that the ConBee II stick does not work with KVM and USB redirection:
opened 09:09AM - 16 May 21 UTC
closed 05:05AM - 28 May 21 UTC
The problem
I've tried setting up ZHA with a ConBee II USB stick on an Intel NUC 10 (with Home Assistant OS...
integration: zha
This is true. However, I found a nice way to get it to work anyway, by providing the serial device to the VM instead:
<serial type="dev">
<source path="/dev/ttyACM0"/>
<target type="usb-serial" port="1">
<model name="usb-serial"/>
</target>
<alias name="serial1"/>
<address type="usb" bus="0" port="4"/>
</serial>
I just wanted to post this in case anybody else has the same problem.
5 Likes
danioj
September 3, 2021, 4:53am
2
This post was very helpful to me. I was able to get mine going with a slight modification of your code (as my host path was a serial path not a tty:
<serial type='dev'>
<source path='/dev/serial/by-id/<yourusbid>'/> <----note this is the host path
<target type='usb-serial' port='1'>
<model name='usb-serial'/>
</target>
<alias name='serial1'/>
<address type='usb' bus='0' port='4'/>
</serial>
I deploy through a VM on unRAID.
WaltL
(Walt Lillyman)
September 21, 2021, 2:14am
3
My new Conbee II USB stick kept timing-out & reconnecting in my VM host (Debian 10), getting a new USB device number assignment every 30 seconds. So I flashed the Conbee II firmware to the latest version and that behavior stopped. After that, my HA VM guest (qemu/qcow2 image) was able to find and auto-configure the Conbee II USB stick. It also survives across guest & host reboots.
I used a Raspberry Pi 3B+ to build a bootable environment suitable for flashing the Conbee II USB stick .
Then I followed these firmware flashing instructions .
rjw
(RJ)
August 8, 2022, 7:46am
4
thanks, this also worked for OMV with conbee
Be2
(Be2)
November 19, 2022, 5:55pm
5
Hello,
Looks like I ran into a similar problem. I installed OMV + KVM plugin on old PC. I started Home Assistant on virtual machine and everything works except Conbee II. It is visible in HA, but in Zigbee2MQTT it shows an error. I came across this thread and tried to modify the xml configuration by editing virsh edit but I am not sure if I am making the correct entries.
Output of lsusb:
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04f3:0103 Elan Microelectronics Corp. ActiveJet K-2024 Multimedia Keyboard
Bus 001 Device 012: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Hardware in HA:
/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00
/dev/serial/by-path/pci-0000:00:1d.1-usb-0:2:1.0
DEVNAME: /dev/ttyACM0
DEVPATH: /devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0/tty/ttyACM0
I am asking for help, how should I modify the xml in this situation to make it work properly.
âŚWorked for me, too! Hug!
waffel
(waffel)
January 7, 2023, 12:06am
7
Worked for me, but the ConBee II is recognized as a âregularâ ConBee.
How does yours show up in deCONZ?
I went round on circles on this, so if it helps anyone: If you follow these steps and it still doesnât work - try removing any other USB devices.
It was only that I spotted that the device in my HA VM was showing up as âaudioâ instead of âdialoutâ like on the host that I realised a Bluetooth Audio usb dongle I had plugged in was interfering!
kdw2060
(Kris De Winter)
January 12, 2023, 5:53pm
9
My setup: OMV+KVM plugin ; updated Conbee II firmware to latest version
Whatâs unclear to me is if you still need to use the âadd usbâ option of the KVM plugin.
If I just add the provided xml snippets from this thread then the device is not found in Home Assistant.
If I use the âadd usbâ option then the device is found, with or without the extra xml option, but the setup of ZHA fails. On one of the tries it did work, but after a while it failed and Home Assistant could again not find the device anymore.
kdw2060:
If I use the âadd usbâ option then the device is found, with or without the extra xml option, but the setup of ZHA fails. On one of the tries it did work, but after a while it failed and Home Assistant could again not find the device anymore.
Iâm having similar issues, I get it working - but then when I restart HA or the VM itâs pot luck if the Conbee stick will be discovered properly or my ZHA is borked again.
So far it seems the only âfixâ is to ensure the USB stick is detached in KVM/Unraid, ensure hardcoded XML is set again, then start the VM and pray. And even then it seems to still be potluck if it wants to work.
Starting to wonder if it might be easier to put the conbee stick on a Pi I have running a RF Remote (MiHome) over MQTT and somehow do ZigBee over MQTT back to HA as well. At least the Pi is less likely to be rebootedâŚ
Where did you save this in the KVM XML at OMV? thx
<serial type='dev'>
<source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE213839-if00'/> <----note this is the host path
<target type='usb-serial' port='1'>
<model name='usb-serial'/>
</target>
<alias name='serial1'/>
<address type='usb' bus='0' port='4'/>
</serial>
<domain type='kvm' id='4'>
<name>ha</name>
<uuid>fbffc5e0-e8a3-465d-a2df-4e8b53ad4fe1</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://debian.org/debian/12"/>
</libosinfo:libosinfo>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<vcpu placement='static'>2</vcpu>
<resource>
<partition>/machine</partition>
</resource>
<os>
<type arch='x86_64' machine='pc-q35-10.0'>hvm</type>
<loader type='rom' format='raw'>/usr/share/OVMF/OVMF_CODE.fd</loader>
<boot dev='hd'/>
<boot dev='cdrom'/>
</os>
<features>
<acpi/>
<apic/>
<vmport state='off'/>
</features>
<cpu mode='host-passthrough' check='none' migratable='on'>
<topology sockets='1' dies='1' clusters='1' cores='2' threads='1'/>
</cpu>
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup'/>
<timer name='pit' tickpolicy='delay'/>
<timer name='hpet' present='no'/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled='no'/>
<suspend-to-disk enabled='no'/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2' cache='none' io='native'/>
<source file='/iso/haos_ova-16.0.qcow2' index='1'/>
<backingStore/>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
</disk>
<controller type='usb' index='0' model='qemu-xhci' ports='15'>
<alias name='usb'/>
<address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
</controller>
<controller type='pci' index='0' model='pcie-root'>
<alias name='pcie.0'/>
</controller>
<controller type='pci' index='1' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='1' port='0x10'/>
<alias name='pci.1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='2' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='2' port='0x11'/>
<alias name='pci.2'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
</controller>
<controller type='pci' index='3' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='3' port='0x12'/>
<alias name='pci.3'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
</controller>
<controller type='pci' index='4' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='4' port='0x13'/>
<alias name='pci.4'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
</controller>
<controller type='pci' index='5' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='5' port='0x14'/>
<alias name='pci.5'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
</controller>
<controller type='pci' index='6' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='6' port='0x15'/>
<alias name='pci.6'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
</controller>
<controller type='pci' index='7' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='7' port='0x16'/>
<alias name='pci.7'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
</controller>
<controller type='pci' index='8' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='8' port='0x17'/>
<alias name='pci.8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x7'/>
</controller>
<controller type='pci' index='9' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='9' port='0x18'/>
<alias name='pci.9'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
</controller>
<controller type='pci' index='10' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='10' port='0x19'/>
<alias name='pci.10'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
</controller>
<controller type='pci' index='11' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='11' port='0x1a'/>
<alias name='pci.11'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
</controller>
<controller type='pci' index='12' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='12' port='0x1b'/>
<alias name='pci.12'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x3'/>
</controller>
<controller type='pci' index='13' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='13' port='0x1c'/>
<alias name='pci.13'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x4'/>
</controller>
<controller type='pci' index='14' model='pcie-root-port'>
<model name='pcie-root-port'/>
<target chassis='14' port='0x1d'/>
<alias name='pci.14'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x5'/>
</controller>
<controller type='sata' index='0'>
<alias name='ide'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
</controller>
<controller type='virtio-serial' index='0'>
<alias name='virtio-serial0'/>
<address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
</controller>
<interface type='direct'>
<mac address='52:54:00:e4:01:99'/>
<source network='bridge' portid='1a25424b-a5be-4dde-aa2d-7754424d73c7' dev='enp2s0' mode='bridge'/>
<target dev='macvtap3'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/0'/>
<target type='isa-serial' port='0'>
<model name='isa-serial'/>
</target>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
<source path='/dev/pts/0'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<channel type='unix'>
<source mode='bind' path='/run/libvirt/qemu/channel/4-ha/org.qemu.guest_agent.0'/>
<target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
<alias name='channel0'/>
<address type='virtio-serial' controller='0' bus='0' port='1'/>
</channel>
<channel type='spicevmc'>
<target type='virtio' name='com.redhat.spice.0' state='disconnected'/>
<alias name='channel1'/>
<address type='virtio-serial' controller='0' bus='0' port='2'/>
</channel>
<input type='tablet' bus='usb'>
<alias name='input0'/>
<address type='usb' bus='0' port='1'/>
</input>
<input type='mouse' bus='ps2'>
<alias name='input1'/>
</input>
<input type='keyboard' bus='ps2'>
<alias name='input2'/>
</input>
<graphics type='vnc' port='5900' autoport='yes' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
</graphics>
<graphics type='spice' port='5901' autoport='yes' listen='0.0.0.0'>
<listen type='address' address='0.0.0.0'/>
<image compression='off'/>
</graphics>
<audio id='1' type='spice'/>
<video>
<model type='virtio' heads='1' primary='yes'/>
<alias name='video0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
</video>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<address bus='1' device='51'/>
</source>
<alias name='hostdev0'/>
<address type='usb' bus='0' port='4'/>
</hostdev>
<redirdev bus='usb' type='spicevmc'>
<alias name='redir0'/>
<address type='usb' bus='0' port='2'/>
</redirdev>
<redirdev bus='usb' type='spicevmc'>
<alias name='redir1'/>
<address type='usb' bus='0' port='3'/>
</redirdev>
<watchdog model='itco' action='reset'>
<alias name='watchdog0'/>
</watchdog>
<memballoon model='virtio'>
<alias name='balloon0'/>
<address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
</memballoon>
<rng model='virtio'>
<backend model='random'>/dev/urandom</backend>
<alias name='rng0'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</rng>
</devices>
<seclabel type='dynamic' model='dac' relabel='yes'>
<label>+64055:+64055</label>
<imagelabel>+64055:+64055</imagelabel>
</seclabel>
</domain>