A daemon exposing the OpenZWave API via Apache Thrift (and some useful tools)
C# PHP Perl Erlang Python Thrift Other
Latest commit 78f31c5 Feb 21, 2016 @ekarak ekarak Merge pull request #14 from chadparry/master
Include remaining patch changes
Permalink
Failed to load latest commit information.
gen-cpp Include remaining patch changes Dec 22, 2015
gen-csharp/OpenZWave updated readme, made markdown-friendly Jun 21, 2015
gen-erl Removed unnecessary _new files. (original patch worked after installi… Mar 23, 2013
gen-go/OpenZWave updated readme, made markdown-friendly Jun 21, 2015
gen-js Update generated code Dec 15, 2015
gen-perl/OpenZWave Removed unnecessary _new files. (original patch worked after installi… Mar 23, 2013
gen-php/ozw Recreated patch for ozw_types.h due to failure Mar 23, 2013
gen-py Utility for constructing a RemoveValueID Dec 19, 2015
gen-rb Update generated code Dec 15, 2015
license Added LGPL licence headers Dec 27, 2011
INSTALL.txt updated readme, made markdown-friendly Jun 21, 2015
Main.cpp 1st attempt to streamline ozwd deployment Apr 1, 2013
Makefile Update the Makefile for modern versions of Boost and openzwave Dec 17, 2015
README-OpenZWave.txt updated docs Apr 1, 2013
README-ThriftServerCreator.txt update to OpenZWave rev591 Dec 16, 2012
README.java added java jar makefile rule Apr 2, 2013
README.md updated readme, made markdown-friendly Jun 21, 2015
RemoteManager_server.cpp.patch Include remaining patch changes Dec 22, 2015
compilation-log.txt added java jar makefile rule Apr 2, 2013
create_server.rb updated readme, made markdown-friendly Jun 21, 2015
ekarak-notes.txt More OpenZWave compatibility fixes Dec 11, 2011
mattinbits-notes.txt Added file of my own install notes Mar 23, 2013
ozw-headers.rb updated demo files Mar 17, 2012
ozw-monitor.rb patch dummy ping() method to squelch useless message Mar 31, 2013
ozw.thrift Update thrift signatures to match Manager.h Dec 14, 2015
ozw_types.h.patch updated readme, made markdown-friendly Jun 21, 2015
ozwd Include remaining patch changes Dec 22, 2015
ozwthrift.rb 1) fix openZwave config path (move up one directory) Mar 23, 2013
test.rb some testing code Jan 3, 2012
zwave-command-classes.rb helper ruby scripts added Dec 22, 2011

README.md

Thrift4OZW

This project aims to be a multi-lingual interface to the OpenZWave library, a C++ library for the ZWave wireless home automation protocol, using two enabling technologies, which are:

  • Apache Thrift ( http://thrift.apache.org ) as the RPC abstraction service
  • STOMP ( http://stomp.codehaus.org ) as a means to store & transmit OpenZWave's notifications over the network (since Thrift lacks asynchronous calls other than exceptions)

The project, after successful compilation, creates an "OpenZWave daemon" (ozwd) which opens up 1) a server port for Thrift in order to receive commands and pass them through OpenZWave to your ZWave controller (usually a USB stick) and 2) a client port to a STOMP server so as to publish notifications on asynchronous events that the OpenZWave library generates.

Thus you can have access to the wonderful world of ZWave with the help of OpenZWave from all languages currently supported by Apache Thrift which are, at the time of this writing: C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi.

(as a sidenote: I've recently forked and extended a node.js 0.10.x/0.12.x addon for OpenZWave, check out node-openzwave-shared if you specifically aim for server-side Javascript)

This is a simple diagram to illustrate the idea behind Thrift4OZW:

+--------------+ Thrift API    +---------------+ Open   +-------------+
| Zwave        | ------------> | Zwave daemon  | ZWave  | Zwave       |
| application  | (commands)    | (ozwd) - C++  | ====== | Controller  |
|              |               +---------------+ (C++)  | (USB or     |
|              |                       v                |  HIDAPI)    |
|              |               +---------------+        |             |
|              | notifications | STOMP Server  |        |             |
+--------------+ <------------ +---------------+        +-------------+
         via STOMP subscription

These are the side-projects I'm using for this project:

Thrift Server Creator (create_server.rb)

A hackity Ruby script I wrote to automatically create useful Thrift server bindings (instead of silly "your code goes here", as produced by Thrift). Uses RbGCCXML ( http://rbplusplus.rubyforge.org/rbgccxml/ ) to parse both source + target and then tries to create compilable & working code.

BoostStomp - a C++ STOMP client

A homegrown C++ client for STOMP, built using only the Boost libraries. Makes use of Boost's ASIO (Asynchronous I/O) model as well as some other useful Boost facilities. It provides the asynchronous notification mechanism used to pass OpenZWave notifications to Thrift4OZW. For more info about BoostStomp, check out its homepage: