I wrote a simple script to control my foscam cameras motion. However there are plenty of commands available and I have two cameras of that type, so I tried to do it all in one script. As arguments I'm passing camera number and command number, it is simple and works from executing from the shell via eg. "./camera.sh 1 6"
However when I try to run it from switch using : I'm getting fault:
Code: Select all
2018-10-14 22:51:29.739 Error: Error executing script command (/home/pi/domoticz/scripts/camera.sh). returned: 256
Is there a way to trigger scripts from switch selector with passed arguments? I could make a workaround and create like 15 different scripts doing same thing just with different camera and different command, but I hope it's possible to make it in "cleaner" way:) I've spend last hour to figure/find that out, so any help will be much appreciated:)
Thanks!