The Green Shed

Control A ZWay Server From The Command Line

February 05, 2016

Who doesn’t want to automate their house via cron?

I have a Razberry module hooked up to a RaspberryPi, along with about a dozen or so Z-Wave devices (switches, sensors, etc.) throughout my house. The ZWay server still has an awful scheduling UI (you have to add an app for each schedule rule you want). Even X-10 had a scheduling UI, in the 90s. (Sadly, I couldn’t find any good pictures of this old interface; perhaps I’m forgetting the proper name of the device.)

Well, cron has been executing the world’s scheduled jobs since 1979. Whenever I can utilize a simple *nix tool to get a job done, I jump at the chance.

The only problem is that there isn’t a basic command line interface to the ZWay server. So, I wrote one.

zway-cli is a simple Ruby gem that gives you basic command line access to your ZWay server. You can query device status, and turn things on and off. It’s super basic, and super simple, which is exactly what I wanted for an application like this.

Things like this make me happy: $ zway kitchen_lights on

If you’re running ZWay and want a simple way to control it via the command line you ought to give it a try.