Giter Club home page Giter Club logo

node-openzwave-shared's Introduction

node-openzwave-shared

This is a node.js add-on for node 0.10.x and 0.12.x which wraps the Open Z-Wave library to provide access to a Z-Wave network from within node.js (server-side JavaScript.)

You can now easily control and manage your ZWave devices (lights, dimmers, blinds, you name it) from within NodeJS applications.

Check out the Node-Red integration project for an interesting use case, in which I've wired up ZWave and KNX devices working together as one big happy automated home.

This addon is currently able to:

  • scan a Z-Wave network and report on connected devices,
  • write values to zwave nodes
  • monitor the network for changes,
  • heal nodes and/or the network
  • perform management tasks (add/remove nodes, replace failed nodes, manage their group associations etc)

Important notice

  • This library differs in that it links dynamically to an OpenZWave shared library by means of your system dynamic linker. This is in contrast to statically linking OpenZWave in the node.js addon. Thus you need to have OpenZWave fully installed on your system (both the compiled library AND the development headers) before trying to install this little baby. I know this diverges from the dominant npm paradigm, but with the shared lib approach:
    • compilation / installation is a lot faster and
    • OZW minor upgrades / bugfixes are way lot easier.

This also means that you need to be careful if you upgrade your OZW library: you might need to rebuild this addon, otherwise you'd might get api mismatch exceptions.

  • The Node.js C++ API has changed dramatically between 0.10.x and 0.12.x thus I'm using [the Native Abstractions for Node library] (https://github.com/nodejs/nan) to get this node addon to compile and run across all currently known versions.

Install

The module currently builds only on Linux (and Windows, but its untested). On Linux you will need to ensure the OpenZWave library and headers are installed first.

  • Manually compiling OpenZwave involves the usual dance of

    • downloading its source tarball
    • compiling it and installing on your system (make && sudo make install)
  • You could also install OpenZWave via a precompiled package that's suitable for your Linux distribution. Precompiled packages for various Linux flavours and architectures can be downloaded from the OpenZWave snapshots repository Be sure to install BOTH the binary (libopenzwave-x.y) AND the development package (libopenzwave-dev).

It should also compile in Windows, but you need to edit binding.gyp to set the paths for the OpenZWave library sources and libraries.

Whenever you have OpenZWave installed in your machine, then all you need to do is:

$ sudo npm install -g openzwave-shared

Development documentation

Basic API usage

See list of supported EVENTS

See example usage

License

The Open Z-Wave library that this module heavily relies upon is licensed under the GPLv3.

Everything else (all the bits that I have written) is under the vastly more sensible ISC license.

node-openzwave-shared's People

Contributors

davide-lr avatar ekarak avatar tetraib avatar

Watchers

 avatar

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.