Community help wanted to whitelist all compatible Zigbee and Z-Wave USB adapters for automatic discovery in Home Assistant OS

Anyone have Zigbee or Z-Wave USB adapters that is not already whitelisted for USB discovery in HA?

Back-story: Home Assistant developer bdraco recently added a new user-friendly feature for automatically discovering USB adapters for Home Assistant core integrated components like ZHA (for Zigbee) and Z-Wave JS integrations as now noted in their documentation.

https://www.home-assistant.io/blog/2021/09/01/release-20219/#usb-discovery

image

Zigbee USB adapter discovery:

https://www.home-assistant.io/integrations/zha/#discovery-via-usb-or-zeroconf

ZWave USB adapter discovery

https://www.home-assistant.io/integrations/zwave_js/#discovery-via-usb

These integrations in turn rely on the USB Discovery integration which watches host for USB devices:

https://www.home-assistant.io/integrations/usb/

This new feature means that if a user plug-in a USB adapter with a whitelisted identifier it will be auto-detected by Home Assistant OS and notify users that new devices have been discovered, however, for that to work automagically we first need a list of some identifying information about compatible USB devices added to the whitelist in each integration component.

I think it would be much appreciated by new users if existing users in the HA community that already has a working ZHA compatible Zigbee USB adapter that is presented with a unique description could give feedback here on its IDs and description so that it can hopefully be auto-detected with a “friendly name” in the future.

What is currently needed to automatically detect a Zigbee USB adapter is its “Product Description String” (a.k.a. device descriptor/descriptors) in combination with its “Vendor ID” (a.k.a. vid hex) and “Product ID” (a.k.a. pid hex).

Once we know a device descriptor, vid and pid we can attempt to get those whitelist those in Home Assistant core and its ZHA or Z-Wave JS integration components.

Using this detection method it is only possible to detect USB adapter that are configured with a such unique custom, which is only possible to configure on Zigbee USB adapters that uses USB-to-UART converter chip with a writable EEPROM (like WCH CH340B, FTDI FT231 series, or Silicon Labs CP210x series).

This means that if the manufacturer of your USB adapter has been cheap and used a USB-to-Serial bridge chip without a configurable EEPROM or missed configuring a custom “Product Description String” then Home Assistant OS can probably not auto-detect it as a unique device.

Note that if you as a customer would ask manufacturers to add this as a feature for new USB devices it should be noted a manufacturer only need to configure the “Product Description String”, and device manufacturers should not need to change the original VID or PID (as doing so would require providing custom drivers for the operating system).

https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/manifest.json

  "usb": [
   {"vid":"10C4","pid":"EA60","description":"*2652*","known_devices":["slae.sh cc2652rb stick"]},
   {"vid":"10C4","pid":"EA60","description":"*tubeszb*","known_devices":["TubesZB Coordinator"]},
   {"vid":"1A86","pid":"7523","description":"*tubeszb*","known_devices":["TubesZB Coordinator"]},
   {"vid":"1A86","pid":"7523","description":"*zigstar*","known_devices":["ZigStar Coordinators"]},
   {"vid":"1CF1","pid":"0030","description":"*conbee*","known_devices":["Conbee II"]},
   {"vid":"10C4","pid":"8A2A","description":"*zigbee*","known_devices":["Nortek HUSBZB-1"]},
   {"vid":"10C4","pid":"8B34","description":"*bv 2010/10*","known_devices":["Bitron Video AV2010/10"]}
  ],

https://github.com/home-assistant/core/blob/dev/homeassistant/components/zwave_js/manifest.json

  "usb": [
    {"vid":"0658","pid":"0200","known_devices":["Aeotec Z-Stick Gen5+", "Z-WaveMe UZB"]},
    {"vid":"10C4","pid":"8A2A","description":"*z-wave*","known_devices":["Nortek HUSBZB-1"]},
    {"vid":"10C4","pid":"EA60","known_devices":["Aeotec Z-Stick 7", "Silicon Labs UZB-7", "Zooz ZST10 700"]}
  ]

https://github.com/home-assistant/core/blob/dev/homeassistant/generated/usb.py

# match https://github.com/home-assistant/core/blob/dev/homeassistant/components/zha/manifest.json and https://github.com/home-assistant/core/blob/dev/homeassistant/components/zwave_js/manifest.json

PS: For developer details se PR(s) #/54904, #54935, #54986, #56201, and #56719

FYI, omerk from Electrolama wrote that their upcoming zzhp and zzh2 USB dongles will have FT231X USB-to-UART bridge + come with customised “Product Description” strings so can be discovered.

The original zzh will however keep using the CH340E without EEPROM so can not use USB discovery.

FYI, users who got one of the first batch ITead Sonoff Zigbee 3.0 USB Dongle Plus (which has Silabs CP2102 USB-to-UART bridge with programable EEPROM) report that ITead has, unfortunately, forgot/missed or chosen not to configure their own custom “Product Description” string to it. :frowning:

That means that those cannot use USB discovery even though their hardware supports it, which is a real bummer. IMHO potential buyers should really write to them and ask them to configure this on them.

This would not be hard for ITead to fix as all they need to do is write their own “description” to the EEPROM of the CP2102N USB-to-UART chip when they flash the firmware on it before packaging it.

Hello, I was just wondering if anyone has experienced this issue before, Is set it up originally and it was all working correctly. Then I tried installing ZIgbee2MQTT and it failed, I have deleted Zigbee2MQTT and tried going back to ZHA but it keeps failing, I get the error Failed to set up check the logs

Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:152
First occurred: 14:14:25 (1 occurrences)
Last logged: 14:14:25

Error setting up entry /dev/serial/by-id/usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_Serial Number shows Up-if00-port0 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 102, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 152, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.9/site-packages/zigpy/application.py", line 69, in new
    await app.startup(auto_form)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 196, in startup
    return await self._startup(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 255, in _startup
    await self._write_stack_settings(reset_if_changed=True)
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 1129, in _write_stack_settings
    current_value = await self._znp.nvram.osal_read(
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/nvram.py", line 173, in osal_read
    raise KeyError(f"NV item does not exist: {nv_id!r}")
KeyError: 'NV item does not exist: <OsalNvIds.CONCENTRATOR_ENABLE: 50>'
Logger: zigpy.application
Source: /usr/local/lib/python3.9/site-packages/zigpy/application.py:73
First occurred: 14:14:25 (1 occurrences)
Last logged: 14:14:25

Couldn't start application
Logger: zigpy_xbee.api
Source: /usr/local/lib/python3.9/site-packages/zigpy_xbee/api.py:390
First occurred: 14:13:28 (1 occurrences)
Last logged: 14:13:28

at: No response to AP command

Logger: zigpy_zigate.api
Source: /usr/local/lib/python3.9/site-packages/zigpy_zigate/api.py:140
First occurred: 14:13:26 (1 occurrences)
Last logged: 14:13:26

Retry command 0x0002

I have tried to uninstall it Remove the Zigbee database file, Go To a backup of home assistant before I installed Zigbee2Mqtt.

When I reinstall ZHA it finds the serial device path to the USB without any Issues,

Created configuration for CP2102N USB to UART Bridge Controller, s/n: Serial Number shows up - Silicon Labs.

But I get this error image

Any Ideas What I am doing wrong?

You are sure Zigbee2MQTT is not running anymore ?

Yes It’s definitely not running or installed

@Luke1 off-topic for this subject so please suggest that you create a brand new thread for that instead.

FYI, got a reply from ITead that they will change default “CP2102 USB to UART Bridge Controller” text in the Product Description String value field to “Sonoff Zigbee 3.0 USB Dongle Plus” in their next batch.

They already tested that USB discovery works in Home Assistant on Linux, but the change will require them to generate and provide a custom device driver for Microsoft Windows-based operating systems.

Why it would require them to generate and provide a custom device driver I do not know as changing only changing the “Product Description” and leaving the original VID and PID should not require that.

BitronVideo AV2010/10 ZHA stick to be added here:

1 Like

ZigStar Stick USB discovery to be added here (PR patch by @mercenaruss = the maker of ZigStar):

ZigStar is by the way an open source hardware (USB dongle is based on CC2652P + CH340B chip):

https://community.home-assistant.io/t/zigstar-zigbee-coordinators-and-routers/338586

https://zig-star.com/projects/zigbee-stick-v4/

https://github.com/mercenaruss/zigbee-stick-v4

https://www.tindie.com/stores/zigstar/

1 Like