Notifications
Clear all

Witty Pi 4: No Power On After Missed Alarm Without Power

3 Posts
2 Users
0 Reactions
13 Views
(@david-a-riggs)
Posts: 2
New Member Customer
Topic starter
 

I'm using a Witty Pi 4 with Raspberry Pi 3B. Debian Bookworm-based Raspberry Pi OS Lite 32-bit. I am not using the Witty Pi bash script software, but have ported the routines to Python for better integration with my custom application software. The system works well normally, waking up every 2 hours with ALARM1 to perform some work reading sensors and transmitting data, then shutting the system down with `shutdown -h now`. I am not using any of the low-voltage or temperature thresholds, and do not schedule a shutdown alarm. The system is powered by a 12V LiFePO3 battery via the header connector on the Witty Pi 4.

If the battery dies and some amount of time passes, so that ALARM1 was never run, then when I reconnect a new battery the Witty Pi 4 does not wake the RPi up. Power is reconnected, I see the ~5 second blink LED on the Witty Pi showing that it has power, but it does not wake the Raspberry Pi. 

My understanding from the user manual is that the Witty Pi should wake the RPi with reason 8 = "ALARM1 delayed", so that my software can schedule the next future ALARM1 time. But this isn't happening.

My Python code clears these flags at shutdown time before running `shutdown -h now`:

ctrl2 = _i2c_read(RTC_CTRL2)
ctrl2 = ctrl2 & 0xBF  # Clear bit 6 (alarm flag bit)
_i2c_write(RTC_CTRL2, ctrl2)
_i2c_write(CONF_FLAG_ALARM1, 0)
_i2c_write(CONF_FLAG_ALARM2, 0)

 

Is there something else I should be doing to manage statefulness to ensure that the Witty Pi wakes my RPi when power is reapplied, after power has been completely disconnected for a long period of time?

 
Posted : 11/05/2026 9:08 pm
(@admin)
Posts: 779
Member Admin
 

The "ALARM1 delayed" functionality is not designed for such scenario. When the MCU is not powered, the alarm1Delayed variable in the firmware will be cleared, and there is no way it can do anything when you power the device again.

What "ALARM1 delayed" functionality does, is to set a flag when the ALARM1 occurs during the shutdown process, so it can boot the Pi right after the shutdown gets finished. If ALARM1 occurs when the MCU is not powered, nothing happens.

 
Posted : 12/05/2026 7:35 am
(@david-a-riggs)
Posts: 2
New Member Customer
Topic starter
 

So what is the solution to this issue?

I see an undocumented memory location for "Default On" (default 0) and "Default On Delay" in seconds (default 0). Is this the only way to resolve this issue? Does this result in a specific startup reason code so my application can know that the wakeup wasn't a regularly scheduled wakeup?

 
Posted : 12/05/2026 3:15 pm
Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.