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

Witty Pi 4 Wont start automaticly

14 Posts
2 Users
0 Likes
119 Views
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

I have a Witty Pi 4 with the following script:

BEGIN 2015-08-01 07:00:00
END 2030-07-31 23:59:59
ON M15 WAIT
OFF S0

It is suppose to just star the Raspberry every 15m and then when the tasks are done it will shutdown automatically. But when i shutdown it wont start again. Am i doing something wrong on the script?

 
Posted : 18/03/2025 3:40 pm
(@admin)
Posts: 567
Member Admin
 

Posted by: @jorge-silva

OFF S0

You can not specify the duration of "OFF" to 0 second. Witty Pi doesn't know what to do in such case.

You may do this instead:

BEGIN 2015-08-01 07:00:00
END 2030-07-31 23:59:59
ON M1 WAIT
OFF M14

 

 
Posted : 18/03/2025 5:00 pm
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

@admin Changed the script to that and it continues not starting

 
Posted : 18/03/2025 5:38 pm
(@admin)
Posts: 567
Member Admin
 

@jorge-silva then you should check wittyPi.log or schedule.log, and see if the startup time has been properly scheduled.

 
Posted : 18/03/2025 5:43 pm
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

@admin Here it is

chedule.log

--------------- 2025-03-18 16:10:14 ---------------
Skip scheduling next shutdown, which should be done externally.
Schedule next startup at: 2025-03-18 16:15:00
---------------------------------------------------
--------------- 2025-03-18 16:24:40 ---------------
Skip scheduling next shutdown, which should be done externally.
Schedule next startup at: 2025-03-18 16:30:00
---------------------------------------------------

wittyPi.log

[2025-03-18 16:20:18] Done :-)
[2025-03-18 16:20:18] Firmware ID: 0x26
[2025-03-18 16:20:18] Firmware Revison: 0x06
[2025-03-18 16:20:18] Current Vout=5.04V, Iout=1.03A
[2025-03-18 16:20:18] System starts up because the button is clicked.
[2025-03-18 16:24:40] Skip scheduling next shutdown, which should be done externally.
[2025-03-18 16:24:40] Schedule next startup at: 2025-03-18 16:30:00
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.21) is started.
[xxxx-xx-xx xx:xx:xx] System: Debian GNU/Linux 12 (bookworm), Kernel: Linux 6.12.18-v8-16k+, Architecture: arm64
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi Compute Module 5 Rev 1.0
[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-03-18 16:51:40] Done :-)
[2025-03-18 16:51:40] Firmware ID: 0x26
[2025-03-18 16:51:40] Firmware Revison: 0x06
[2025-03-18 16:51:40] Current Vout=5.05V, Iout=1.01A
[2025-03-18 16:51:40] System starts up because the button is clicked.
 
Posted : 18/03/2025 5:56 pm
(@admin)
Posts: 567
Member Admin
 

Posted by: @jorge-silva

[2025-03-18 16:24:40] Schedule next startup at: 2025-03-18 16:30:00

The startup was scheduled at 16:30. However there is no log message about the shutdown, and I guess you called shutdown command directly.

Although it may not be the problem itself, it may be better to set GPIO-4 to output mode and output LOW, which will be detected by daemon.sh and then log message into the file.

gpio -g mode 4 out

gpio -g write 4 0

If the shutdown happened after 16:30, there is no way that Witty Pi can still wake up your Raspberry Pi, because in such case the startup was scheduled in the past.

Also, if you are using power bank, there is chance that the power bank entered sleep mode after your Raspberry Pi is off, and Witty Pi can not wake up your Raspberry Pi because it was not powered when the schedule startup was due.

 
Posted : 19/03/2025 1:10 pm
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

@admin After setting GPIO-4 to output mode and output LOW the machine turns off immediately and starts on the correct time, but it doesn't change the 'Schedule next startup'.

