Page 1 of 1

Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 23 Dec 2019, 17:21
by leachimtrebron
Hello everybody,

Task:
Turn on a GPIO every minute for 5 seconds.

Is installed:
ESP_Easy_mega-20191208_normal_ESP8266_4M1M.bin

Built ruls:

On start-gpio14 do
    Long Pulse, 14,1,5
endon

on Clock#Time = All,**:1 do
       start-gpio14
endon


Problem:

The GPIO is not switched
Can you give me a tip?

Thank you

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 23 Dec 2019, 19:05
by grovkillen
Event is needed. And no spaces in the command

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 23 Dec 2019, 20:33
by HomeJCL
Havé you declared the switch in Devices ?

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 24 Dec 2019, 12:27
by leachimtrebron
yes they are declared otherwise the http version would not work

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 24 Dec 2019, 12:32
by leachimtrebron
@homejcl: Thank you very much, could you please show me an example of what such an event should look like?

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 24 Dec 2019, 18:26
by grovkillen

Code: Select all

On start-gpio14 do
    LongPulse,14,1,5
endon

on Clock#Time=All,**:*1 do
       Event,start-gpio14
endon

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 25 Dec 2019, 15:07
by leachimtrebron
@grovkillen :


I have taken the source code into my Ruls
On startgpio14 do
LongPulse,14,1,5
endon

on Clock#Time=All,**:*1 do
Event,startgpio14
endon

and rebooted esp No response on GPIO13
I use the image:
ESP_Easy_mega-20191208_normal_ESP8266_4M1M.bin

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 25 Dec 2019, 15:08
by grovkillen
You're very confusing, GPIO 13 or 14?

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 25 Dec 2019, 18:14
by leachimtrebron
sorry its gpio14

Code: Select all

on Clock#Time=All,**:*1 do
Event,startgpio14
endon
doesn't seem to work for me

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 25 Dec 2019, 18:38
by grovkillen
That syntax will be triggered at every hour at minut 01, 11, 21....51

Not every minute.

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 26 Dec 2019, 15:03
by leachimtrebron
@grovkillen
Thanks

Wie ist die Syntax mit dem ich jede Minute einen Event auslösen kann?

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 26 Dec 2019, 16:45
by grovkillen
Either use a timer or use the syntax **:** which will trigger every minute.

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 26 Dec 2019, 18:16
by leachimtrebron
Thanks for the hint.

what does it look like if you want to trigger an event every 3 or every 8 minutes
Could you put some examples in the wiki? This could also help other users.

THANKS for your help

Clock # Time =

All, **: ** ==> every minute
All, **: ** ==> 1 1,11,21,31,41,51 minute
All, **: * 5 ==> 5,15,25,35,45,55 minute
All, **: 30 ==> 00 and 30 minutes
Mon, 7:30 p.m. ==> every Monday at 7:30 p.m.

All,% sunrise% ==> sunrise (*)
All,% sunset% ==> sunset (*)
(*) write under Tools / Advanced Settings / Location Settings

I have not yet understood the following:
What does it look like if you only want to trigger an event every 14 days on Monday?

or an event every 4 weeks on the first Monday?

Are there other options?

Re: Turn on a GPIO every minute for 5 seconds. what am I doing wrong

Posted: 26 Dec 2019, 19:00
by grovkillen
You would use dummy variables. And you can use clock together with timers. So it's really up to you what your plans look like. You have the week day number that you can use and for each Monday you add one to the dummy. When it's = 4 you execute the code. Next Monday you reset it to 1.