This article describes the setup of the Z-Stick 7 in Home Assistant using ZWaveJS to MQTT; it forms part of the larger Z-Stick 7 user guide. Setting up Home Assistant with Z-Stick 7 lets you build a Z-Wave automation network utilising Z-Wave 700 series and Gen7 technologies.
Requirements.
- Home Assistant OS: https://www.home-assistant.io/installation/
- Z-Stick 7
Hardware Recommendations.
- Raspberry Pi 3 or later
- microSD card (at least 32GB and class 2; recommended 128GB SanDisk MAX Endurance for future proof or camera recordings)
Versions used in this guide.
- Home Assistant OS version 5.12
- Z-Wave JS to MQTT version 0.8.0
- Supervisor version stable supervisor-2021.03.6
If you're installing Z-Wave JS to MQTT on a fresh installation.
These steps assume that you have a fresh install of Home Assistant and have not yet installed Z-WaveJS to MQTT. If you've already installed Z-Wave JS default integration and want to install MQTT, please follow the section "Change to Z-Wave JS to MQTT if you've already installed Z-Wave JS" at the bottom of this article.
If you have a fresh install, you may follow the steps below to fully install Z-Wave JS to MQTT.
Software Steps.
- Open Home Assistant, http://homeassistant.local:8123/
- Click Supervisor
- Click Add-on Store
- Search for "ZWave"
- Click Z-Wave JS to MQTT
- Click Install, then wait about 2 minutes and 45 seconds for the installation to complete
- Click Start, takes about 24 seconds.
- Wait 1 minute for HASS to boot up Z-Wave JS to MQTT
- Click "Open Web UI"
- Click Menu (hamburger icon) -> Settings
- Click Zwave
- Click Serial port and select /dev/ttyUSB0
- Next to Network Key, click the refresh button to add a random security key for S0 Legacy, S2 Authenticated, S2 Unauthenticated, and S2 Access control.
image 1 - randomize key buttons.
image 2 - randomized network keys generated.
- Click Save
- Click 4 box icon, and see if the driver boots up properly.
- Click Supervisor
- Click Z-Wave JS to MQTT
- Click Documentation
- Copy "ws://a0d7b954-zwavejs2mqtt:3000"
- Click Configuration
- Click Integrations
- Click + Add Integrations
- Search ZWave
- Click Z-Wave JS
- Uncheck "Use the Z-Wave JS Supervisor add-on"
- Click Submit
- Copy and Paste "ws://a0d7b954-zwavejs2mqtt:3000"
- Click Submit
- Set your devices to the areas they are installed in, then click Finish
Change to "Z-Wave JS to MQTT" from "Z-Wave JS".
You may change from Z-Wave JS over to Z-Wave JS to MQTT but will require a bit of extra setup to finalize it. Once you have both Z-WaveJS default integration installed and MQTT, you can swap between MQTT and the original Z-WaveJS to MQTT integrations as you like.
You can follow the steps below to change from Z-Wave JS -> Z-Wave JS to MQTT.
- Go to Configuration -> Integrations
- Under Z-WaveJS click on the More Options icon (3 dot) then select Disable -> OK
- Click on Supervisor -> Z-Wave JS -> STOP
- Wait a moment for Z-Wave JS to stop. Once it finishes, Enable Z-Wave JS to MQTT following one of the 2 steps below:
- If you haven't installed Z-Wave JS to MQTT:
- Click on Add-on Store tab
- Find Z-Wave JS to MQTT and Install this
- Now click INSTALL, give it about 2-3 minutes to finish the installation.
- Click START, then wait about 10 seconds before continuing these steps.
- When ready, click on OPEN WEB UI
- Click Menu (hamburger icon) -> Settings
- Click Zwave to expand it
- Click Serial port and select /dev/ttyUSB0
- Next to Network Key, add the original network key you used in the original ZWaveJS add-on, if you didn't previously have a network key, go ahead and press the Refresh button to randomly generate a key.
- Click Save
- If you have Z-Wave JS to MQTT installed, just enable it and ensure your Z-Stick is connected to it properly.
- Click on Z-Wave JS to MQTT
- Click START, and give it about 10 seconds to finish booting up.
- If you want to ensure your Z-Stick is connected, click on Log at the top right then click on Refresh.
- If you haven't installed Z-Wave JS to MQTT:
- Go to Configuration -> Integration
- Click + ADD INTEGRATIONS
- Search Z-WaveJS
- Select Z-WaveJS
- Uncheck "Use the Z-Wave JS Supervisor add-on" then press SUBMIT
- Copy and Paste "ws://a0d7b954-zwavejs2mqtt:3000"
- Then press OK
- If it states "Device is already configured" click on CLOSE and follow these steps to finalize.
- At the top right next to "X disabled" click on SHOW
- Z-Wave JS should appear, click on ENABLE under it.
- Now refresh your browser
Change to "Z-Wave JS" from "Z-Wave JS to MQTT"
If you want to remove the use of MQTT and swap to the default Z-Wave JS supervisor addon, you may follow these steps to utilize Z-Wave JS addon instead of MQTT.
- Go to Configuration -> Integrations
- Under Z-WaveJS click on the More Options icon (3 dot) then select Disable -> OK
- Click on Supervisor -> Z-Wave JS to MQTT
- We need to have a copy of your network key first which you may need if you haven't installed Z-WaveJS originally.
- Click on OPEN WEB UI
- Click on Main Menu (hamburger icon at top left)
- Click Settings -> Zwave
- Copy the "Network key" and save that in a notepad somewhere for later use.
- Now click on Supervisor -> Z-Wave JS to MQTT -> STOP
- Wait a moment for Z-Wave JS to MQTT to stop, and click the back arrow. Enable Z-Wave JS following one of the 2 steps below:
- If you haven't installed Z-Wave JS:
- Click on Add-on Store tab
- Find Z-Wave JS and Install this
- Now click INSTALL
- Once finished, START and UNINSTALL will appear. Before you boot it up, you'll need to configure it first. Click on "Configuration"
- Click on "device" and select /dev/ttyUSB0
- Copy and paste your Network Key from "Z-Wave JS to MQTT" that you saved in step 4.
- Click on SAVE
- Click on Info, then click on START.
- If you have Z-Wave JS installed, just enable it and ensure your Z-Stick is connected to it properly.
- Click on Z-Wave JS
- Click START, and give it about 10 seconds to finish booting up.
- If you want to ensure your Z-Stick is connected, click on Log at the top right then click on Refresh.
- If you haven't installed Z-Wave JS:
- Go to Configuration -> Integration
- Click + ADD INTEGRATIONS
- Search Z-WaveJS
- Select Z-WaveJS
- Keep "Use the Z-Wave JS Supervisor add-on" checked, click on SUBMIT.
- If it states "Device is already configured" click on CLOSE and follow these steps to finalize.
- At the top right next to "X disabled" click on SHOW
- Z-Wave JS should appear, click on ENABLE under it.
- Now refresh your browser