On the z-way server you can do something like this:
zway.devices[5].instances[0].commandClasses[48].data.level.bind(function() {
try {
debugPrint("It worked, the value is: " + this.value);
system("/usr/bin/python /opt/z-way-server/automation/test.py -c " + this.value);
} catch(err) {
debugPrint("Failed to execute command: " + err);
}
});
This will run the python script if the specific device fires an event. In my case it is a Fibaro reed contact e.g. if a window/door opens or closes.
Automation
-
- Posts: 5
- Joined: 31 Jul 2013 21:44
seems interesting. basically
seems interesting. basically you pass the whole thing on to the server via http post?