[2025-03-20 10:43:22] Copying "turn_on_every_15m.wpi" to "schedule.wpi"...
[2025-03-20 10:43:22] Running the script...
[2025-03-20 10:43:22] I can not find the end time in the script...
[2025-03-20 10:43:22] Done :-)
[2025-03-20 10:43:49] Skip scheduling next shutdown, which should be done externally.
[2025-03-20 10:43:49] Schedule next startup at: 2025-03-20 10:45:00
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.21) is started.
[xxxx-xx-xx xx:xx:xx] System: Debian GNU/Linux 12 (bookworm), Kernel: Linux 6.12.18-v8-16k+, Architecture: arm64
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi Compute Module 5 Rev 1.0
[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-03-20 10:45:35] Done :-)
[2025-03-20 10:45:35] Firmware ID: 0x26
[2025-03-20 10:45:35] Firmware Revison: 0x06
[2025-03-20 10:45:35] Current Vout=5.06V, Iout=1.07A
[2025-03-20 10:45:35] System starts up because scheduled startup is due.

 

Schedule log file after the restart:

--------------- 2025-03-20 10:43:50 ---------------
Skip scheduling next shutdown, which should be done externally.
Schedule next startup at:  2025-03-20 10:45:00
---------------------------------------------------
 
Posted : 20/03/2025 11:51 am
(@admin)
Posts: 567
Member Admin
 

Posted by: @jorge-silva

but it doesn't change the 'Schedule next startup'

It should not. The only purpose of setting GPIO-4 to output mode and output LOW, is to let daemon.sh to detect and log the shutdown event, so you get more information for troubleshooting the issue. For example, if you see in the log that the shutdown happened too late (after the scheduled startup time), then you know why it couldn't wake up your Raspberry Pi later.

However your latest log still doesn't show any message about the shutdown event (and I don't know why). It does show the startup was properly scheduled, and the startup took place on time.

 
Posted : 21/03/2025 7:46 am
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

@admin

Posted by: @admin

It should not.

How it is suppose to start after the second shutdown if the 'Schedule next startup' is not set again

 

Is there any more information i can provide so you can help me?

 
Posted : 24/03/2025 3:43 pm
(@admin)
Posts: 567
Member Admin
 

@jorge-silva 

The "WAIT" syntax skips the scheduling of next shutdown, but not the next startup.

Your log shows the next startup was properly scheduled.

If it didn't happen, you may want to check if Witty Pi was actually powered when the scheduled startup time was due.

Another possibility is that you shut down your Pi AFTER the scheduled startup time, which makes the startup not going to happen. That's why I suggested you to control GPIO-4 for shutdown, so that you can check whether it was the case.

 

 

 
Posted : 24/03/2025 4:29 pm
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

@admin

Posted by: @admin

If it didn't happen, you may want to check if Witty Pi was actually powered when the scheduled startup time was due.

Its always connected to the power.

 

Posted by: @admin

Another possibility is that you shut down your Pi AFTER the scheduled startup time, which makes the startup not going to happen.

The shutdown command was sent before the startup schedule time.

 

Is it possible that the Witty Pi 4 is not working correctly? Sometimes when i click the button to start, on witty, it doesn't start, but when i press it on the raspberry it starts. 

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

Posted by: @jorge-silva

Its always connected to the power.

What power source are you using?

Posted by: @jorge-silva

i press it on the raspberry

I don't understand. Which button did you press?

 

 
Posted : 25/03/2025 8:36 am
(@jorge-silva)
Posts: 7
Active Member
Topic starter
 

Posted by: @admin

What power source are you using?

Im using the power supply that came with the raspberry pi.

 

Posted by: @admin

I don't understand. Which button did you press?

The one signed in the photo below. 

1742903427-20250325_091559_comp.jpg
This post was modified 1 day ago 2 times by jorge.silva
 
Posted : 25/03/2025 12:48 pm
(@admin)
Posts: 567
Member Admin
 

Posted by: @jorge-silva

The one signed in the photo below. 

That seems to be the official IO board for Raspberry Pi Compute Module 5. Although I think it may work, Witty Pi 4 is not designed for that and we have not tested Witty Pi 4 with that board.

Witty Pi boots Raspberry Pi by powering it. If Raspberry Pi's own button has a default OFF state and it would not be bypassed when powering via GPIO header, then it wouldn't boot until you tap that button.

 

 

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