this is working for me (just a simple sample) :
create test1.js and place it into automation directory
content of test1.js:
zway.devices[5].instances[0].commandClasses[48].data.level.bind(function() {
try {
system("sh /opt/test.sh " + this.value);
} catch(err) {
debugPrint("Failed to execute command: " + err);
}
});
(if any error you will see it in log)
-----------
edit the config.xml in /opt/z-way-server/:
..
automation/test1.js
..
-----------
create test.sh:
TODAY=`date '+%F %H:%M:%S'`
echo "$TODAY - param1: $1" >> /var/log/test.txt
-----------
in /opt/z-way-server/htdocs create the file .syscommands with one line only:
sh
-----------
restart Z-Way : /etc/init.d/Z-Way restart
-----------
you will get in test.txt (for motion sensor):
2013-04-03 09:29:29 - param1: true
2013-04-03 09:29:48 - param1: false
Hope this helps
![Wink ;)](./images/smilies/icon_e_wink.gif)