how to make the notifications

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
bledad
Normal user
Posts: 86
Joined: 23 Nov 2020, 10:57
Location: France

how to make the notifications

#1 Post by bledad » 10 Apr 2022, 16:26

hello,
i want disable in rules a action

Code: Select all

//On sonde1#temperature do
//   if [sonde1#temperature] < 26 and %v1% = 1
//     gpio,16,1
//   endif
//   if [sonde1#temperature] > 27
//     gpio,16,0
//   endif
//endon
is it possible to do it differently without removing it ??

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: how to make the notifications

#2 Post by chromo23 » 10 Apr 2022, 17:14

you could do an intentional typo of the taskname.

example:

Code: Select all

On Xsonde1#temperature do

User avatar
Ath
Normal user
Posts: 3518
Joined: 10 Jun 2018, 12:06
Location: NL

Re: how to make the notifications

#3 Post by Ath » 10 Apr 2022, 17:20

Depending on what you need to achieve, you can also disable the task, using the "TaskDisable,Sonde1" command, either from the Tools page, another rule, or a remote http action.
If you want to keep the task enabled, but only stop the gpio actions, you can also add some code, so that it only does the actions when a flag is not set:

Code: Select all

On sonde1#temperature do
  if %v2% = 0
    if [sonde1#temperature] < 26 and %v1% = 1
      gpio,16,1
    endif
    if [sonde1#temperature] > 27
      gpio,16,0
    endif
  endif
endon

// to enable/disable use command: event,setsonde1=1 (disable) or =0 (enable)
on setSonde1 do
  if %eventvalue1%=1
    let,2,1 // Disable Sonde1 actions
  else
    let,2,0 // Enable Sonde1
  endif
endon
/Ton (PayPal.me)

bledad
Normal user
Posts: 86
Joined: 23 Nov 2020, 10:57
Location: France

Re: how to make the notifications

#4 Post by bledad » 10 Apr 2022, 17:24

chromo23 wrote: 10 Apr 2022, 17:14 you could do an intentional typo of the taskname.

example:

Code: Select all

On Xsonde1#temperature do
ok , thank you , good idea

bledad
Normal user
Posts: 86
Joined: 23 Nov 2020, 10:57
Location: France

Re: how to make the notifications

#5 Post by bledad » 10 Apr 2022, 17:28

thank you Ath
bur i want read the temperature

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 86 guests