Creating virtual devices in new automation
Posted: 02 Apr 2014 14:02
Hi all,
I have a problem with the new automation.
I have a shiftregister hoocked up to my Raspberry which drive 8 relais.
by sending "python port.py init" does a init of the shiftregister
"python port.py set 1 1" set port 1 to 1
"python port.py get 1" returns 0 or 1 depending on the state of the port
I added to main.js:
try {
system("python /opt/z-way-server/automation/port.py init");
} catch(err) {
debugPrint("Failed to execute script system call: " + err);
}
This works! So I can control the shift register from the javascript code.
Now I am trying to add 8 virtual devices and bind them to execute the script without succes, like in viewtopic.php?f=3422&t=20282
on change the script should be called like this: system("python /opt/z-way-server/automation/port.py set", port, newState);
Who can help me?
I have a problem with the new automation.
I have a shiftregister hoocked up to my Raspberry which drive 8 relais.
by sending "python port.py init" does a init of the shiftregister
"python port.py set 1 1" set port 1 to 1
"python port.py get 1" returns 0 or 1 depending on the state of the port
I added to main.js:
try {
system("python /opt/z-way-server/automation/port.py init");
} catch(err) {
debugPrint("Failed to execute script system call: " + err);
}
This works! So I can control the shift register from the javascript code.
Now I am trying to add 8 virtual devices and bind them to execute the script without succes, like in viewtopic.php?f=3422&t=20282
on change the script should be called like this: system("python /opt/z-way-server/automation/port.py set", port, newState);
Who can help me?