Read Task Value in rule script

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
nithin
New user
Posts: 2
Joined: 12 Nov 2016, 03:36

Read Task Value in rule script

#1 Post by nithin » 12 Nov 2016, 03:47

Is it possible to read the Task values in rule script? something like

Code: Select all

if [TaskValueGet 1,1]>10
  gpio 15,0
endif

Martinus

Re: Read Task Value in rule script

#2 Post by Martinus » 12 Nov 2016, 16:21

nithin wrote:Is it possible to read the Task values in rule script? something like

Code: Select all

if [TaskValueGet 1,1]>10
  gpio 15,0
endif
You can, but you have to use the taskname and task valuename pairs in your script to refer to a certain task. So if your task is named DHT11 and you did not change the valuenames, it should be like this:

Code: Select all

if [DHT11#Temperature]>10
  gpio 15,0
endif

nithin
New user
Posts: 2
Joined: 12 Nov 2016, 03:36

Re: Read Task Value in rule script

#3 Post by nithin » 12 Nov 2016, 23:56

Martinus wrote:
nithin wrote:Is it possible to read the Task values in rule script? something like

Code: Select all

if [TaskValueGet 1,1]>10
  gpio 15,0
endif
You can, but you have to use the taskname and task valuename pairs in your script to refer to a certain task. So if your task is named DHT11 and you did not change the valuenames, it should be like this:

Code: Select all

if [DHT11#Temperature]>10
  gpio 15,0
endif
Got it. Thanks Martinus

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 15 guests