Solved: How I got my zwave HUSBZB-1 usb stick to work with Hass in Windows 10

I’m new to HomeAssistant to evaluate it after trying OpenHab.

It didn’t take long to install Hass and Python in Windows 10. But trying to get my HUSBZB-1 to work was a totally different story. I burnt lots of hours getting it to work, so I thought I would summarize what I did with the hope that it may help others. It turns out not to be too hard, but definitely not obvious to the casual observer.

Step1: When you plug in the stick the first problem is that it doesn’t auto install any device drivers. So hours later I found working drivers here: https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers. Silicon Labs apparently makes the chip for the stick and you need these drivers to create a usb to uart bridge.

After installing the drivers, I changed the driver properties to set the speed to max, the flow control to hardware and the zwave to COM1 and zigbee to COM2.

Step2: Intall Python and Home Assistant. I followed this guide more or less to do that: https://www.home-assistant.io/docs/installation/windows/.

I didn’t use Python in venv mode, but pay attention to make sure that pip, setuptools, wheel, and Cython are properly installed and up to date.

Use Python to install Hass (Home Assistant). Make sure ruuning “Hass --open-ui” in a cmd prompt works properly and set up a Hass login.

Step3: Install Visual Studio 2017 (community version) : https://visualstudio.microsoft.com/vs/older-downloads/. It has to be that exact versions. To verify you have the right version, make sure this directory exists on your c-drive: “C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build”

The reason that this is needed is that zwave needs the package “homeassistant-pyozw” to work. The pkg was written in C++ and Python does not know how to compile it on the fly in Windows, so its up to you to do this.

Step4: Build the Python package “homeassistant-pyozw”. Normally one would just run in a cmd prompt “pip3 install homeassistant-pyozw”, but instead in the cmd prompt run “pip3 download homeassistant-pyozw”. This should download the file “homeassistant_pyozw-0.1.4.zip”. Find this file and unzip it. You should see these files in the directory:

09/07/2019 09:34 PM build
09/07/2019 09:39 PM homeassistant_pyozw.egg-info
04/06/2019 08:52 AM 1,247 PKG-INFO
04/06/2019 08:52 AM 6,488 pyozw_pkgconfig.py
04/06/2019 08:52 AM 4,237 pyozw_progressbar.py
04/06/2019 08:52 AM 44,002 pyozw_setup.py
04/06/2019 08:52 AM 1,564 pyozw_version.py
04/06/2019 08:52 AM 23,615 pyozw_win.py
04/06/2019 08:52 AM 73 setup.cfg
04/06/2019 08:52 AM 4,513 setup.py
09/07/2019 09:07 PM src-api
09/07/2019 09:07 PM src-lib
09/07/2019 09:07 PM src-manager
09/07/2019 09:07 PM src-python_openzwave
09/07/2019 09:26 PM pycache

Go to that directory in a cmd prompt and run the command “Python3 setup.py install”. It will fail because there is no source code in this directory. But what you should see it do before it fails is that a new subdirectory is created named “openzwave” and it will download all the source code into it.

Now goto that directory “openzwave” and copy the directory “openzwave\cpp\build\windows\vs2010” to “openzwave\cpp\build\windows\vs2017”. Are we having fun yet!!!

With a cmd prompt goto the same directory again where you ran the cmd “Python3 setup.py install” and run it again with an extra param: “Python3 setup.py install --flavor=dev”. With luck this will now build and install the pyozw pckage to your Python Lib directory. It should take about 5-10 minutes to run.

That’s it… The required pkg “homeassistant-pyozw” should now be installed. To verify this, in a cmd prompt run “pyozw_check -l -d COM1 -t 30”. This will attempt to connect to your stick and report a list of configured nodes the stick may have. If this runs ok your good to go.

Final Step: Add zwave to your configuration.yaml file:

# Controllers
zwave:
  usb_path: \\.\COM1

Restart the Hass server and you should see zwave added as an integration device.

Regards

3 Likes