How to run bash script

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Post Reply
Jippe
Starting Member
Starting Member
Posts: 9
Joined: Wed Dec 11, 2013 7:39 pm

How to run bash script

Post by Jippe »

How I can run bash script as action?
User avatar
RDNZL
Forum Moderator
Forum Moderator
Posts: 1008
Joined: Sun Sep 24, 2006 1:45 pm
Location: Dordrecht, The Netherlands
Contact:

Re: How to run bash script

Post by RDNZL »

By using the 'execute command' action type and entering the full path to the script.
Make sure you did chmod +x <file> and the user you run domotiga as has permissions.
Regards, Ron.
Jippe
Starting Member
Starting Member
Posts: 9
Joined: Wed Dec 11, 2013 7:39 pm

Re: How to run bash script

Post by Jippe »

Thanks, I didn't noticed that :oops:

Another question: How to make condition, device value is greater than 30? Dev_39_Value1 > 30, gives an error but Dev_39_Value1 = 30, gives false
User avatar
sj3fk3
Member
Member
Posts: 119
Joined: Mon Apr 23, 2012 8:33 am
Location: Abcoude

Re: How to run bash script

Post by sj3fk3 »

Jippe wrote:Thanks, I didn't noticed that :oops:

Another question: How to make condition, device value is greater than 30? Dev_39_Value1 > 30, gives an error but Dev_39_Value1 = 30, gives false
IMHO the values are seen as strings and "=" would do a simple string comparison (and would be true when Dev_39_Value1="30". So using Val(Dev_39_Value1)>30 works like a charm :-)

n.b.
the val() converts strings to integers.
Kind Regards,
Greg.
Jippe
Starting Member
Starting Member
Posts: 9
Joined: Wed Dec 11, 2013 7:39 pm

Re: How to run bash script

Post by Jippe »

Thanks sj3fk3, Dev_39_Value1 > "30" works also but I changed it like you said.
I'll take baby steps with this new software and wish more documentation/examples..
User avatar
sj3fk3
Member
Member
Posts: 119
Joined: Mon Apr 23, 2012 8:33 am
Location: Abcoude

Re: How to run bash script

Post by sj3fk3 »

Jippe wrote:Thanks sj3fk3, Dev_39_Value1 > "30" works also but I changed it like you said.
I'll take baby steps with this new software and wish more documentation/examples..
You did see this one right? It contains some useful gems of information: http://domotiga.nl/projects/domotiga/wi ... nual_(old)

and you can always ask stuf here or on the http://domotiga.nl/projects/domotiga/boards
Kind Regards,
Greg.
Post Reply

Return to “DomotiGa Forum”