How to run bash script

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

How to run bash script

Postby Jippe » Wed Dec 18, 2013 3:01 pm

How I can run bash script as action?
Jippe
Starting Member
Starting Member
 
Posts: 9
Joined: December 2013

Re: How to run bash script

Postby RDNZL » Wed Dec 18, 2013 7:46 pm

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.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 993
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: How to run bash script

Postby Jippe » Wed Dec 18, 2013 8:01 pm

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
Jippe
Starting Member
Starting Member
 
Posts: 9
Joined: December 2013

Re: How to run bash script

Postby sj3fk3 » Mon Dec 30, 2013 7:18 pm

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.
User avatar
sj3fk3
Member
Member
 
Posts: 119
Joined: April 2012
Location: Abcoude

Re: How to run bash script

Postby Jippe » Tue Dec 31, 2013 7:36 pm

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..
Jippe
Starting Member
Starting Member
 
Posts: 9
Joined: December 2013

Re: How to run bash script

Postby sj3fk3 » Thu Jan 02, 2014 12:36 pm

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 ... anual_(old)

and you can always ask stuf here or on the http://domotiga.nl/projects/domotiga/boards
Kind Regards,
Greg.
User avatar
sj3fk3
Member
Member
 
Posts: 119
Joined: April 2012
Location: Abcoude


Return to DomotiGa Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron