GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tostmann/zha-zboss-esp: HACS-installable Home Assistant ZHA adapter for ESP32-C6 esp-coordinator (ZBOSS NCP Serial Protocol)

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
custom_components/esp_zboss_zha
custom_components/esp_zboss_zha
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
hacs.json
hacs.json
 
 

Repository files navigation

ESP32-C6 ZBOSS adapter for Home Assistant ZHA

HACS-installable custom component that lets the Home Assistant ZHA integration use the ZBOSS NCP Serial Protocol as exposed by tostmann/esp-coordinator on ESP32-C6 hardware.

Status: 0.3.x — early. Requires esp-coordinator v1.3.57+ (validated against v1.5.77) and zigpy-zboss 2.0.4 on Home Assistant Core 2026.x. Bug reports welcome.

⚠ Broken on Home Assistant 2026.7 and newer — do not install yet. Installing this integration downgrades Home Assistant's zigpy and breaks the ZHA integration for every radio type, not just ZBOSS. zigpy-zboss 2.0.5 declares zigpy>=0.92.0,<2, while the bundled zha pins zigpy exactly (HA 2026.7 -> zigpy==2.0.0, HA 2026.8 -> zigpy==2.1.0). Home Assistant installs custom-integration requirements with uv pip install --upgrade against a constraints file that pins neither package, so the <2 cap wins and zigpy is downgraded in place. ZHA then fails to set up with TypeError: ControllerApplication.new() got an unexpected keyword argument 'device_resolver'.

The fix belongs upstream — tracked in kardia-as/zigpy-zboss#94, where the requirement should be widened to zigpy>=0.92.0,<3. We measured zigpy-zboss 2.0.5 against this firmware on both zigpy 1.6.0 and 2.1.0 and found no behavioural difference apart from that TypeError.

Already affected? Reinstall the zigpy your Core expects (pip install 'zigpy==2.1.0' on HA 2026.8, zigpy==2.0.1 on HA 2026.7.3) and restart. That survives restarts but not a Core update — the new image reinstalls the requirement and the downgrade repeats. Details in #4.

0.3.3 changelog: lifted the <2.0.2 cap — the requirement is now zigpy-zboss>=2.0.4,<3. The cap existed because zigpy-zboss 2.0.2 started reading the network key via the GetNwkKeys NCP command and aborts startup on a blank key, which the firmware could not answer. That handler ships in esp-coordinator v1.3.57 and later, so the cap is obsolete.

⚠ This raises the minimum firmware. With esp-coordinator older than v1.3.57 you can still form a network, but after a restart the adapter can no longer resume it — the firmware cannot supply a usable key and startup aborts (ControllerException: … no usable network key, as seen on 0.3.1). Update the coordinator firmware before updating this integration, or stay on 0.3.2.

Verified end-to-end on test hardware, A/B against the same coordinator (firmware v1.5.77, same formed network) and the same zigpy version, only the zigpy-zboss version differing: under 2.0.1 startup succeeds and GetNwkKeys is never issued; under 2.0.4 startup succeeds and the command returns the firmware's placeholder key with status OK. Both report the identical persisted network identity.

Note the placeholder is deliberate and unchanged in behaviour: this firmware does not expose the real network key to the host, so a ZHA-side network backup is not restorable against it either way — devices have to be re-paired. Under 2.0.1 the key simply read back blank instead. Coordinator backup/restore goes through the firmware's own NVRAM snapshot commands, not through ZHA.

Upstream fixes picked up along the way: 2.0.2 removed a flaky NVRAM read (#78), 2.0.3 fixed unbind requests (#81) and URL-style port handling (#79), 2.0.4 fixed ZDO quirks (#85) and a join handled before the device is authorized.

0.3.2 changelog: fixed a load-order race that could leave ZHA failing to start. This integration extends ZHA's RadioType enum at runtime, but it and zha set up concurrently — if zha wins the race it resolves RadioType['zboss'] before the patch lands, and its config entry fails with KeyError: 'zboss' (staying in error until the next restart). There is no manifest-level ordering fix — config-entry setup honours neither dependencies nor after_dependencies. So the integration now self-heals: once Home Assistant has fully started, it reloads any ZBOSS ZHA entry that failed, by which point the patch is in place. This also removes the old "restart twice after install" caveat.

0.3.1 changelog: capped zigpy-zboss to <2.0.2. zigpy-zboss 2.0.2 changed how the network key is read at startup — it now issues the GetNwkKeys NCP command instead of a raw NVRAM dataset read — and the esp-coordinator firmware does not implement that command yet, so on 2.0.2 the adapter cannot resume an already-formed network (startup aborts with ControllerException: … GetNwkKeys returned no usable network key). The cap will be lifted once a firmware release adds GET_NWK_KEYS support.

0.3.0 changelog: re-pinned to zigpy-zboss>=2.0.1. The three runtime compatibility shims this component used to carry are removed — all three were fixed upstream in zigpy-zboss 2.0.0 / 2.0.1, and one of them (the post-formation node_info.nwk override) would now conflict with the upstream fix. The component now does exactly one thing: register the zboss RadioType with ZHA.

0.2.0 changelog: the integration gained a config entry (config flow). Previous 0.1.x releases were config_flow: false with no load trigger, so Home Assistant never ran the integration's setup and ZBOSS never appeared in ZHA's radio picker (issue #1). After updating, add the integration once (step 5 below) — that activates it on every restart.

What it does

ZHA in stock HA does not list ZBOSS as a radio type. The Python library zigpy-zboss speaks the right wire protocol and — as of the 2.0.x line (2026) — is modern and actively maintained again. What stock HA is still missing is simply the wiring that exposes it to ZHA's radio picker.

This component:

  1. Declares zigpy-zboss>=2.0.4,<3 as a Python requirement so HACS pulls it into the HA Python environment automatically. This needs esp-coordinator firmware v1.3.57 or newer — see the 0.3.3 note above.
  2. Extends ZHA's RadioType enum with a zboss member so the UI radio picker in the ZHA add-integration flow offers ZBOSS as a choice. The patch is idempotent — a no-op if zboss is already present.

Earlier releases (≤ 0.2.x) also carried three runtime shims that patched zigpy-zboss 1.2.0 back into working order against current zigpy. Those are gone as of 0.3.0: all three were fixed upstream in zigpy-zboss 2.0.0 / 2.0.1.

The component itself has no entities and no settings. It loads through a single-instance config entry whose only purpose is to run the RadioType registration on every Home Assistant start — early enough that ZBOSS is registered before ZHA's own add-integration flow reads the radio-type list.

Installation (HACS)

  1. Make sure HACS is installed.
  2. In HACS → Integrations → ⋮ → Custom repositories, add https://github.com/tostmann/zha-zboss-esp with type "Integration".
  3. Install "ESP32-C6 ZBOSS adapter for ZHA".
  4. Restart Home Assistant.
  5. Add this integration once so it loads: Settings → Devices & Services → Add Integration → "ESP32-C6 ZBOSS adapter for ZHA" → Submit. (There is nothing to configure; this step is what activates the patches. It only needs to be done once — the entry then loads on every restart.)
  6. Now add the coordinator: Add Integration → Zigbee Home Automation. Choose Manually pick a serial port, paste the by-id path of your coordinator (something like /dev/serial/by-id/usb-Espressif_USB_JTAG_serial_debug_unit_…), and pick ZBOSS when prompted for radio type.

Installation (manual)

If you can't use HACS, copy custom_components/esp_zboss_zha/ into your HA config directory's custom_components/ folder, then pip install "zigpy-zboss>=2.0.4,<3" into your HA Python environment, and restart.

What if "ZBOSS" doesn't appear in the radio picker?

First, make sure you actually completed step 5 — adding the "ESP32-C6 ZBOSS adapter for ZHA" integration. Just installing it in HACS is not enough; without the config entry the integration never loads and the radio type is never registered. This was the cause of issue #1.

To confirm the integration loaded, check Settings → System → Logs (or home-assistant.log) for a line like:

[esp_zboss_zha] applied N compat patch(es): ...
[esp_zboss_zha] post-patch RadioType members: [...] (zboss present: True)

If you don't see those lines, the integration didn't run — re-check step 5.

If the lines are present (zboss present: True) but the dropdown still omits ZBOSS, restart Home Assistant once: ZHA may have imported its radio list before our entry was set up. With the config entry in place this is deterministic after one restart, because the entry is set up early on every boot. Remaining edge cases are tracked upstream (see kardia-as/zigpy-zboss#19).

Why a custom component instead of an upstream PR?

The library-side bugs that used to need patching here have already landed upstream — see kardia-as/zigpy-zboss#19 and the 2.0.x release line. What remains is the ZHA wiring: a RadioType.zboss member upstream in home-assistant/core ZHA is a longer conversation (the adapter:zboss is labeled "experimental"). When/if that lands, this component becomes obsolete.

Pointers

  • Firmware: tostmann/esp-coordinator, web flasher at https://install.busware.de/zboss/
  • Alternative Zigbee host stack: tostmann/zigbee2mqtt (ghcr.io/tostmann/zigbee2mqtt-esp32:latest) — Z2M instead of ZHA
  • Upstream library: kardia-as/zigpy-zboss

License

MIT — see LICENSE.

About

HACS-installable Home Assistant ZHA adapter for ESP32-C6 esp-coordinator (ZBOSS NCP Serial Protocol)

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.