Trigger shell scripts

General Discussion

Trigger shell scripts

Postby shermaniiv » Thu Dec 29, 2016 2:09 pm

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.
shermaniiv
newt
newt
 
Posts: 3
Joined: Tue May 24, 2016 7:09 am

Re: Trigger shell scripts

Postby kevin » Thu Dec 29, 2016 2:51 pm

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).
Not an employee of the company. Just here to help and keep things clean.
kevin
Platinum Nut
Platinum Nut
 
Posts: 994
Joined: Fri Aug 16, 2013 10:10 am

Re: Trigger shell scripts

Postby shermaniiv » Fri Dec 30, 2016 12:49 pm

Thanks. Sadly I have no Python experience, but I guess this is as good a time as any to learn something new.
shermaniiv
newt
newt
 
Posts: 3
Joined: Tue May 24, 2016 7:09 am


Return to General

Who is online

Users browsing this forum: No registered users and 12 guests

cron