I'm seeing a set of similar failures for my new Witty pi 4 where functionality will work on a fresh boot and only one start up. Subsequent attempts to set shutdown, set startup, or use the latch button fails to work until the Witty is hard power cycled. Please see steps for three case below.
Kit:
- Witty pi 4, firmware ID 0x26, rev 0x05, Daemon v4.13
- Raspberry pi 4 B 1.1, running Raspberry OS (Debian GNU/Linux 12)
- Decent power supply, via Witty Pi 4 USB C
Latch Button Failure - Steps:
0. configure Default State ON (this issue occurs regardless of auto on or not)
1. Power Witty Pi 4 via USB C..Observe pi boots after Default ON Delay of 3 seconds.
2. Wait for Pi to settle then Press latch button.
3. Observe Pi shutdown. Observe white LED flashing
4. Press latch button, Observe Pi start up
5. Wait for Pi to settle then Press latch button.
6. Observe Pi does NOT shutdown.
7. Functionality continues to fail until the Witty pi 4 is power cycled by unplugging USB C cable.
Next Shutdown Failure - Steps:
0. configure Default State ON (this issue occurs regardless of auto on or not)
1. Power Witty Pi 4 via USB C..Observe pi boots after Default ON Delay of 3 seconds.
2. Wait for Pi to settle then use command line or web interface and set a shutdown time and wait
3. Observe Pi shutdown. Observe white LED flashing
4. Press latch button, Observe Pi start up
5. Wait for Pi to settle then use command line or web interface and set a shutdown time and wait
6. Observe Pi does NOT shutdown.
7. Functionality continues to fail until the Witty pi 4 is power cycled by unplugging USB C cable.
8. NOte: In this state, using 'sudo shutdown' via SSH shuts down the pi OK.
Next Startup Failure - Steps:
0. configure Default State ON (this issue occurs regardless of auto on or not)
1. Power Witty Pi 4 via USB C..Observe pi boots after Default ON Delay of 3 seconds.
2. Wait for Pi to settle then use command line or web interface to set a startup time
3. Press latch button. Observe Pi shutdown. Observe white LED flashing, wait.
4. Observe pi auto-start up at time
5. Wait for Pi to settle then use command line or web interface and set a startup time
6. Witty Button does not work at this point (per first fail case) so use 'sudo shutdown' to shutdown pi.
6. Observe Pi does NOT start up at time
7. Functionality continues to fail until the Witty pi 4 is power cycled by unplugging USB C cable.
Note:
- Witty log does not seem to log any of the shutdown or startup sets (via web interface).
- Logs also don't seem to record button press events (when not working, as cases above)
- When Default state is ON, powering the Witty from it's USB C gets recorded as a button press
- 'sudo shutdown' via ssh continues to work regardless of Witty not being able to schedule shutdowns
- In all cases, unplugging Witty USB C and replugging, allows functionality to work again, for one cycle as cases above
Log cat attached.
I experienced all of the problems you described on rev 4 of the firmware, but I was able to fix it by updating the rev 5. I'd double check that or consider reflashing it. Note, there is some RTC calibration data which is lost when you update, so it's best to save that
@3ricjohanson Interesting, thanks. Even though the daemon is v4.13? my Log's indicate rev 5 firmware'
[2023-12-27 12:14:06] Firmware ID: 0x26 [2023-12-27 12:14:06] Firmware Revison: 0x05
'
I still might attempt to reflash but I'm close to writing the shield off. My coin cell battery doesn't seem to want to stay in either - randomly physically ejecting hours or day after I've installed firmly but I'm more frustrated watching UUGear support replies come in for other support forum questions.
Thanks again for sharing!
According to the log you provided, the gpio-util.sh seems not working because I don't see the "Pending for incoming shutdown command..." message in the log.
In the wittyPi directory (which have the software installed), you can run:
sudo ./daemon.sh
And see what error messages come out, which will give the direction for troubleshooting.