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

[Solved / Archived] Using WAIT in ON phase

2 Posts
2 Users
0 Likes
435 Views
(@pablocapillalasheras)
Posts: 1
New Member
Topic starter
 

Hi,

I have recently bought a Witty Pi 4 Mini to use with a Raspberry Pi Zero 2W.

The Witty seems to work well and after a bit of trial and error, I got to understand simple and more complex schedules well.

I got the Pi to behave as expected in a number of different schedules. I am very interested in using the WAIT option for the ON phase; however, I can't get the Witty to reboot my Pi as expected in this situation. I was wondering if anyone could help me find what I am missing. An example of my schedule file could be:

BEGIN 2023-11-23 23:10:00
END 2035-07-31 23:59:59
ON M5 WAIT
OFF M10

On boot, I got the Pi to run an script (via a systemctl service). This script calls a python3 script that takes a number of short videos, when finished, a bash script uploads the videos to dropbox and, finally, the Pi is shutdown (so thus this script internally shuts down my Pi and hence the 'WAIT' in the ON phase of the schedule). I have checked that the next startup time is scheduled as expected by the Witty. However, when this time comes, the Pi does not start. I noted that the flashing white light stays on a tiny bit longer at the time of the expected start up, but the Pi doesn't start. Booting the Pi manually after the initial expected startup time, I noted that the next scheduled startup time has moved forward as expected. If I don't use WAIT in the ON phase (and hence I don't shutdown the Pi using my script), the Witty works exactly as expected, shutting down and booting my Pi no problem.

I would really appreciate if anyone could help me understand how to use the 'WAIT' option and make it work.

Thank in advance for your time.
Pablo

 
Posted : 24/11/2023 1:05 am
(@admin)
Posts: 512
Member Admin
 

If you don't use WAIT and let the schedule script to shutdown your Pi, it actually will run "sudo shutdown -h now" command, which should not bring any difference than your own shutdown.

I have no clue why you observed different results for two cases.

 
Posted : 24/11/2023 9:18 am
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.