We're getting to another milestone with this work. John and Gene have been working to get the work packaged in a way we can share it. We're close. Close enough that I got it going at home today.
It's like the old DOS days. One black screen is a server. One black screen is a client.
The server talks to Z-Wave devices. At this point, the client is a terminal window. We're planning to go a little farther with that.
Run the server, which reads a config file, which can contain custom commands.
Run the terminal and tell the server what you want.
Add a Z-wave node:
add_node(dr,"any") to put it in a pairing mode.
add_node(dr,"stop") to end the pairing mode.
My only Z-wave device, at this time, is the Aeon power strip (see the last post). Mine has six outlets. Four are controllable with Z-wave. Two are always on.
Turn a node on:
bset(2,100) (the 2 is the node or device, the 100 is the % on)
Turn it off:
bset(2,0) (node 2 is 0% on)
In the case of the power strip, there is another paramater, the index. The index represents on of the four controllable power outlets.
bset(2,100,2) turns on the 2nd outlet...or maybe the 1st... I was a little confused by this.
bset(2,0,2) turns it off.
You can turn on all four or turn off all four in a sequence by using:
for i in range(5):bset(2,100,i) turns all four outlets on
for i in range(5):bset(2,0,i) turns all four outlets off
or something like that...
Anyway, lights went on and off and it was embarassingly satisfying.
The next step is to build a proper API for the server, so that anyone can turn the lights on and off.
The question we're thinking about now, and with which we could use your help is; what kind of interface should it be? I'd like to do 2 or 3 so that people can find what they need.
We have a web services interface for MC and I think it's been immensely successful. If a developer can't find the right handle to pull, we can add it. A lot has been built on it. We could do something like it, maybe use similar commands.
We could use a simple URL to make the server respond. We've built a way to do this in the OneRemote phone app, so it's logical to add support for it in the server.
And so on.