I have a Pi Zero 2W with a WittyPi4Mini and a cellular modem powered by the Pi power supply plugged into the Witty Pi. It draws about 5.1V and ~0.5A. When scheduling a shutdown via the wittyPi.sh utility it just kills the power entirely and does not issue a graceful shutdown.
I have set the power cut delay to 25.0
I have added a line to beforeShutdown.sh '/usr/bin/touch shutdown_test', but this seems never to be called.
Below are the logs:
[2023-11-17 16:45:34] Seting shutdown time to "17 16:46:00"
[2023-11-17 16:45:34] Done 🙂
[xxxx-xx-xx xx:xx:xx] Witty Pi daemon (v4.13) is started.
[xxxx-xx-xx xx:xx:xx] Running on Raspberry Pi Zero 2 W Rev 1.0
[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...
[2023-11-17 16:46:43] Done 🙂
[2023-11-17 16:46:43] Firmware ID: 0x36
[2023-11-17 16:46:43] Firmware Revison: 0x03
[2023-11-17 16:46:43] Current Vout=4.77V, Iout=0.43A
[2023-11-17 16:46:43] System starts up because the button is clicked.
[2023-11-17 16:46:48] Send out the SYS_UP signal via GPIO-17 pin.
[2023-11-17 16:46:48] File "schedule.wpi" not found, skip running schedule script.
[2023-11-17 16:46:48] Pending for incoming shutdown command..
Any help would be greatly appreciated!
There was no further log records after 2023-11-17 16:45:34. That means the software did not recieve the shutdown signal (GPIO-4 gets pulled down) before the whole device lost power. It seems the power was not cut by Witty Pi 4 Mini.
Will your cellular modem pull down GPIO-4 by any chance?
Thanks for your support. After testing all the components individually, I switched the Pi out, and the problem disappeared. I assume I had a bad solder and/or loose pin. I appreciate your quick response.