Giter VIP home page Giter VIP logo

zwave2mqtt's Introduction

DomoGeeek

This module is a gateway between Z-Wave devices and the MQTT broker and takes part from the DomoGeeek project.

This module is based on node-openzwave and allows you to transform Z-Wave messages into MQTT messages. Works perfectly on a Raspberry Pi with an Aeon Lab Z-Wave USB dongle.

My post in French about this Zwave Gateway : https://www.geeek.org/zwave2mqtt-objets-connectes-zwave-185/

Prerequisites

Compile OpenZwave

sudo apt-get install libudev-dev
cd ~ 
wget http://old.openzwave.com/downloads/openzwave-1.4.1.tar.gz
tar zxvf openzwave-*.gz
cd openzwave-* && make && sudo make install
export LD_LIBRARY_PATH=/usr/local/lib
sudo sed -i '$a LD_LIBRARY_PATH=/usr/local/lib' /etc/environment

Install

Install dependencies

$ npm install
$ vi config.js 

You can enable the debug flag to analyze the messages exchanged on the network.

Test

$ ./start.sh

By default, each family of messages are sent into specific MQTT topics (alarm, sensor ...).

Deploy

$ sudo npm install pm2 -g
$ ./pm2.sh
$ pm2 startup
$ pm2 save

zwave2mqtt's People

Contributors

ltoinel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

zwave2mqtt's Issues

compile eroor

hello
can you help me, i have this msg:
thank you .

`root@ubuntu:/ZWave2MQTT-master# npm install
npm WARN lifecycle [email protected]
preinstall: cannot run in wd %s %s (wd=%s) [email protected] node lib/install-ozw.js /home/msalek/ZWave2MQTT-master/node_modules/.staging/openzwave-shared-c8aa07b5

[email protected] install /home/msalek/ZWave2MQTT-master/node_modules/dtrace-provider
node scripts/install.js

sh: 1: node: not found
npm WARN install:[email protected] [email protected] install: node scripts/install.js
npm WARN install:[email protected] spawn ENOENT

[email protected] install /home/msalek/ZWave2MQTT-master/node_modules/openzwave-shared
node-gyp rebuild

/bin/sh: 1: node: not found
gyp: Call to 'node -e "console.log(require('./lib/ozwpaths.js').libdir)"' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:354:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.4.0-31-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/msalek/ZWave2MQTT-master/node_modules/openzwave-shared
gyp ERR! node -v v4.2.6
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 4.4.0-31-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the openzwave-shared package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs openzwave-shared
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls openzwave-shared
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/msalek/ZWave2MQTT-master/npm-debug.log
`

Add an example to Github Readme ?

Great gateway. I can now receive ZWave signals as MQTT in Node-red.
Do you have an example of how to control a device? What MQTT topic/payload to send?

Also, the topic coming from the bridge is "topLevel" (switchBinary).
Is it possible to have the topic be "zwave2mqtt/switchBinary" ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.