Posts

Showing posts from April, 2014

rzwaveway: calling ZWave commands

Still working on the Ruby [ dark ] side (although I wish I had more time and motivation to go on with my C++ :-)),... I finally implemented something that makes it possible to "invoke" ZWave command class functions on devices. In Ruby life is easy and this was implemented quite easily: after all, calling a function in ZWay ends up being just a simple HTTP call. In my little rzwaveway  library gem I added the notion of "extensions" ("plug-ins" would have been a good name too) that define a clear API (meaning, not a low-level ZWay function call) for a known ZWave device interface. As a first test, I implemented support for the ZWave siren/strobe alarm device I bought earlier this year. The code for it looks like this: module RZWaveWay module Extensions class SSASirenStrobeAlarm include CommandClasses def initialize(device_id) @device_id = device_id end def disable set_value(0) end def enable