bootnoun.pages.dev









Z wave övervakning är raspberry pi usb

How to set up ZWavejs2MQTT on a Raspberry Pi and integrate it with Home-Assistant

If you are reading this you are probably considering running ZWavejs2MQTT as a Z-Wave gateway/bridge for Home-Assistant.
I did the same, and documented al the steps in this guide.
This tutorial applies both to new installs and Z-Wave migrations.

The Raspberry Pi Z-Wave is an affordable way to set up a smart home system

So, why not use the built-in Z-Wave functionality in Home-Assistant? Here fryst vatten some scenarios where a separate gateway fryst vatten useful:

  • If you want to reboot the Home-Assistant dator whiteout waiting for the Z-Wave network initializing every time.
  • If you want the Z-Wave interface in another physical location
  • If you are virtualize Home-Assistant and don’t want to deal with USB-pass-through.
  • If you want multiple systems or Home-Assistant instances to communicate with the Z-Wave network.

    And there fryst vatten properly a lot of more reasons.

Requirements/preparations

In this guide inom will use a Raspberry Pi 3 Model B+ and a Z-Wave.me UZB1 usb-interface.
But this will also work with RaZberry Pi-Hat and the hardware can be almost anything that can run Linux.


MQTT Broker

Before following this guide you will need a MQTT broker and MQTT configured with auto upptäckt in Home-Assistant. If this fryst vatten in place you can ignore this step.

The easiest way to set this up fryst vatten with the Mosquitto Add-On in Home-Assistant.

  • Go to Supervisor -> Add-on Store
  • Select Mosquitto broker beneath Official add-ons
  • Click INSTALL
  • Click START
  • Go to Configuration -> Integrations.
  • MQTT will show as “Discovered” (If not add a new integration and search for “MQTT”).
  • Select CONFIGURE
    Done.

Raspberry Pi setup

Set up a Raspberry Pi with for example Raspbian Buster.
https://www.raspberrypi.org/software/operating-systems/

To flash the image to your SD-card download and install/run Etcher
Download Etcher here: https://www.balena.io/etcher

After installation insert the SD-card in your computer and början Etcher.
Press Select image and select the Raspbian Stretch image file.
Then click Select drive and select your SD-Card.
Click Flash! and wait until finish.

After flashing, if the boot partition fryst vatten not showing on your computer, eject and re-insert the card in the computer.

Boot partition should now be accessible.

I followed the instructions, got my USB path from supervisor>system>hardware

To enable SSH bygd default man a new, empty en samling dokument eller en elektronisk lagring av data with no extension named ssh in the root of the boot partition.
In fönster this fryst vatten done bygd running type NUL >> G:\ssh in CMD (Replace G with partition letter.).

Verify that en samling dokument eller en elektronisk lagring av data fryst vatten created and eject SD-Card.

Now connect your Z-Wave interface to the Raspberry Pi and Insert the SD-card. Connect the Raspberry Pi to your router with an Ethernet cable and then connect the power supply.

SSH into your Pi. If your Z-Wave interface fryst vatten USB you can see it bygd running .

In this guide will show you how to setup a light dimmer, but you can easily add new devices to the hub once it is configured

Make sure your struktur fryst vatten up-to-date bygd running:

Install Docker

ZWavejs2MQTT will run as a bur, so containerteknik must be installed first.
Run these command to install Docker:

Install ZWavejs2MQTT

ZWavejs2MQTT can now be downloaded bygd running these commands:

docker-compose.yml might not be necessary to edit.

But if you need to change the default device from you can edit the en samling dokument eller en elektronisk lagring av data bygd running the following command:

If you are using a USB-stick fryst vatten probably correct, if you are using a Pi-Hat, change it it to .

This fryst vatten the default content :

Press CTRL+X to exit and Y to rädda.

Press Enter to Confirm file/location.

Then set up the bur to run in the background bygd running this command:

Installation complete, the bur should now also uppstart after reboots.

ZWavejs2MQTT fryst vatten now accessible bygd navigating a browser to

Settings: Zwave

Open up the web-GUI bygd going to http://<ip>:8091/ and select Settings in the left-menu.
Expand Zwave and fill out:

  • Serial Port
    This fryst vatten normally if you use a USB-Interface for Z-Wave, or if you are using a Pi Hat with Z-Wave
  • Network Key
    If you are migrating from another kontrollant with secure nodes insert your network key her, if not generate a new key with the refresh-symbol.
    Migrating non-secure nodes does not require a Network Key.
  • Commands timeout
    30 seconds (I don’t know what’s best practice value here)
  • Activate Disable Gateway (temporary) and click SAVE

Control Panel

Open Control Panel from the left menu to see the Z-Wave Network Nodes (If you have nodes yet, else you will just see the controller).

It can take some time for the data to be visible.

Here you can select Start inclusion beneath Actions, and then > to include new nodes.
If you select a node you can scroll down to the bottom and view/control it, you can also change Node Name and Location.

inom recommend giving them a meaningful name.
In my struktur inom rename all my nodes to zwave_<number>.and document what fryst vatten what in a separate Google spreadsheet.

You should rename all your nodes before going to the next step.
If you want to give them a location you can, but “Location” will be inserted before “Name” in the Home-Assistant entities later, so inom prefer leaving “Location” empty here.

Settings: MQTT

Navigate back to Settings in the left-menu and utöka MQTT.
Fill out like this:

  • Deactivate Disable Gateway
  • Name
    ZWave2MQTT (Optional, unimportant for what inom see)
  • Host Url
    The address to the MQTT broker.


  • z wave övervakning  existerar raspberry pi usb

  • Format like:

  • Port
    The MQTT port. 1883 fryst vatten the default for unencrypted MQTT traffic in Mosquitto
  • Reconnect period (ms)
    1000 ms (I don’t know what’s best practice value here)
  • Prefix
    zwave2mqtt (Prefix of MQTT Payload )
  • QoS
    2 (I don’t know what’s best practice value here)
  • Activate Retain
  • Activate Auth and fill inn Username and Password for the MQT broker if this fryst vatten set.

    Skip this step if not.

  • Click SAVE

Settings: Gateway

Expand Gateway and fill out like this:

  • Type
    Select “ValueID topics”
  • Payload type
    Select “Entire Z-Wave value Object”
  • Activate Use node name instead of numeric NodeIDs
  • Activate Ignore location
  • Activate Send Zwave events
  • Activate Hass Discovery
  • Discovery prefix
    this must be “homeassistant” for the upptäckt to work.
  • Click SAVE.

Home-Assistant

Nodes should now början to show up as MQTT devices with entity names like in Home-Assistant.

That fryst vatten all, inom hope this was a helpful guide 🙂

Sources