Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects
Notifications
Clear all

Witty Pi 4 L3V7 scheduler behaviour

5 Posts
2 Users
0 Likes
79 Views
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

Hi

 

it is 14:30pm 8/12/24

This is my script:

BEGIN 2024-12-01 14:40:00
END 2025-12-31 23:59:59
ON H12 # keep ON state for 12 hours
OFF H12 # keep OFF state for 12 hours

What I had expected was for the Rpi to go into standbye as soon as I run:

./runScript.sh as I do not want it on when it is waiting for the timer to kick in.

What am I doing wrong?

 

 

 
Posted : 08/12/2024 4:19 pm
(@admin)
Posts: 507
Member Admin
 

I guess you were seeing the "shifting ON state" behavior, and you are confused by it. This behavior is explained in the user manual, please search it in the user manual and read it first.

Previoiusly I also explained this behavior in some topics:

https://www.uugear.com/forums/technial-support-discussion/whittypi-schedule-not-working-as-it-should-do/#post-1067

https://www.uugear.com/forums/technial-support-discussion/issue-with-starting-a-daily-wake-up-with-wittypi-4/#post-637

 
Posted : 09/12/2024 9:35 am
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

@admin 

Hi,

Yes did read all of that but found it confusing (sorry I did).

But saying that I did miss this part in one of your answers:

"A quick fix for your situation, is after choosing the schedule script, you manually set the next startup at 11:00 and then shutdown your Pi. At 11:00 it will wake up your Pi and next shutdown and startup will be properly scheduled."

 

It only occured to me later to do that.

Obvisously need better glasses.

 

Many Thanks

 

 

 

 

 
Posted : 09/12/2024 9:45 am
(@admin)
Posts: 507
Member Admin
 

Maybe explaining with the scenario you mentioned will be easier to understand:

Posted by: @andrew-simpson17

it is 14:30pm 8/12/24

This is my script:

BEGIN 2024-12-01 14:40:00
END 2025-12-31 23:59:59
ON H12 # keep ON state for 12 hours
OFF H12 # keep OFF state for 12 hours

You want to turn your Pi ON at 14:40, and turn it OFF at 02:40 everyday. This schedule script splits a day (24 hours) to two parts: one with the Pi ON, and the other one with the Pi OFF. The ON part begins at 14:40 and ends at 02:40 (the next day), while the OFF parts begins at 02:40 (the next day) and ends at 14:40 (the next day).

Now it is 14:30, which is in the OFF part of the day, meaning the Pi is supposed to be OFF. However you are running your Pi at that moment, meaning the Pi is actually ON. Witty Pi's software has two options to keep the consistency:

  1. Immediately shutdown your Pi, so it is really OFF now.
  2. Shift the current time to the next ON part, pretending the current time is in that ON part in the future.

Witty Pi's software takes the second option, which causes the "shifting ON state" behavior. However, it is still better than shutting down the Pi immediately, which leads to a very bad experience.

With this "shifting ON state" behavior, running the schedule script on 14:30 will have the same result than running it on 14:40, which will schedule the next shutdown at 02:40 on the next day, while the next startup will be at 14:40 on the next day.

The quick fixing I suggested in another topic is just to override the scheduled shutdown time, and let the software to do the proper scheduling again on next boot.

 

 

 
Posted : 09/12/2024 10:24 am
(@andrew-simpson17)
Posts: 103
Estimable Member Customer
Topic starter
 

@admin Interesting. But, the times I used were just an example.  The current time could be 08:00:00 and teh script starts at 14:30 and this way would not be practical?

With

  1. Immediately shutdown your Pi, so it is really OFF now.

I tested this and the script did not get activated for some reason.

 
Posted : 09/12/2024 10:40 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.