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

[Solved / Archived] Witty Pi 4 L3V7 and pi zero w won't stay shut down

5 Posts
2 Users
0 Likes
396 Views
(@coloradorob)
Posts: 3
Active Member
Topic starter
 

I'm trying to set up a pi + WittyPi4 for an environment where USB power can be intermittent. If the power is out for a short time, the WittyPi4 can keep it running until power is restored, but I don't want to go until the battery drops voltage. If power is out for 30 minutes, I'd like to shutdown until USB power is restored.

 

I scripted a simple service to monitor POWER_MODE (using the get_power_mode function from utilities.sh file) - after 10 minutes of non-zero POWER_MODE, the service runs

sudo shutdown -h now

 

I do have the WittyPi set with "Auto-On when USB 5V is connected  [Yes]"

 

Thing is, when I disconnect USB power and wait for 10 minutes for the shutdown command to run, the WittyPi4 turns off the red LED for a moment, then blinks the white LED (once) and restarts the pi from the battery power.

How do I get the pi to stay down until USB power is restored?

 

 

 
Posted : 27/11/2023 2:00 am
Topic Tags
(@admin)
Posts: 425
Member Admin
 

Have you previously set the temperature related action? It is better to show the current configuration of your Witty Pi 4 L3V7.

 
Posted : 27/11/2023 8:12 am
(@coloradorob)
Posts: 3
Active Member
Topic starter
 

@admin I have not set the Temperature actions, or any other config - "Auto-On when USB 5V is connected" is the only one I checked, and the default action was the behavior I wanted. Similarly, the beforeScript.sh, afterStartup.sh and beforeShutdown.sh scripts are all the default comment blocks.

I have snipped the "switch <-> GPIO 4" trace, after finding that my GPS HAT (Adafruit Ultimate GPS HAT) conflicted with that pin.

 

 
Posted : 27/11/2023 2:18 pm
(@admin)
Posts: 425
Member Admin
 

Those BASH scripts will not affect anything because your Pi was in shutdown mode and those scripts were not executed. Only the firmware has the ability to wake up your Pi.

After it boots, you can actualy check the startup reason in the wittyPi.log file. It will say "System starts up because ......".

 
Posted : 27/11/2023 3:45 pm
(@coloradorob)
Posts: 3
Active Member
Topic starter
 

@admin Thanks - I don't know why I didn't think to look in the log file.

I think I might have seen this "won't stay off" behavior while the GPIO 4 trace was still in place, so the wittyPi might have been seeing phantom button presses from the GPS board.

 

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