* Z-Wave Migration from HomeSeer to Home Assistant *
The last piece of the puzzle was finally put into place earlier this morning with the successful migration of all Z-Wave devices from HomeSeer to Home Assistant. This post explains the hurdles and solution.
Background
I've been running a network of Z-Wave devices with HomeSeer for over a decade. The set of devices includes light toggle switches, light dimmer switches, entry door locks, toggle-able AC outlets, and multi-function sensors (motion, illumination, temperature).
The Z-Wave controller has changed over the years, from an old Aeotec Z-Stick to the latest Gen 3 version of
HomeSeer Z-NET based on Raspberry Pi.
Some of the devices were added to the Z-Wave network over a decade ago while others were added more recently. Although HomeSeer is a member of the Home Assistant working group and therefore Z-NET is supported by Home Assistant, many Z-Wave devices did not migrate smoothly.
After some experimentation, it turns out that if older devices are first
excluded from the Z-Wave network and re-
included, they will be included differently, in a more updated manner by the latest drivers/protocols on the Z-NET controller. All devices that have been similarly included will be readily visible to the Z-Wave add-on in Home Assistant.
Configuring Z-Wave in Home Assistant
To use the HomeSeer Z-NET controller, which operates over the network rather than being a locally inserted USB device, we must follow a slightly different procedure.
Instructions are provided here by HomeSeer. Although these instructions leave out a handful of crucial details that this post seeks to remedy, these instructions must still be followed.
We start by installing the
Z-Wave JS UI add-on from the Add-Ons section of Home Assistant. But Add-Ons are only available if we install Home Assistant OS or Supervised:
I'm running Home Assistant
Supervised on an Orange Pi 5 Plus as
documented here. When selecting the Add-On from the Add-On Store be careful to select
Z-Wave JS UI and
not Z-Wave JS.
Now we can start the Add-On and select
OPEN WEB UI to configure it for accessing our Z-NET controller over the network:
In the Web UI we select
Settings followed by
Z-Wave:
In the Z-Wave section we just need to configure 5 parameters:
- Serial Port
- Enter the IP address of your Z-NET
- You can determine the IP address from your router or by typing this URL in a web browser:
- Then click Z-NET or Z-NET-R2
- The IP address will now be shown in the URL/address field of the browser
- Then we specify 4 authentication keys as follows:
- S2 Unauthenticated
- S2 Authenticated
- S2 Access Control
- S0 Legacy
These keys are obtained from HomeSeer, from
Plugins -> Z-Wave -> Manage Interfaces:
HomeSeer will display all 4 authentication keys in the format:
- AA-BB-CC-DD-EE-FF-GG-HH-II-JJ-KK-LL-MM-NN-OO-PP (32 bytes)
- There are 16 two-byte values in each authentication key
- We need to remove the hyphens
- If one of the two-byte values is 0 to F, it will be displayed without a leading 0, like this:
- A-BB-CC-D-EE-FF-GG-HH-II-JJ-KK-LL-MM-NN-OO-PP
- Notice that A and D are single-byte values so we must insert a leading zero, like this:
- Now we have a full 32 byte field (don't forget to remove the hyphens)
Now when we go back to
Control Panel in the Z-Wave JS Web UI, we should see a list of all Z-Wave devices queried from the Z-NET controller.
The Z-Wave add-on will now probe each Z-Wave device for its (a) Protocol Info and (b) Node Info. This process can take some time. For my case with 32 devices it took about 30 minutes. This allows the Z-Wave add-on to determine the type of each device and what functions it supports. Until this process ends, the Z-Wave devices will not be available to Home Assistant.
When the query -- or
interview -- process completes, we will see something like this (notice "Complete" in the "Interview" column:
For each device there is a
Name and
Location field. These fields most likely will not transfer automatically so we'll need to go through each one and enter the values. This is easy to do by clicking each row to reveal a properties page in which Name and Location can be typed in.
When we have a bunch of Z-Wave devices, how do we know which ones are which? Fortunately, HomeSeer has a function called
Device Information and from there we can
Export the device list in CSV format:
When we open the CSV file in
Numbers, we see something like this:
The
green Node column allows us to cross-reference the nodes between HomeSeer and Home Assistant, and to enter the names and locations of each Z-Wave device.
Notice also the 4
red boxes. These devices do not have
Version and
Firmware information. These devices were added (i.e.,
included) to the Z-Wave network a long time ago. As such, these devices
will not transfer to Home Assistant unless we first
exclude them and then
include them again in
HomeSeer (not in Home Assistant).
NOTE:
- Other devices can also fail to migrate; if this happens, just exclude and re-include them in HomeSeer
- Excluding and Including some devices require the Z-NET controller to be brought close to the device!
- In my case the Z-NET controller is located in an upstairs server rack and had to be brought down to the first floor to exclude and include a number of devices located on that floor
After excluding and including all problematic devices, I ended up with this:
The device on Row 12 does not physically exist and has since been deleted from the controller. Note that all remaining devices now have
Version and
Firmware information. This allowed the devices to transfer properly to Home Assistant.
Z-Wave JS UI also provides a nice Z-Wave network diagram where (a) blue nodes are reachable in 1 hop, (b) green nodes are reachable in 2 hops, and (c) orange nodes are reachable in 3 hops.
IMPORTANT:
- The Z-NET controller can be connected to only one software client at a time, whether HomeSeer or Home Assistant, but not both at the same time
- If we want to perform Z-Wave operations with HomeSeer we must (a) disable the Z-Wave JS UI add-on in Home Assistant and (b) enable the Z-NET controller in HomeSeer:
- Similarly, if we want to perform Z-Wave operations with Home Assistant we must (b) disable the Z-NET controller in HomeSeer and (b) enable the Z-Wave JS UI add-on in Home Assistant: