Passthrough of ConBee II Zigbee USB Gateway to Home Assistant Virtual Machine


danioj

Recommended Posts

5 minutes ago, SimonF said:

Not seen that on my system

 

 

   <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DEXX-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial001015'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>

 

Is it possible it is because I have the port enabled as well?  Should we enable the base USB port or just the device itself?

 

 

USB.jpg

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

Is it possible it is because I have the port enabled as well?  Should we enable the base USB port or just the device itself?

 

USB.jpg

It should only do one of them. Device first. you should see an entry in the log to say device in use for the port. 

 

My code is not doing console so not sure how that is added what vers of Unraid and VM type are you uisng?

image.png.93d2424c463e577afdb5e7ca92f4f008.png

 

	$usbstr .= "<serial type='dev'>
	<source path='${isSerialPath}'/>
	<target type='usb-serial' port='1'>
	<model name='usb-serial'/>
	</target>
	<alias name='ua-serial${usbbus}${usbdev}'/>
	<address type='usb' bus='0' port='04'/>
	</serial>" ;
	}
	else {
	$usbstr .= "<hostdev mode='subsystem' type='usb'>
	<source>
	<address bus='${usbbustrim}' device='${usbdevtrim}' />
	</source>
	</hostdev>";
	}

 

 

Edited by SimonF
Link to comment
2 minutes ago, SimonF said:

It should only do one of them. Device first. you should see an entry in the log to say device in use. 

 

My code is not doing console so not sure how that is added what vers of Unraid and VM type are you uisng?

image.png.93d2424c463e577afdb5e7ca92f4f008.png

 

	$usbstr .= "<serial type='dev'>
	<source path='${isSerialPath}'/>
	<target type='usb-serial' port='1'>
	<model name='usb-serial'/>
	</target>
	<alias name='ua-serial${usbbus}${usbdev}'/>
	<address type='usb' bus='0' port='04'/>
	</serial>" ;
	}
	else {
	$usbstr .= "<hostdev mode='subsystem' type='usb'>
	<source>
	<address bus='${usbbustrim}' device='${usbdevtrim}' />
	</source>
	</hostdev>";
	}

 

 

Running UnRaid 6.10.3 and VM as follows

VM.jpg

Link to comment
16 minutes ago, jgosnell said:

After "upgrading" the VM machine type and usb controller type to match yours, HASS no longer can see the device.  Troubleshooting now.

I had to edit the core.config_entries file is HASS to reflect a change in the device path. 

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

New path:  /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0

 

All is working again now.  I am still getting the serial and console entries but since everything seems to work I am not going to worry with it.

<serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <console type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='serial' port='1'/>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </console>

 

  • Like 1
Link to comment
On 7/15/2022 at 5:31 PM, jgosnell said:

I had to edit the core.config_entries file is HASS to reflect a change in the device path. 

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

New path:  /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0

 

All is working again now.  I am still getting the serial and console entries but since everything seems to work I am not going to worry with it.

<serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <console type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='serial' port='1'/>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </console>

 

Will see if I can recreate tried change to your VM setup still only get one entry. 

Edited by SimonF
Link to comment
On 7/15/2022 at 5:31 PM, jgosnell said:

I had to edit the core.config_entries file is HASS to reflect a change in the device path. 

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

New path:  /dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:07.0-4-if00-port0

 

All is working again now.  I am still getting the serial and console entries but since everything seems to work I am not going to worry with it.

<serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <console type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE24XXXXX-if00'/>
      <target type='serial' port='1'/>
      <alias name='ua-serial006004'/>
      <address type='usb' bus='0' port='4'/>
    </console>

 

As every thing is working for you and I cannot recreate the issue I wont continue to investigate.

 

I have added support for hot plug of a serial attach device now and you can set the port number to be used on the address line on the edit settings page for the USB device, defaults to 4.

  • Thanks 1
Link to comment
  • 4 weeks later...

After struggling a little with getting this working, matching the target port on unraid did the trick:

 

Unraid > Tools > System Devices:

image.png.ce426204b1de9f26b69950deaf5d957f.png

 

 

<serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DEXXXXXXX-if00'/>
      <target type='usb-serial' port='2'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial0'/>
      <address type='usb' bus='0' port='4'/>
</serial>

 

I then had to remap the z2m port in the Settings > Addons > Zigbee2MQTT > Configuration:

image.png.2b7e83712af4b8099693ca9b5453ac81.png

 

Link to comment
  • 3 weeks later...
  • 1 month later...

I had to update from 6.9 to 6.11 and I loss my ConBee device,  I followed the steps, but I am still no able to connected.

the steps I follow was to modify my VM Config by adding the following code

 

Quote

<serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2496880-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial0'/>
      <address type='usb' bus='0' port='4'/>
    </serial>

 

but when I when to find /config/hardware within HA HACS I was not able to find it.

where is it locate.

Link to comment
10 minutes ago, chris_netsmart said:

I had to update from 6.9 to 6.11 and I loss my ConBee device,  I followed the steps, but I am still no able to connected.

the steps I follow was to modify my VM Config by adding the following code

 

 

but when I when to find /config/hardware within HA HACS I was not able to find it.

where is it locate.

It will show like this.

 

image.thumb.png.72ada5738ef928f78f9ce811d883c9d0.png

Link to comment
6 minutes ago, SimonF said:

settings->system->hardware.

 

For me it shows just Virtual Hardware ova.

 

There three vertical dots, click on that and select all hardware

 

image.thumb.png.994b407864ce71b44a7628a3cf72531c.png

OK I have found the information - Thanks @SimonF

but now here is the interesting bit.

here is a screenshot of my information page.

 

image.png.a46ac1b912422b890031ff9789801021.png

 

but when I go through the steps to set up my Zigbee Home Automation.  it is failing,  I will post my information and see if anyone can see my mistake and help me.

 

image.png.40eafd27e6560c51c64ee9e20f41beb2.png

 

image.png.0b54f6720c1f12d85d64fb4b4a6e851d.png

here I am guesting

image.png.fc035aacfeccc6a4fe876d1a78fedc11.png

 

results

image.png.c71558406af11cb2f9f503325df55602.png

 

Link to comment
1 hour ago, chris_netsmart said:

OK I have found the information - Thanks @SimonF

but now here is the interesting bit.

here is a screenshot of my information page.

 

image.png.a46ac1b912422b890031ff9789801021.png

 

but when I go through the steps to set up my Zigbee Home Automation.  it is failing,  I will post my information and see if anyone can see my mistake and help me.

 

image.png.40eafd27e6560c51c64ee9e20f41beb2.png

 

image.png.0b54f6720c1f12d85d64fb4b4a6e851d.png

here I am guesting

image.png.fc035aacfeccc6a4fe876d1a78fedc11.png

 

results

image.png.c71558406af11cb2f9f503325df55602.png

 

You should not see the dresden name if mapped as a serial USB. Can you post your XML for the VM? Did you remove the USB from the VM Template?

Link to comment

good morning. @SimonF is my XML for my VM

 

Quote

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='9'>
  <name>Home Assistant</name>
  <uuid>23f13d0f-62fe-d3fb-0c46-790c7743b66c</uuid>
  <description>Home Assistant</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='6'/>
    <vcpupin vcpu='1' cpuset='14'/>
    <vcpupin vcpu='2' cpuset='7'/>
    <vcpupin vcpu='3' cpuset='15'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-5.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/23f13d0f-62fe-d3fb-0c46-790c7743b66c_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </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>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/disks/homeassistant/haos_ova-7.6.qcow2' index='1'/>
      <backingStore/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <alias name='sata0-0-2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <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='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:62:0b:e2'/>
      <source bridge='br0'/>
      <target dev='vnet5'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2496880-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial0'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial1'/>
    </serial>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-9-Home Assistant/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>
    <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' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' 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='no'>
      <source startupPolicy='optional'>
        <vendor id='0x1cf1'/>
        <product id='0x0030'/>
        <address bus='1' device='39'/>
      </source>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>


 

Edited by chris_netsmart
Link to comment

 This is mine

  <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial001011'/>
      <address type='usb' bus='0' port='4'/>
    </serial>

 

and this is yours look ok have removed serial numbers in the path.

 

    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      </target>
      <alias name='serial0'/>
      <address type='usb' bus='0' port='4'/>
    </serial>

 

But you need to remove this block or you can uncheck in the vmtemplate.

 

    <hostdev mode='subsystem' type='usb' managed='no'>
      <source startupPolicy='optional'>
        <vendor id='0x1cf1'/>
        <product id='0x0030'/>
        <address bus='1' device='39'/>
      </source>
      <alias name='hostdev0'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>

  • Thanks 1
Link to comment
  • 3 weeks later...

I've been having some trouble trying to setup my conbee 2 with homeassistant through unraid. I just bought it and thought it would be a breeze but after a quick search I found this forum thread. I've added some information about my struggles below and what I've tried from this thread. I hope someone finds the thing that I'm missing or has the solution to my problem.
I've used the usb plugin to connect it to my vm and it does show in homeassistant but when trying to connect it is giving errors

606204015_Screenshot2022-11-01at21_03_45.thumb.png.c1771885ed3e1f1d200a091dc4d5b223.png2092286093_Screenshot2022-11-01at21_04_15.thumb.png.7fe47cc751bb8d63bfd699eab1b4a57e.png2128240544_Screenshot2022-11-01at21_03_54.png.78edf74543191ca957aa38310b532a5d.png

 

