Page 1 of 1
Trigger shell scripts

Posted:
Thu Dec 29, 2016 2:09 pm
by shermaniiv
Is there a way to have an event trigger a shell script? I have a script that turns on a relay, waits 5 seconds and then turns it off. I'm not too familiar with python or if it can be done there.
Re: Trigger shell scripts

Posted:
Thu Dec 29, 2016 2:51 pm
by kevin
We do not provide the ability to execute shell scripts.
That said, you do have a few options - the alarmdecoder python library with a SocketDevice can listen to the stream and do specific things on events - there are examples on the github repository
You can also utilize a webserver and do a custom notification and point it to a URL that parses the data and executes things based on that.
Also, depending on panel, you can have the panel toggle the relay with a relay module on event (can be emulated with alarmdecoder).
Re: Trigger shell scripts

Posted:
Fri Dec 30, 2016 12:49 pm
by shermaniiv
Thanks. Sadly I have no Python experience, but I guess this is as good a time as any to learn something new.