I needed to factory reset a couple of Aeotec Z-Stick Gen7 controllers before giving them away. The goal was to wipe all Z-Wave network data including paired devices and the Home ID. Unlike the older Gen5 sticks, the Gen7 does not have a physical reset button. The reset must be performed via Z-Wave Serial API commands.

NOTE: This procedure erases all network data from the controller including the node list, routing tables, and Home ID. The Home ID is regenerated to a new random value. Any devices previously paired to this controller will need to be excluded and re-included into a new network. S0/S2 encryption keys are not affected as they are stored in the host software (Home Assistant, Z-Wave JS, etc.), not on the controller itself.

Identifying the Devices⌗

The Z-Stick Gen7 uses a Silicon Labs CP210x USB-to-UART bridge. When plugged in, it should appear as a /dev/ttyUSB* device.

$ lsusb | grep -i silicon
Bus 001 Device 004: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
Bus 001 Device 003: ID 10c4:ea60 Silicon Labs CP210x UART Bridge

To find the specific serial port assignments:

$ ls -la /dev/serial/by-id/ | grep -i cp210x
lrwxrwxrwx 1 root root 13 Jan  6 10:15 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_7eb492340487ec11...-if00-port0 -> ../../ttyUSB0
lrwxrwxrwx 1 root root 13 Jan  6 10:15 usb-Silicon_Labs_CP2102N_USB_to_UART_Bridge_Controller_d2213aa75894eb11...-if00-port0 -> ../../ttyUSB2

The serial numbers in the symlink paths uniquely identify each stick.

Building the uSAPI Tool⌗

The reset is performed by sending Z-Wave Serial API commands to the controller. The uSAPI tool from Z-Wave.Me provides a simple way to send commands and receive responses.

$ cd /tmp
$ git clone https://github.com/Z-Wave-Me/uSAPI.git
$ cd uSAPI
$ make
gcc -Wall -O2 -o uSAPI uSAPI.c

This produces a uSAPI binary that can send arbitrary Serial API commands and print the response.

Querying Current State⌗

Before resetting, it is useful to verify the controller’s current state. Two commands are helpful:

Query Home ID⌗

The MemoryGetID command (0x20) returns the controller’s Home ID and Node ID.

$ /tmp/uSAPI/uSAPI -b "20" -p /dev/ttyUSB0 -r 1
RESP 0 { 00 20 e8 f3 a2 1b 01 }

The response contains the 4-byte Home ID (e8 f3 a2 1b) followed by the controller’s Node ID (01). After a factory reset, the Home ID will be a new random value.

Query Node List⌗

The SERIAL_API_GET_INIT_DATA command (0x02) returns initialization data including a bitmask of nodes in the network.

$ /tmp/uSAPI/uSAPI -b "02" -p /dev/ttyUSB0 -r 1
RESP 0 { 01 02 0a 08 1d 11 b1 0e 9f e8 32 40 7b 7c 00 00 68 4f 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 }

The bytes starting after 1d form a 29-byte node bitmask. Each bit represents a node ID (1-232). In this example, 11 b1 0e 9f e8 32 40 7b 7c ... 68 4f 0a indicates multiple paired devices. A controller with no paired devices shows 01 00 00 00 ... (only bit 1 set for the controller itself).

Performing the Factory Reset⌗

The SetDefault command (0x42) with parameter 0x01 performs a factory reset. This erases all routing tables and network topology from the controller’s NVM. The Z-Wave network Home ID is regenerated to a new random value. All paired node information.

$ /tmp/uSAPI/uSAPI -b "42 01" -p /dev/ttyUSB0 -r 2
RESP 0 { 00 42 01 }

The response 00 42 01 confirms the command was processed successfully.

Verifying the Reset⌗

Query both the Home ID and the node list again to confirm the reset was successful.

Verify Home ID Changed⌗

$ /tmp/uSAPI/uSAPI -b "20" -p /dev/ttyUSB0 -r 1
RESP 0 { 00 20 7c 2a 91 f4 01 }

The Home ID is now 7c 2a 91 f4 — different from the original e8 f3 a2 1b. This confirms the controller has been assigned a new network identity.

Verify Node List is Empty⌗

$ /tmp/uSAPI/uSAPI -b "02" -p /dev/ttyUSB0 -r 1
RESP 0 { 01 02 0a 00 1d 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 00 }

The node bitmask now shows 01 00 00 00 ... — only the controller itself (node

  1. exists. All previously paired devices have been removed.

Backup⌗