On Clock#Time=All with vars

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
DMike92
Normal user
Posts: 29
Joined: 28 Jul 2020, 02:06
Location: Paris - France

On Clock#Time=All with vars

#1 Post by DMike92 » 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)

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 :-)

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: On Clock#Time=All with vars

#2 Post by Ath » 27 Feb 2023, 11:01

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.
/Ton (PayPal.me)

User avatar
DMike92
Normal user
Posts: 29
Joined: 28 Jul 2020, 02:06
Location: Paris - France

Re: On Clock#Time=All with vars

#3 Post by DMike92 » 01 Mar 2023, 23:31

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

User avatar
DMike92
Normal user
Posts: 29
Joined: 28 Jul 2020, 02:06
Location: Paris - France

Re: On Clock#Time=All with vars

#4 Post by DMike92 » 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?

User avatar
Ath
Normal user
Posts: 3416
Joined: 10 Jun 2018, 12:06
Location: NL

Re: On Clock#Time=All with vars

#5 Post by Ath » 31 Mar 2023, 10:53

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
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests