ConBee in Home Assistant on Proxmox

Monday, August 31, 2020

I had deCONZ working in Home Assistant and everything was running fine until I rebooted the Proxmox host due to some kernel updates. After the reboot the deCONZ add-on was no longer working.

ConBee

deCONZ complained about not finding the device. It was some time ago since I installed de ConBee device so I had to refresh my memory on how the passthrough was configured in Proxmox.

Like most ‘problems’ multiple things lead to the time-consuming ‘solving’ proces, in this case:

  • The USB port assignment is determined by different factor after a reboot. The ConBee was assigned to a different USB port after the reboot.
  • The ConBee device was configured to use a specific USB Port. With the port change it was no longer visible in the Home Assistant VM.
  • The name of the ConBee USB device from Dresden Elektroniks shows up as ‘Future Technology Devices International’ or FTDI.

To prevent this from happening again the USB port dependancy needs to be removed and low and behold Proxmox already has this option built in. There are two methods to configure this, you can do this via the commandline interface (CLI) or via the graphical user interface (GUI).

ConBee vs ConBee II

Before we dive into the two configuration methods, first some information on the names used with the different ConBee device versions.

Device Manufacturer Product lsusb output
ConBee FTDI FT230X Basic UART Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
ConBee II dresden elektronik ConBee II Dresden Elektronik

The methods below assume the use of a ConBee, if you have a ConBee II use the table above as a ‘translation’ table.

Mounting Conbee from the CLI

Go to ‘>_ Shell’ on your Proxmox host.

# lsusb
Bus 003 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 003 Device 003: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
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 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 007: ID 0403:6015 Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

deCONZ shows up as ‘Future Technology Devices International, Ltd Bridge(I2C/SPI/UART/FIFO)’. Notice the ID of the device ‘ID 0403:6015’. We need this ID to identify the device.

Next we need the VMID of the where we want to mount the deCONZ.

# qm list
      VMID NAME                 STATUS     MEM(MB)    BOOTDISK(GB) PID
       100 Ubuntu-desktop       stopped    1024              32.00 0
       101 hassosova-3.13       running    4096              32.00 32422

With the following qemu command we pass the deCONZ USB device through to the Home Assistant VM.

qm set 101 -usb0 host=0403:6015

The value 101 in this command is the Virtual Machine ID and the host value indicates the device.

Output

# qm set 101 -usb0 host=0403:6015
update VM 101: -usb0 host=0403:6015

In the GUI the change is also visible.

Hardware- USB Device section

To activate the new settings the VM needs to reboot.

I found this solution on the German FHEM Wiki, full credits to them.

Mounting Conbee from the GUI

In the previous section the deCONZ was mounted via the CLI. The same result can be achieved via the GUI.

Go to the ‘Hardware’ section of the VM where you want to mount the deCONZ.

Add USB device

Add the USB Device by selecting the option ‘Use USB Vendor/Device ID’ and select the deCONZ device. In my case it was the ‘FT230X Basic UART’.

Proxmox: Use USB Vendor/Device ID

Click on ‘OK’ to confirm.

In my case I already had a USB Device therefore only the change is ‘orange’ colored.

Hardware- USB Device section

Reboot the Home Assistant VM

To activate the new settings the VM needs to reboot.

Reboot the HA VM in Proxmox

In the ‘Hardware’ section of the VM the USB Device changed to ‘host=0403:6015’. Hardware in Proxmox after reboot

Add-on configuration in HA

To verify everything is working go to the ‘Supervisor’ section in Home Assistant and click on the ‘System’ tab.

System information in the Supervisor section

The ConBee is the ‘/dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DM01H1RT-if00-port0’ serial device.

Now go to the ‘Dashboard’ tab and click on the ‘deCONZ’ add-on.

deCONZ add-on

Go to the ‘Configuration’ tab and verify that the Configuration has the line

device: /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_DM01H1RT-if00-port0

deCONZ configuration

With that everything is configured to use the ConBee without the USB port dependency.

Lesson learned

  • No guarantee a USB device returns on the same USB Port after a reboot.
  • Mounting USB devices by name in Proxmox is definitely the preferred way.
  • With product versions device IDs, manufacturer and product name exposed by the USB device can be very different.
  • Document the things you know you will forget …

References