time controlled looping

15 views
Skip to first unread message

Samir Arishy

unread,
Jun 7, 2024, 10:50:21 PMJun 7
to TasmotaUsers
Here what Gimini came up with. I am sure HI ( HUman Intel) can teach AI a trick :
Rule1 On Time => [08:00:00] * 0000000 # Turn on at 8:00 AM every day Do Power ON EndLoop # Start the loop immediately (no need for separate loop statement) Delay 2700 # Wait for 45 minutes (2700 seconds) Do Power OFF Delay 2700 # Wait for another 45 minutes (2700 seconds) EndLoop # Loop will continue until interrupted Off Time => [17:00:00] * 0000000 # Stop the loop at 5:00 PM every day EndRule 

Justin Adie

unread,
Jun 8, 2024, 1:50:44 AMJun 8
to Samir Arishy, TasmotaUsers
You have not articulated what you are wanting.  However that ai generated rule does not use the right syntax

Rule1 1

Rule1 on time#minute=480 do power1 1 Endon On power1#state do ruletimer1 2700 Endon On rules#timer=1 do power1 toggle Endon On time#minute=1020 do backlog power1 0; ruletimer1 0 endon

On Sat, 8 Jun 2024, 03:50 Samir Arishy, <ari...@gmail.com> wrote:
Here what Gimini came up with. I am sure HI ( HUman Intel) can teach AI a trick :
Rule1 On Time => [08:00:00] * 0000000 # Turn on at 8:00 AM every day Do Power ON EndLoop # Start the loop immediately (no need for separate loop statement) Delay 2700 # Wait for 45 minutes (2700 seconds) Do Power OFF Delay 2700 # Wait for another 45 minutes (2700 seconds) EndLoop # Loop will continue until interrupted Off Time => [17:00:00] * 0000000 # Stop the loop at 5:00 PM every day EndRule 

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/be58a20c-822b-41b0-869c-2b6a64443f60n%40googlegroups.com.

Justin Adie

unread,
Jun 8, 2024, 3:39:21 AMJun 8
to Samir Arishy, SonoffUsers
The minute number is the number of minutes after midnight.  Choose what you need for testing depending on your timezone.

The 2700 is the number of seconds represented by 45 minutes.  Replace with 60 for a one minute toggle.






On Sat, 8 Jun 2024, 08:25 Samir Arishy, <ari...@gmail.com> wrote:
Thank you for taking time to respond. You are right, generated rules are not correct. For me to test your work I need to shorten the time and I hope after articulating the rule you will be able to give me a hand. 
The objective of the rule is to start at 08:00 power on for 45 minutes, then power off for 45 Minutes. do this in a loop that exit at 17:00. Please let me know if this was clear enough for you.

to test it I need to change both the time of the day start and End. Also the time itself instead of 45 say 1 minute on and one min off

Philip Knowles

unread,
Jun 8, 2024, 4:56:09 AMJun 8
to Samir Arishy, Justin Adie, SonoffUsers
If the on/off time is shorter than 6 minutes look at using blink as it will automatically toggle after the blink time and the code can be very short. This is the code for 6 minute blinks from 0800 to 1700
Blinktime 3600 (6minutes)
Blinkcount 45 (9 hours at 5 per hour - 6 minutes on 6 minutes off)
Rule1 on time#minute|480 do power1 3 endon
Rule1 1

As I say very short

From: 'Justin Adie' via TasmotaUsers <sonof...@googlegroups.com>
Sent: 08 June 2024 08:39
To: Samir Arishy <ari...@gmail.com>
Cc: SonoffUsers <sonof...@googlegroups.com>
Subject: Re: time controlled looping
 
Reply all
Reply to author
Forward
0 new messages