Home

Awesome

husbzb-firmware

Zigbee coordinator firmware updater image for upgrading firmware on Nortek GoControl QuickStick Combo Model HUSBZB-1 (Zigbee & Z-Wave USB Adapter) and Telegesis ETRX357USB adapters, as well as possibly other Zigbee adapters based on similar EM358x/EM3581, ETRX35x/ETRX357, and EFR32MGxx MCU chips from Silicon Labs.

This docker image provides an environment to update the EmberZNet NCP application firmware from the base version 5.4.1-194 (or any later version) that is shipped with the adapter to the latest publicly available EmberZNet NCP application firmware from Silicon Labs (6.7.8) or future newer versions.

Please submit a pull request to this GitHub repository with any other known working versions (older and newer).

The main goal with this firmware updater image is to help users upgrade to a newer firmware image with EZSP v8 (EmberZNet Serial Protocol version 8) interface support to make them compatible with the Zigbee implementations in home automation software like Home Assistant (ZHA integration), OpenHAB, Zigbee2MQTT (dev/pre-alpha), IoBroker (dev/pre-alpha), and Jeedom (beta zigpy based Zigbee plugin).

Note! Please understand that as of September 2020, the 6.x.x releases and higher of Silabs EmberZNet will require at least Home Assistant 0.115 or later.

To use:

You can either run via docker, or clone this repository and run on any system with a somewhat recent version of Python.

Run via Docker

Start a docker shell.

docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -it walthowd/husbzb-firmware bash

Replace /dev/ttyUSB1 with the path to the zigbee side of your USB stick. Make sure that nothing else is currently using the port (i.e. Shutdown and stop any application that is accessing the Zigbee MCU chip or any other programs that is connected to that serial cominication port, such as example Home Assistant, Zigbee2MQTT, IoBroker, or Jeedom).

From inside the container, run ncp.py to detect your USB stick and report current firmware version.

root@8b763a33a0d5:/tmp/silabs#./ncp.py scan
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
Found zigbee port at /dev/ttyUSB1 running 5.4.1-194

Run via python directly

Clone repository.

git clone https://github.com/walthowd/husbzb-firmware.git && cd husbzb-firmware

Run a scan (./ncp.py scan) to identify your USB stick and current firmware version

#./ncp.py scan
{"ports": [{"stackVersion": "5.4.1-194", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}
Found zigbee port at /dev/ttyUSB1 running 5.4.1-194

Selecting the correct firmware file

AdapterRecommended Firmware
Nortek GoControl QuickStick Combo Model HUSBZB-1ncp-uart-sw-6.7.8.ebl
Telegesis ETRX357USB adapterem357-v678-ncp-uart-sw.ebl

For advanced users - An alternative 115200 bps firmware image is available for HUSBZB-1, ncp-uart-sw-6.7.8-115k.ebl. This provides a faster pathway to the adapter but requires that new Home Assistant user manually input the serial path, radio type (EZSP) and bauddate when adding ZHA. Existing Home Assistant users will have to backup and edit the .storage/.core.config_entries file and update the listed baud rate.

As of March 2021, hardware flow control has been added to bellows/zigpy - Only flash any of the images in the hw-flow-control folder unless you know what you are doing.

Manual firmware update procedure

If you want to use this image to manually update your firmware first shut down any application that is accessing the Zigbee MCU (such as example Home Assistant, Zigbee2MQTT, IoBroker, Jeedom, or any other programs that is connected to that serial cominication port).

Then start a shell from the docker image or enter the directory you cloned from the above section.

Syntax is ./ncp.py flash -p /dev/path/to/your/stick -f correct-firmware.ebl

Example:

./ncp.py flash -p /dev/ttyUSB1 -f ncp-uart-sw-6.7.8.ebl
Restarting NCP into Bootloader mode...
CEL stick
EM3581 Serial Bootloader v5.4.1.0 b962

Successfully restarted into bootloader mode! Starting upload of NCP image... 
Finished!
Rebooting NCP...

Wait for the stick to reboot, then run ncp.py again to verify upgrade

./ncp.py scan
Connecting to.. /dev/ttyUSB1 57600 True False 
{"ports": [{"stackVersion": "6.7.8-204", "deviceType": "zigbee", "pid": "8A2A", "port": "/dev/ttyUSB1", "vid": "10C4"}]}

Coordinator migration

Latest versions of bellows support migrating from one coordinator to another. This allows you to move between sticks without resetting and rejoining all devices in your zigpy network.

For seamless migration, you need to overwrite the EUI64 on your target adapter. This is a one time operation and can not be undone or changed in future (without a SWD flasher) so this should only be done if you are sure of the change. If you do not overwrite the EUI64 the binding tables on your devices will be incorrect and they will need to be reset and rejoined.

For Elelabs adapters with hardcodes baud rates, you need to always add -b 115200 as a paramter to bellows.

NOTE: This is currently in testing mode.

To backup your existing configration:

docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -v `pwd`:/data -e EZSP_DEVICE='/dev/ttyUSB1' -e LANG='C.UTF-8' -it walthowd/husbzb-firmware bash
bellows info
bellows backup > /data/bellows-backup.txt
exit

Remove old stick, insert new stick (find correct ttyUSB port in dmesg) and restart container:

docker run --rm --device=/dev/ttyUSB1:/dev/ttyUSB1 -v `pwd`:/data -e EZSP_DEVICE='/dev/ttyUSB1' -e LANG='C.UTF-8' -it walthowd/husbzb-firmware bash
bellows info
bellows restore --i-understand-i-can-update-eui64-only-once-and-i-still-want-to-do-it -B /data/bellows-backup.txt
bellows info

On subsequent bellows info runs check that the EUI64 matches your backup, that the PANID matches and that the trustCenterLongAddress addresses matches. If they do not match, re-run the bellows restore as bellows restore -f -B /data/bellows-backup.txt (Omitting the --i-understand-i-can-update-eui64-only-once-and-i-still-want-to-do-it)

HUSBZB-1 Firmware Recovery

In the event of a bad flash or unexpected event, the bootloader for the EM3581 on the HUSBZB-1 can be accessed by resetting the stick and shorting TP17 to GND with a serial connection (115200, 8/N/1, no hw or sw flow control).

On device startup, unshort TP17 and send a carriage return over the serial connection. You should be returned to the bootloader menu where a image can be uploaded via XMODEM.

HUSBZB-1

An example of the process using minicom:

Credits

Many thanks to Gary for providing updated firmware files. See his repository here:

https://github.com/grobasoz/zigbee-firmware