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

[Solved / Archived] Witty Pi 4 and Raspberry Pi 4: How to schedule absolute times for daily booting and shutdown

5 Posts
3 Users
0 Likes
118 Views
(@oliver)
Posts: 4
Active Member
Topic starter
 

Hello,

I tried with the examples for the schedule.wpi to set a daily booting time at 06:00:00 and shutdown at 06:05:00 and booting at 18:00 and shutdown at 18:05. With the ON and OFF times you can adjust only relative times. I wonder if I'm the only one who needs this feature? Or is there a workaround or maybe another way to schedule absolute times?

Many thanks in advance for any hint!

Oliver

 
Posted : 03/03/2025 4:48 pm
(@admin)
Posts: 567
Member Admin
 

A schedule script like this will work:

BEGIN 2025-03-03 06:00:00
END 2025-03-05 23:45:00
ON M5
OFF H11 M55
ON M5
OFF H11 M55

Changing the END date time can decide when this schdule script will stop.

If you simulate it in the online app: https://www.uugear.com/app/wittypi-scriptgen/ , you will get:

Raspberry Pi turns OFF at: 2025-03-03 18:05:00
Raspberry Pi turns ON at: 2025-03-04 06:00:00
Raspberry Pi turns OFF at: 2025-03-04 06:05:00
Raspberry Pi turns ON at: 2025-03-04 18:00:00
Raspberry Pi turns OFF at: 2025-03-04 18:05:00
Raspberry Pi turns ON at: 2025-03-05 06:00:00
Raspberry Pi turns OFF at: 2025-03-05 06:05:00
Raspberry Pi turns ON at: 2025-03-05 18:00:00
Raspberry Pi turns OFF at: 2025-03-05 18:05:00
 
Posted : 03/03/2025 5:07 pm
(@oliver)
Posts: 4
Active Member
Topic starter
 

Hello,

thank you very much for the fast reply. As I understand your setting correctly the combination of BEGIN ON OFF and END times need to be 24 hours in order to create a daily cycle...this looks now logic to me 😉

Thanks again and have a nice evening!

Oliver

 
Posted : 03/03/2025 5:20 pm
(@matt-schneider)
Posts: 2
New Member Customer
 

Hello, I am hoping for a similar functionality, but would like to put End at a year or two in the future (eventually I'm hoping to leave this device run by itself for many months (years...) unattended).  With the relative time control, I'm worried that the daily wake-up time will slowly drift over weeks or months.  For my application, it is important to wake at a (decently) precise absolute time each day.  The functionality I would like is: wake each day at 11:00 AM, then shutdown 5 min later.  If relative time is all that is available, I suppose I could create a script to update the relative time to account for actual time that it woke up (effectively a feedback loop to adjust relative time to have accurate daily times).

 
Posted : 10/03/2025 2:56 am
(@admin)
Posts: 567
Member Admin
 

@matt-schneider When better accuracy is needed, you may consider updating the RTC's time with:

  • Network time, if network connection is possible (either via cable or via 3G/4G/5G)
  • GPS time, if the device can receive GPS signal

These require additional hardware as well as software development.

There is no need to worry relative time or absolute time is being used: you just need to make sure the RTC has the correct time.

 
Posted : 10/03/2025 10:55 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.