This article describes the setup of the Z-Pi 7 in Home Assistant with a Raspberry Pi 3 or 4 with ZWaveJS to MQTT and forms part of the larger Z-Pi 7 user guide.
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.
1. Disable Bluetooth
This is required since both Bluetooth and Z-Pi 7 utilize the same serial port dev/ttyAMA0, in order for Z-Pi 7 to form a connection to your RPi, you must disable Bluetooth.
Before doing this, make sure you've installed Home Assistant OS onto your USB flash drive or microSD card.
- Plug your USB flash drive or microSD card with Home Assistant installed into your PC.
- Open up your Home Assistant drive.
- Look for "config.txt" and open it.
- Add this command to the text file depending on the RPi version you have.
Raspberry Pi 3
*Some have reported that this may be "dtoverlay=disable-bt" use this command if the above command isn't working.
Raspberry Pi 4
- Save config.txt
- Exit config.txt
- Now safely eject your Flash drive or microSD and remove it from your PC
- Install your Flash drive or microSD into your RPi and power it up.
- Wait a few minutes before moving on to the next following steps.
2. Gain access to the Home Assistant community repository first (if you don't have access to ZWaveJS UI already).
Click Setting -> Add-on -> ADD-ON STORE (button at bottom-right)
Click top-right icon (vertical 3 dot icon)
Then click ADD
3. Z-WaveJS UI installation Steps in Home Assistant Add-ons
Click Add-on Store -> ADD-ON STORE (button at bottom-right)
Search for "ZWave"
Click Z-Wave JS UI
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 UI
Click "Open Web UI" Click 3-line icon (Menu) -> Gear Icon (Settings)
Click Serial port and select /dev/ttyAMA0
- 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 (scroll to the very bottom of the settings page)
Click 4 box icon (Control Panel), and see if the driver boots up properly. If your network is ready, you'll see your controller as Node ID 01. (Note - Steps 16-24 will only work if your Z-Wave network is setup properly with the controller shown in Control Panel)
4. Setup ZWaveJS UI to Home Assistant ZWaveJS integration
Click Settings -> Device & Services
Click + Add Integrations
Click Z-Wave JS
Uncheck "Use the Z-Wave JS Supervisor add-on"
Set your devices to the areas they are installed in, then click Finish
5. Update Z-Pi 7 using Z-WaveJS UI
Your Z-Wave Frequency may change, so make sure that it is on the correct Z-Wave Frequency after firmware updating.