Page 1 of 1

Using Milliseconds in Rules.

Posted: 08 Sep 2017, 14:29
by rmhoutz
Objective is to use a relay to do the same thing as the push button in my garage. To do that I just need the relay to turn on then off again for about 500 milliseconds. I've worked out how to use a timer in the rules to turn the relay off after a second but I really don't need it on for a full second. Is it possible to use milliseconds in the rules?
I have openHAB2 sending a MQTT to the ESP and the rule I set below to turn the switch off.
Any help or advice would be great.

Code: Select all

on Garage_Door#ON do
 gpio,5,1
 timerSet,1,1
 endon

On Rules#Timer=1 do
 gpio,5,0
endon

Re: Using Milliseconds in Rules.

Posted: 08 Sep 2017, 14:55
by bfabien
Hi,

You have the pulse command for that
https://www.letscontrolit.com/wiki/inde ... ort_pulses
I've used it for a remote controller, and it works quite well!
Regards

Re: Using Milliseconds in Rules.

Posted: 08 Sep 2017, 16:54
by rmhoutz
bfabien wrote: 08 Sep 2017, 14:55 You have the pulse command for that
https://www.letscontrolit.com/wiki/inde ... ort_pulses
I've used it for a remote controller, and it works quite well!
:D Hi bfabien
Thank you so much, I figured it had to be something simple but I'm just getting started using ESP Easy and didn't know the pulse command was an option.
Funny enough I did see the GPIO command for simple on off and am using it on outlet switches I guess I just stopped reading that page after I figured out how to control the relay.
Thanks again you have no idea how much this helps.

Re: Using Milliseconds in Rules.

Posted: 30 Apr 2018, 11:29
by TommySharp
@rmhoutz

Could you share your final solution for your garage door and the momentary button press?

Re: Using Milliseconds in Rules.

Posted: 30 Apr 2018, 13:58
by grovkillen