Notifications
Clear all

Witty Pi 4 Mini set_startup_time

3 Posts
2 Users
0 Reactions
43 Views
(@rpimike)
Posts: 2
New Member
Topic starter
 

We are trying to migrate from Witty Pi 3 mini to Witty Pi 4 mini. We only use set_startup_time to startup and control our own shutdown. 

It appears that the set_startup_time command in utilities.sh now uses local time rather than UTC time, please can this be confirmed?

Both Witty Pi's started at the same time.

 

3 mini, test.sh :

. utilities.sh

echo get_rtc_time
get_rtc_time

echo set_startup_time
set_startup_time 08 09 55 00

echo get_startup_time
echo $(get_startup_time)
pi@ODIN-DEV:~/wittypi $ ./test.sh
get_rtc_time
Tue 08 Jul 2025 10:45:33 BST
set_startup_time
set_startup_time 1: 08 2: 09 3: 55 4: 00
get_startup_time
8 9:55:0
pi@ODIN-DEV:~/wittypi $ 
[2025-07-08 10:15:33] Witty Pi daemon (v3.13) is started.
[2025-07-08 10:15:33] Running on Raspberry Pi 3 Model B Plus Rev 1.3
[2025-07-08 10:15:33] Wiring Pi version: 2.50
[2025-07-08 10:15:36] Firmware ID: 0x22
[2025-07-08 10:15:36] Current Vout=5.13, Iout=0.53
[2025-07-08 10:15:36] Send out the SYS_UP signal via GPIO-17 pin.
[2025-07-08 10:15:36] Synchronizing time between system and Witty Pi...
[2025-07-08 10:15:36] Writing RTC time to system...
[2025-07-08 10:27:05] Done :-)
[2025-07-08 10:27:12] Witty Pi runScript.sh disabled, schedule controlled by /opt/odin/od
in-control.sh
[2025-07-08 10:27:12] Pending for incoming shutdown command...
[2025-07-08 10:45:33] Startup time written
[2025-07-08 10:45:33] Startup time read
[2025-07-08 10:47:01] Witty Pi daemon (v3.13) is started.
[2025-07-08 10:47:01] Running on Raspberry Pi 3 Model B Plus Rev 1.3
[2025-07-08 10:47:01] Wiring Pi version: 2.50
[2025-07-08 10:47:04] Firmware ID: 0x22
[2025-07-08 10:47:04] Current Vout=5.2, Iout=0.55
[2025-07-08 10:47:04] Send out the SYS_UP signal via GPIO-17 pin.
[2025-07-08 10:47:04] System startup as scheduled.
[2025-07-08 10:47:04] Synchronizing time between system and Witty Pi...
[2025-07-08 10:47:04] Writing RTC time to system...
[2025-07-08 10:55:11] Done :-)
[2025-07-08 10:55:18] Witty Pi runScript.sh disabled, schedule controlled by /opt/odin/od
in-control.sh
[2025-07-08 10:55:18] Pending for incoming shutdown command...

4 mini, test.sh:

. utilities.sh

echo get_rtc_time
get_rtc_time

echo set_startup_time
set_startup_time 08 10 55 00

echo get_startup_time
echo $(get_startup_time)
pi@ODIN-DEV:~/wittypi $ ./test.sh
get_rtc_time
2025-07-08 10:45:10 BST
set_startup_time
get_startup_time
08 10:55:00
pi@ODIN-DEV:~/wittypi $  
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.21) is started.
[xxxx-xx-xx xx:xx:xx] System: Raspbian GNU/Linux 10 (buster), Kernel: Linux 5.10.103-v7+, Architecture: armhf
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model B Rev 1.2
[xxxx-xx-xx xx:xx:xx] RTC offset register has value 0x77
[xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system
[xxxx-xx-xx xx:xx:xx] Writing RTC time to system...
[2025-07-08 10:15:39] Done :-)
[2025-07-08 10:15:39] Firmware ID: 0x36
[2025-07-08 10:15:39] Firmware Revison: 0x07
[2025-07-08 10:15:39] Current Vout=5.2V, Iout=0.3A
[2025-07-08 10:15:39] System starts up because it previously reboot.
[2025-07-08 10:15:44] Send out the SYS_UP signal via GPIO-17 pin.
[2025-07-08 10:15:44] File "schedule.wpi" not found, skip running schedule script.
[2025-07-08 10:15:44] Pending for incoming shutdown command...
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.21) is started.
[xxxx-xx-xx xx:xx:xx] System: Raspbian GNU/Linux 10 (buster), Kernel: Linux 5.10.103-v7+, Architecture: armhf
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi 3 Model B Rev 1.2
[xxxx-xx-xx xx:xx:xx] RTC offset register has value 0x77
[xxxx-xx-xx xx:xx:xx] Seems RTC has good time, write RTC time into system
[xxxx-xx-xx xx:xx:xx] Writing RTC time to system...
[2025-07-08 10:55:10] Done :-)
[2025-07-08 10:55:10] Firmware ID: 0x36
[2025-07-08 10:55:10] Firmware Revison: 0x07
[2025-07-08 10:55:10] Current Vout=5.19V, Iout=0.25A
[2025-07-08 10:55:10] System starts up because scheduled startup is due.
[2025-07-08 10:55:15] Send out the SYS_UP signal via GPIO-17 pin.
[2025-07-08 10:55:15] File "schedule.wpi" not found, skip running schedule script.
[2025-07-08 10:55:15] Pending for incoming shutdown command...

 

 
Posted : 08/07/2025 12:18 pm
(@admin)
Posts: 631
Member Admin
 

Yes, Witty Pi 4 saves local time in the RTC, and it doesn't need to convert UTC time to local time like Witty Pi 3 does.

 
Posted : 08/07/2025 1:54 pm
(@rpimike)
Posts: 2
New Member
Topic starter
 

Thanks. May be an idea to add that to your migrating section of the manual.

 
Posted : 08/07/2025 2:35 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.