Posts

Showing posts from July, 2013

ZWay: getting the device list.

Back after a while... and a son! Here is a piece of code that can be used with the latest version of the ZWay library. It makes it possible to retrieve the Z-Wave device list and display the device names and associated XML file (each recognized device can be associated to an XML that contains a bunch of meta-data: name, description etc.). int main(int argc, char ** argv) { ZWay theZWay; ZWError result; memset(&theZWay, 0, sizeof(theZWay)); result = zway_init(&theZWay, "/dev/ttyAMA0", "/home/pi/src/razberry-proxy/config", "/home/pi/src/razberry-proxy/translations", "/home/pi/src/razberry-proxy/ZDDX", stdout, Warning); if (result == NoError) { result = zway_start(theZWay, &terminationCb); if (result == NoError) { printf("Discovering...\n"); result = zway_discover(theZW