I've also added the serial part to my VM XML as shown below

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='10'>
  <name>Linux</name>
  <uuid>148480f7-c5b2-fe44-30ae-b3521c632220</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>6291456</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='4'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='5'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-7.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/148480f7-c5b2-fe44-30ae-b3521c632220_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  </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>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/home_assistant/haos_ova-9.2.qcow2' index='1'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </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='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:9c:28:2e'/>
      <source bridge='br0'/>
      <target dev='vnet9'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2650157-if00'/>
      <target type='usb-serial' port='3'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial001011'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-10-Linux/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>
    <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' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 I did notice it shows something about tty in the VM Logs as show below

1368836564_Screenshot2022-11-01at21_01_11.thumb.png.edc587990626c376dedaf8d707d952ea.png

Link to comment
11 hours ago, JalmarVerbraak said:

I've been having some trouble trying to setup my conbee 2 with homeassistant through unraid. I just bought it and thought it would be a breeze but after a quick search I found this forum thread. I've added some information about my struggles below and what I've tried from this thread. I hope someone finds the thing that I'm missing or has the solution to my problem.
I've used the usb plugin to connect it to my vm and it does show in homeassistant but when trying to connect it is giving errors

606204015_Screenshot2022-11-01at21_03_45.thumb.png.c1771885ed3e1f1d200a091dc4d5b223.png2092286093_Screenshot2022-11-01at21_04_15.thumb.png.7fe47cc751bb8d63bfd699eab1b4a57e.png2128240544_Screenshot2022-11-01at21_03_54.png.78edf74543191ca957aa38310b532a5d.png

 

I've also added the serial part to my VM XML as shown below

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='10'>
  <name>Linux</name>
  <uuid>148480f7-c5b2-fe44-30ae-b3521c632220</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>6291456</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='4'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='5'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-7.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/148480f7-c5b2-fe44-30ae-b3521c632220_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  </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>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/home_assistant/haos_ova-9.2.qcow2' index='1'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </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='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:9c:28:2e'/>
      <source bridge='br0'/>
      <target dev='vnet9'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2650157-if00'/>
      <target type='usb-serial' port='3'>
        <model name='usb-serial'/>
      </target>
      <alias name='ua-serial001011'/>
      <address type='usb' bus='0' port='4'/>
    </serial>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-10-Linux/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>
    <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' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>

 I did notice it shows something about tty in the VM Logs as show below

1368836564_Screenshot2022-11-01at21_01_11.thumb.png.edc587990626c376dedaf8d707d952ea.png

You should not need to add anything to the XML if using the plugin as it will do that for you and why it shows connected outside. But try using the /dev/serial/by-id path rather than ttyusb0

Link to comment
11 hours ago, SimonF said:

You should not need to add anything to the XML if using the plugin as it will do that for you and why it shows connected outside. But try using the /dev/serial/by-id path rather than ttyusb0

Thank you for responding so quickly. I've shut down the VM removed the part from the XML and detached the conbee from the usb tab in unraid. I reattached the conbee 2 and checked if it added the part in the XML. Restarted the VM but still no luck with getting it to work with ZHA. It still says it is connected(outside)  and when I try to enter the serial port device path in ZHA it gives me the error shown below. I feel like I'm still missing something.

1982928193_Screenshot2022-11-02at19_49_25.png.65ce09c0d42a114389be0830899cde77.png

Link to comment
7 minutes ago, JalmarVerbraak said:

Thank you for responding so quickly. I've shut down the VM removed the part from the XML and detached the conbee from the usb tab in unraid. I reattached the conbee 2 and checked if it added the part in the XML. Restarted the VM but still no luck with getting it to work with ZHA. It still says it is connected(outside)  and when I try to enter the serial port device path in ZHA it gives me the error shown below. I feel like I'm still missing something.

1982928193_Screenshot2022-11-02at19_49_25.png.65ce09c0d42a114389be0830899cde77.png

Do you have it selected in the VM Template? it should be selected there either.

 

This is my template.

 

image.thumb.png.fef12354c4324489f4d3f7929d862b00.png

Edited by SimonF
Link to comment
7 minutes ago, JalmarVerbraak said:

No it's not selected in there either. I am running unraid 6.11.1 I don't know if that is giving any issues.

 

1993920490_Screenshot2022-11-02at20_04_56.thumb.png.c5d1d6792f568b51ee321f1cb1c70da7.png

Just to check that you enabled the serial switch on the mappings? Also did you shutdown the vm and start?

 

 

 

image.thumb.png.435f961b9565b7dd1104bc5eb0717743.png

Edited by SimonF
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.