SkillAgentSearch skills...

Zwave2Mqtt

Fully configurable Zwave to MQTT gateway and Control Panel using NodeJS and Vue

Install / Use

/learn @OpenZWave/Zwave2Mqtt

README

Zwave To MQTT

GitHub package.json version PRs Welcome MadeWithVueJs.com shield MIT Licence ci Docker Build GitHub All Releases Coverage Status Known Vulnerabilities Dependencies Status devDependencies Status Total alerts Language grade: JavaScript

Join channel

Buy Me A Coffee

dockeri.co

OpenZWave TO MQTT

Fully configurable Zwave to MQTT Gateway and Control Panel.

<h1>THIS PROJECT IS UNMAINTAINED. PLEASE CONSIDER MOVING TO <a href="https://github.com/zwave-js/zwavejs2mqtt">Zwavejs</a></h1>

!! ATTENTION

After a discussion with Openzwave maintainer all issues related to OZW 1.4 will be ignored and automatically closed as it isn't supported anymore, please use OZW 1.6+

📖 Table of contents

:electric_plug: Installation

DOCKER :tada: way

# Using volumes as persistence
docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 --mount source=zwave2mqtt,target=/usr/src/app/store robertslando/zwave2mqtt:latest

# Using local folder as persistence
mkdir store
docker run --rm -it -p 8091:8091 --device=/dev/ttyACM0 -v $(pwd)/store:/usr/src/app/store robertslando/zwave2mqtt:latest

# As a service
wget https://raw.githubusercontent.com/openzwave/zwave2mqtt/master/docker/docker-compose.yml
docker-compose up

Replace /dev/ttyACM0 with your serial device

For more info about docker check here

Kubernetes way

kubectl apply -k https://raw.githubusercontent.com/OpenZWave/Zwave2Mqtt/master/kustomization.yaml

You will almost certainly need to instead use this as a base, and then layer on top patches or resource customizations to your needs or just copy all the resources from the kubernetes resources directory of this repo

NodeJS or PKG version

  1. Firstly you need to install the Open-Zwave library on your system.

    cd ~
    git clone https://github.com/OpenZWave/open-zwave.git
    cd open-zwave && make && sudo make install
    sudo ldconfig
    export LD_LIBRARY_PATH=/usr/local/lib64
    sudo sed -i '$a LD_LIBRARY_PATH=/usr/local/lib64' /etc/environment
    

    For Raspberry check here

  2. Test the library: go to openzwave directory cd openzwave-* and run the command

    MinOZW /dev/ttyACM0

    replace /dev/ttyACM0 with the USB port where your controller is connected

  3. Now you can use the packaged version (you don't need NodeJS/npm installed) or clone this repo and build the project:

    • For the packaged version:

      cd ~
      mkdir Zwave2Mqtt
      cd Zwave2Mqtt
      # download latest version
      curl -s https://api.github.com/repos/OpenZWave/Zwave2Mqtt/releases/latest  \
      | grep "browser_download_url.*zip" \
      | cut -d : -f 2,3 \
      | tr -d \" \
      | wget -i -
      unzip zwave2mqtt-v*.zip
      ./zwave2mqtt
      
    • If you want to compile last code from github:

      git clone https://github.com/OpenZWave/Zwave2Mqtt
      cd Zwave2Mqtt
      npm install
      npm run build
      npm start
      
  4. Open the browser http://localhost:8091

Reverse Proxy Setup

If you need to setup ZWave To MQTT behind a reverse proxy that needs a subpath to work, take a look at the reverse proxy configuraiton docs.

:nerd_face: Development

Developers who wants to debug the application have to open 2 terminals.

In first terminal run npm run dev to start webpack-dev for front-end developing and hot reloading at http://localhost:8092 (THE PORT FOR DEVELOPING IS 8092)

In the second terminal run npm run dev:server to start the backend server with inspect and auto restart features (if you don't have nodemon installed: npm install -g nodemon)

To package the application run npm run pkg command and follow the steps

Developing against a different backend

By default running npm run dev:server will proxy the reequests to a backend listening on localhost on port 8091.

If you want to run the development frontend against a different backend you have the following environment variables that you can use to redirect to a different backend:

  • SERVER_HOST: [Default: 'localhost'] the hostname or IP of the backend server you want to use;
  • SERVER_PORT: [Default: '8091'] the port of the backend server you want to use;
  • SERVER_SSL: [Default: undefined] if set to a value it will use https/wss to connect to the backend;
  • SERVER_URL: [Default: use the other variables] the full URL for the backend API, IE: https://zwavetomqtt.home.net:8443/
  • SERVER_WS_URL: [Default: use the other variables] the full URL for the backend Socket, IE: wss://zwavetomqtt.home.net:8443/

:wrench: Usage

Firstly you need to open the browser at the link http://localhost:8091 and edit the settings for Zwave, MQTT and the Gateway.

Zwave

View on GitHub
GitHub Stars356
CategoryDevelopment
Updated4d ago
Forks95

Languages

JavaScript

Security Score

100/100

Audited on Apr 3, 2026

No findings