Permalink
Browse files

updated README for users of Ruby 1.9

  • Loading branch information...
1 parent 5e32697 commit aac9ddf6513a56fde5b01eaac9c35f8c8ca78d2c Elias Karakoulakis committed Jan 8, 2012
Showing with 34 additions and 14 deletions.
  1. +20 −9 README-OpenZWave.txt
  2. +14 −5 README.txt
View
@@ -24,7 +24,8 @@ versions (with headers)
- I assume you have Ruby >=1.9.1 installed with RbGCCXML and Nokogiri (gem install rbgccxml)
- Inspect the Makefile, change directories (unless your username is ekarak!)
- Run make, cross fingers, pop champagne.
-- The generated code is patched twice (I know, I know, this sucks) in order for the compilation to succeed:
+- The generated code is patched twice (I know, I know, this sucks) in order for the compilation
+to succeed:
1) these constructors/converters are patched in class RemoteValueID (gen-cpp/ozw_types.h) :
// ekarak: constructor from ValueID
@@ -52,15 +53,23 @@ meaningful results from OpenZWave to the Thrift server.
TALKING TO THE OPENZWAVE THRIFT SERVER
---------------------------------------------------------------------
OK, you have the server binary (./main) either precompiled or you did it yourself. Fine.
-- Install a STOMP Server (gem install stompserver). It will route all notifications from OZW to anywhere you want it to.
-- Hook up your favourite USB controller at /dev/ttyUSB0 (sorry its hardcoded for the time being, see Main.cpp)
+- Install a STOMP Server (gem install stompserver), or if you're on Ruby 1.9 from git:
+ git clone git://github.com/gmallard/stompserver_ng.git
+ cd stompserver_ng
+ sudo ruby setup.rb
+Then, run it with the debug flag (stompserver_ng -d). It will route all notifications
+from OZW to anywhere you want it to.
+- Hook up your favourite USB controller at /dev/ttyUSB0 (sorry its hardcoded for the
+ time being, see Main.cpp)
- Fire up ./main, preferrably in a debugger (gdb ./main)
-The server tries to connect to the Stomp Server (localhost:61613) and then starts the OpenZWave engine.
-When all ZWave processing is done, it also fires up the Thrift server at port 9090, and listens for requests.
+The server tries to connect to the Stomp Server (localhost:61613) and then starts
+the OpenZWave engine. When all ZWave processing is done, it also fires up the
+Thrift server at port 9090, and listens for requests.
-Let's connect from Ruby as an example. First edit ozwthrift.rb and fill in the correct HomeID for your controller.
-Then fire up the Interactive Ruby Shell and load the bootup code:
+Let's connect from Ruby as an example. First edit ozwthrift.rb and fill in the correct
+HomeID for your controller. Then fire up the Interactive Ruby Shell and load the
+bootup code:
ekarak@ekarak-laptop:~/ozw/Thrift4OZW$ irb1.9.1
irb(main):001:0> load 'ozwthrift.rb'
@@ -104,8 +113,10 @@ irb(main):015:0> OZWmgr.SetValue_UInt8(Rvid,0)
=> true
-You can try using the server from other languages. I've posted the generated Thrift code in the project,
-Read Thrift's tutorial (http://thrift.apache.org) and you should be able to talk to OpenZWave with minimal effort.
+You can try using the server from other languages. I've posted the generated
+Thrift code in the project,
+Read Thrift's tutorial (http://thrift.apache.org) and you should be able to talk
+to OpenZWave with minimal effort.
That's it for the time being.
Elias
View
@@ -2,23 +2,32 @@
Thrift4OZW
----------
-This project aims to be a fully functional interface to the OpenZWave library ( http://code.google.com/p/open-zwave/ ) using:
+This project aims to be a fully functional interface to the OpenZWave library
+( http://code.google.com/p/open-zwave/ ) using:
1) Apache Thrift ( http://thrift.apache.org ) as the RPC abstraction service
-2) STOMP ( http://stomp.codehaus.org ) as a means to store & transmit OpenZWave's notifications over the network
+2) 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)
-Being an experimental project, I have used quite a lot of external tools & libs but they're easy to get rid of if we need to get it going anywhere. These libs are:
+Being an experimental project, I have used quite a lot of external tools & libs
+but they're easy to get rid of if we need to get it going anywhere. These libs are:
STOMP client: (PocoStomp.*, Stomp.*)
------------------------------------
-SMC - The State Machine Compiler: in order to model the STOMP client state machine
+SMC - The State Machine Compiler: in order to model the STOMP client
+state machine
PoCo libraries - a very easy and intuitive C++ toolkit ( http://pocoproject.org)
Thrift Server Creator (create_server.rb)
----------------------------------------
-A hackity Ruby script I wrote to 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.
+A hackity Ruby script I wrote to 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.
See: README-ThriftServerCreator.txt

0 comments on commit aac9ddf

Please sign in to comment.