timer inside rules for a value less than a second

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

timer inside rules for a value less than a second

#1 Post by megamarco83 » 22 Oct 2018, 23:40

Hi, is it possible to use timer inside rules for a value that is less than a second?
i need to trigger a relay for a timer that is about 0.4seconds

now i have:

Code: Select all

on event_UP_SHORT_blind_test_2 do
 if [relayp#R_UP_2]>0
  output,relayp,3,0
 else
  output,relayp,3,0
  output,relayp,2,1
 timerset,1,2 // to trigger relay UP direction for 2seconds
 endif 
endon
but i need to trigger for a value that is 0.4seconds
is it possible?
thanks

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: timer inside rules for a value less than a second

#2 Post by grovkillen » 23 Oct 2018, 06:10

Currently only seconds are possible. But you can use pulse commands.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

megamarco83
Normal user
Posts: 230
Joined: 13 Apr 2017, 23:09

Re: timer inside rules for a value less than a second

#3 Post by megamarco83 » 23 Oct 2018, 11:01

grovkillen wrote: 23 Oct 2018, 06:10 Currently only seconds are possible. But you can use pulse commands.
i'm using multiple output plugin P_160
i try to use pulse in this way but it not works:

Code: Select all

on event_UP_SHORT_blind_test do
 if [relayp#R_UP]>0
  output,relayp,0,0
  SendToHTTP 192.168.0.105,8085,/json.htm?type=command&param=updateuservariable&vname=blindControl&vtype=2&vvalue={"n"}
 else
  output,relayp,1,0
  pulse,relayp,0,1,50
 timerset,1,2 // to trigger relay UP direction for 2seconds
SendToHTTP 192.168.0.105,8085,/json.htm?type=command&param=updateuservariable&vname=blindControl&vtype=2&vvalue={"n":"blind_1","d":"UP","s":"2"}
  endif 
endon
why?
suggestions?
thanks

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: timer inside rules for a value less than a second

#4 Post by grovkillen » 23 Oct 2018, 11:38

That plugin is not in the official releases and I must ask you to take that issue with the developer of P_0160.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Post Reply

Who is online

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