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

Wildcard schedule

2 Posts
2 Users
1 Likes
21 Views
(@arjenr)
Posts: 31
Eminent Member Customer
Topic starter
 

My WittyPi Li3V7 UPS is in use on a Raspberry PI running PiHole DNS server and Unbound etc.

The WittyPi is set to shutdown the Pi immediately when AC power fails (see point 7. below).

It has happened that - also according to the wittypi log - the Pi has shut down supposedly because low voltage,

but no ultimate cause was found for this.

I set out to make sure the Pi always will get started up before long. Originally it was set to restart at 2.30 every night through crontab.

Obviously, if the Pi has shut down because of a 'power failure', it would never start up again by virtue of crontab, and there's nobody to operate the button.

From the WittyPi documentation I found a mechanism which looked like it might help to keep this DNS server running, viz. wild cards. My impression is that just the one wildcard schedule for starting the Pi up could solve the occasional shutdown, but I may be wrong.

However, whatever wildcard I try, an error is always the result. See below: 

>>> Current temperature: 42.625°C / 108.725°F
>>> Your system time is: 2025-04-03 16:27:15 CEST
>>> Your RTC time is:    2025-04-03 16:27:16 CEST
>>> Vout=5.20V, Iout=0.43A
Now you can:
  1. Write system time to RTC
  2. Write RTC time to system
  3. Synchronize with network time
  4. Schedule next shutdown
  5. Schedule next startup
  6. Choose schedule script
  7. Set low voltage threshold  [4.2V]
  8. Auto-On when USB 5V is connected  [Yes]
  9. Set over temperature action
 10. Set below temperature action
 11. View/change other settings...
 12. Reset data...
 13. Exit
What do you want to do? (1~13) 5
  Auto startup time is currently set to "00 00:00:00"
  When do you want your Raspberry Pi to auto startup? (dd HH:MM:SS) ?? 01:00:00    
  Sorry I don't recognize your input :-(

I chose 5 and tried several formats right from the documentation. The result is always: 'Sorry I don't recognize your input'.

Am I doing something wrong here?

 

I think I solved the daily restart task with the script below, but I would still like to know why the wildcard doesn't work for me:

pi@PiHole3:~ $ cat wittypi/schedules/shutdown_and_restart.wpi
# Turn off Raspberry Pi for 2 minutes every day

BEGIN	2022-06-01 02:30:00
END	2035-07-31 23:59:59
ON	H23 M58	# keep ON state for 23 hours and 58 minutes
OFF	M2	# keep OFF state for 2 minutes
pi@PiHole3:~ $ 

The idea is that the Pi shuts down two minutes before 2.30 and then starts up again at 2.30 (crontab entry has been removed, of course).

In the unfortunate case that the Pi has shut down by a supposedly 'low voltage', the WittyPi HAT should nevertheless start it up again at 2.30 at the latest.

I hope for comments about wildcard use especially and about the schedule I made instead.

 
Posted : 03/04/2025 10:11 pm
(@admin)
Posts: 577
Member Admin
 

Please read page 32 in the user manual.

The ?? wildcard is not supported by Witty Pi 4 L3V7 (or other Witty Pi 4 models).

 
Posted : 04/04/2025 12:04 pm
ArjenR reacted
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.