Timer less than 1 sec is possible?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

Timer less than 1 sec is possible?

#1 Post by foxejoe » 21 Oct 2017, 13:26

Hi,
I am pretty new with ESPEASY.
I tried to send a pulse command from OpenHab without success to switch a step relay.
So I ad a rule in esp that switch off the gpio after a timer.
The timer can be set in seconds, I would need a 300ms Pulse
Is it possible? and how?

Regards
Lorenzo

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: Timer less than 1 sec is possible?

#2 Post by Shardan » 21 Oct 2017, 13:29

There is a description int he wiki.
Different commands for pulse lenght are availlable.
https://letscontrolit.com/wiki/index.php/GPIO
Regards
Shardan

foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

Re: Timer less than 1 sec is possible?

#3 Post by foxejoe » 21 Oct 2017, 13:36

Thanks for your reply.
I rerad the wiki but I was not able to send the pulse command with a openhab switch.
I can send just a gpio 1 or 2

Can you help me?
Thanks
lorenzo

User avatar
vader
Normal user
Posts: 241
Joined: 21 Mar 2017, 17:35

Re: Timer less than 1 sec is possible?

#4 Post by vader » 21 Oct 2017, 13:42

Can you send HTTP commands? Then try this:

Example to send an active high pulse on GPIO 2 for 300 mSec:
http://<ESP IP address>/control?cmd=Pulse,2,1,300 (1=high impulse, 0=low impulse)

foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

Re: Timer less than 1 sec is possible?

#5 Post by foxejoe » 21 Oct 2017, 15:38

Hi thanks,
Using httl will complicate a bit the switch status ...

Is there any alternative publish message?
I tried:
/[ESP name]/pulse/2/1/ 300 I doesnt work
/[ESP name]/pulse/2 1 300 is just like gpio 2,1 (no pulse)
/[ESP name]/pulse/2 1/ 300 is just like gpio 2,1 (no pulse)
/[ESP name]/pulse/2 1/300 is just like gpio 2,1 (no pulse)
/[ESP name]/pulse/2 1,300 is just like gpio 2,1 (no pulse)

...any idea? Or it is not possible?
Thnks
Lorenzo

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

Re: Timer less than 1 sec is possible?

#6 Post by grovkillen » 21 Oct 2017, 15:43

Code: Select all

/[ESP name]/cmd pulse,2,1,300
https://www.letscontrolit.com/wiki/inde ... _Reference

I see that all examples are HTTP on the GPIO page. Will fix that... MQTT is the future :geek:

https://www.letscontrolit.com/wiki/index.php/GPIO
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:

foxejoe
Normal user
Posts: 10
Joined: 15 Oct 2017, 10:01

Re: Timer less than 1 sec is possible? SOLVED

#7 Post by foxejoe » 21 Oct 2017, 16:12

Thanks...Solved!

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

Re: Timer less than 1 sec is possible?

#8 Post by grovkillen » 22 Oct 2017, 19:58

I have now updated the wiki... hope it makes more sense? https://www.letscontrolit.com/wiki/index.php/GPIO
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: No registered users and 102 guests