Espeasy: It would be possible to create a sub-second delays?

Created on 6 Sep 2018  路  7Comments  路  Source: letscontrolit/ESPEasy

Hello everybody!
Firstly I would like to congratulate the developers of ESP EASY.
I have a network running with 134 boards running the latest version "Release mega-20180809" with mqtt perfectly.
They are running 8 days without reset or any bug

But, sorry for asking a noob question here but how do I add a timer function to a with less 1 second?
No need to be precise, but something close to 0.5s...

Below is an example of the program you would like to change

//***** Rules sample program ****//
On button01#Switch do
if [button01#Switch]=0
timerSet,1,1
endif
endon

On Rules#Timer=1 do
if [relay01#Switch]=0
gpio,12,1
else
gpio,12,0
endif
endon

Feature Request

All 7 comments

So essentially you want to check if a switch is long or short pressed?

Yes! If I Switch the button I need to waiting any time or the lamp to blink ...

We might be able to think of some other way to accomplish that besides rules and timers. I can see great use of this. Sub second timers might still be if use though. (I'm just thinking out loud here)

Hmm 134 boards. Are they all in the same network?
Just curious, but how many accesspoints do you use? (I know a bit offtopic)

We have already planned to do a remake of how GPIO pins are handled and along with that allow for some low-level timing of pulse-width. Then a lot of use cases may just read the timings for a specific pin.
This allows among other things to measure the button press duration.
But I guess this will take a few weeks. Looking into the GPIO pins is very high on the to-do list though.

Adding sub-second timers to rules will also be added, but before I can add that, the rules have to be handled by the scheduler first.

Answering your questions Gijs Noorlander

Hmm 134 boards. Are they all in the same network?
R- Yes in the same network.
Just curious, but how many accesspoints do you use? (I know a bit offtopic).
R- I created a parallel network with 3 router only.
Because of this wonderful project, We are automating the all company.
The big secret is ... if you have a 192.168.0.xxx network and another one created by a router
192.168.10.xxx, MQTT packets circulate between them.
In other words, all automation uses only one IP ADRESS of the main network

Sorry for my poor english...

I am very curious to know more about that project, but maybe you could open a topic on the forum about it?
Or if it is not for everyone to see, you can also email me.

About the switches.
I am now looking into the code of P003_PulseCounter and P001_Switch.
And I am now convinced these should be using the same basic GPIO handler and also both the same debounce code.
There is also a limit on P003 so it can only be used on pos 1...4 of the plugins. That limit should also go.

So I guess this issue will become a bit different.
It is a rather big change, so it will take some while, but I guess it will solve at least 5 - 10 other issues here on Github and maybe more.

Dear Gijs Noorlander!

What do you want to know about my network structure?
Please send me an email "[email protected]"
It will be an honour...
A suggestion of a noob...
If a delay function with less 1s is too complicated.
And a GPIO debounce function?
Even with little precision, it would help a lot.

What do you think?

Marcelo Miranda

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wolverinevn picture wolverinevn  路  5Comments

TD-er picture TD-er  路  4Comments

DittelHome picture DittelHome  路  5Comments

jobst picture jobst  路  5Comments

uzi18 picture uzi18  路  5Comments