Page 1 of 1

On Clock#Time=All with vars

Posted: 26 Feb 2023, 17:23
by DMike92
I have surprisingly found that this syntax almost works:
On Clock#Time=All,[Horaires#hmat]:[Horaires#mnmat] do
...
endon

With Device 3 named Horaires and containing 4 variables, 2 of which being:
hmat for morning hour
mnmat for morning minutes

The ESP8266 controls my blinds and I able to change these timings time to time when sun rises/falls earlier or sooner.

This worked for 3 years until i discover that the On Clock#Time did not fired when minutes are < 10
I have tried 15:00, 15:01, 15:05 15:09 and finally 15:10 (this last one worked)

Main page:

Code: Select all

Build:⋄
20114  - Mega
System Libraries:⋄
ESP82xx Core 2843a5ac, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄
HEAD_b08abc8
Plugin Count:⋄
47 [Normal]
Build Time:⋄
Aug 18 2021 18:18:13
Binary Filename:⋄
ESP_Easy_mega_20210818_normal_ESP8266_4M1M
Build Platform:⋄
Linux-5.8.0-1039-azure-x86_64-with-glibc2.31
Git HEAD:⋄
HEAD_b08abc8
Any ideas? Update? Use different syntax? Ask for modification of the software?
Thanks :-)

Re: On Clock#Time=All with vars

Posted: 27 Feb 2023, 11:01
by Ath
DMike92 wrote: 26 Feb 2023, 17:23 I have surprisingly found that this syntax almost works:
On Clock#Time=All,[Horaires#hmat]:[Horaires#mnmat] do
...
endon

With Device 3 named Horaires and containing 4 variables, 2 of which being:
hmat for morning hour
mnmat for morning minutes

The ESP8266 controls my blinds and I able to change these timings time to time when sun rises/falls earlier or sooner.

This worked for 3 years until i discover that the On Clock#Time did not fired when minutes are < 10
I have tried 15:00, 15:01, 15:05 15:09 and finally 15:10 (this last one worked)
You can use formatting statements to have to minutes prefixed with a 0 when below 10:

Code: Select all

On Clock#Time=All,[Horaires#hmat]:[Horaires#mnmat#D2] do
...
endon
Please be aware that this syntax is no longer (fully) supported since May/June 2022, when caching of the rules was introduced to enhance performance.

Re: On Clock#Time=All with vars

Posted: 01 Mar 2023, 23:31
by DMike92
Thank you Ath for your reply.
Unfortunately that did not solve the problem.
I have the same rule for the evening (soir) to close the blinds and
I tried hsoir=14 and mnsoir=1 but nothing happened à 14:01

Re: On Clock#Time=All with vars

Posted: 07 Mar 2023, 16:38
by DMike92
I tried 8:00 : 8;01 ; 8:05 ; 8:09 and 8;10 and only the latest worked (8:10)
So, no solution/workaround?

Re: On Clock#Time=All with vars

Posted: 31 Mar 2023, 10:53
by Ath
DMike92 wrote: 07 Mar 2023, 16:38 I tried 8:00 : 8;01 ; 8:05 ; 8:09 and 8;10 and only the latest worked (8:10)
So, no solution/workaround?
A fix for this issue has been applied in 2 PRs, 1 fixing the parsing of numbers with leading zeroes #4573 (already merged), and 1 allowing to use variables in On Clock#Time= events: #4579