logo elektroda
logo elektroda
X
logo elektroda

ESPEasy: How to add a 15 s condition for t#Ktz>70 and flow<1 in the rules script?

sznickers 228 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21781770
    sznickers
    Level 11  
    Hi,

    I would like to create a script like the one below, but it is missing one key thing. I would like this condition of higher temp and no flow to last at least 15 s . How to do this? Is it with a looptimer or timerset? Or some kind of variable, but I need it to be done for me as I won't grasp it myself.
    Or can I hit this forum:
    https://www.letscontrolit.com/forum/viewtopic.php?t=10853
    ?

    On t#Ktz Do
    If t#Ktz>70 And flow<1 // if temperature rises above 70*C and flow drops below 1 l/min
    GPIO,2,1 // activate alarm
    Else
    GPIO,2,0
    Endon

    https://espeasy.readthedocs.io/en/latest/Rules/Rules.html
  • ADVERTISEMENT
  • #2 21782080
    sznickers
    Level 11  
    I have created a script with a variable, all that is left is to add a timer, but I don't know how. So that an event lasts for example 5 seconds and only the next one.
    On ads#A0 Do
      If [ads#A0]<150 And [dummy#var]=0
      taskvalueset dummy,var,1
      GPIO,2,1
      endif
      If [ads#A0]>150 And [dummy#var]=1
      taskvalueset dummy,var,0
      GPIO,2,0
      endif
    Endon
ADVERTISEMENT