Page 1 of 1

on Clock#Time=All,**:00 do

Posted: 26 Mar 2023, 11:13
by Andrew Mamohin
How can I make an event that runs every hour at exactly 0 minutes?
If I put "on Clock#Time=All,**:00 do", then it throws an error: "timeStringToSeconds: '0' --> invalid".
The same happens if "Clock#Time=All,**:0".
If I put "on Clock#Time=All,**:01 do", then everything turns out well.

Re: on Clock#Time=All,**:00 do

Posted: 26 Mar 2023, 11:22
by TD-er
Sounds like a bug....

As a work-around, you could start a timer at :59 and act on the event triggered by this timer.
Just until this bug is fixed. (Related GitHub issue)

Re: on Clock#Time=All,**:00 do

Posted: 26 Mar 2023, 11:28
by Andrew Mamohin
TD-er wrote: 26 Mar 2023, 11:22 As a work-around, you could start a timer at :59
Thanks for the answer! For now, I'll set the event to 01, it's not so critical. I just wanted to show a bug.

Re: on Clock#Time=All,**:00 do

Posted: 27 Mar 2023, 12:39
by TD-er
I just looked into this and I find it really strange this error is occuring now.
The only changes made to it (2 years ago) is to change `byte` to `uint8_t`
The latest change before that was 3 year ago.

Re: on Clock#Time=All,**:00 do

Posted: 27 Mar 2023, 13:25
by TD-er
Hmm, looks like the getNumerical function is acting up here....

May have to look at it later this evening.

Re: on Clock#Time=All,**:00 do

Posted: 27 Mar 2023, 17:35
by TD-er
Can you test the test build for this PR (when it is ready) ?
https://github.com/letscontrolit/ESPEasy/pull/4573

Re: on Clock#Time=All,**:00 do

Posted: 27 Mar 2023, 18:10
by Andrew Mamohin
TD-er wrote: 27 Mar 2023, 17:35 Can you test the test build for this PR (when it is ready) ?
With pleasure. Where can I get it?

Re: on Clock#Time=All,**:00 do

Posted: 27 Mar 2023, 19:12
by Ath
Andrew Mamohin wrote: 27 Mar 2023, 18:10 With pleasure. Where can I get it?
https://github.com/letscontrolit/ESPEas ... 4533803433

Re: on Clock#Time=All,**:00 do

Posted: 28 Mar 2023, 07:50
by Andrew Mamohin
Everything works without errors. Thank you very much!

Re: on Clock#Time=All,**:00 do

Posted: 28 Mar 2023, 08:49
by TD-er
Great!

This was a bug in our numerical parser function, so it may also fix other issues where numbers are parsed.

Re: on Clock#Time=All,**:00 do

Posted: 31 Mar 2023, 18:48
by Ath
Andrew Mamohin wrote: 28 Mar 2023, 07:50
Everything works without errors. Thank you very much!
The fixes have been merged into 'mega'.