I've been trying to integrate my own application with WittyPi4 and tested out the scheduled shutdown/startup for the first time today. The shutdown executed correctly and when I expected but the programmed start-up didn't happen when I had expected. And now my WittyPi4 is now in a non-recoverable state! Here's what I see:
- The WittyPi4 heartbeat LED is working fine as you would normally see
- Pressing the power button results in power coming on very briefly to the RPi5 board and then immediately off again
- Removing the WittyPi4 power source and powering the Rpi5 directly from USB 5V, the pi boots up just fine. However, the I2C reads mostly fail when accessing the WittyPi4 i.e., it looks like the temperate sensor is reading back fine but everything else appears to be failing I2C reads
Any ideas what is going on or how to troubleshoot further?
Ok a bit of a torturous process but I managed to reflash the WittyPi4 board using my RPi5 as an emulator (note: you need to recompile avrdude linuxgpio to use gpiochip4 if you want to do this since the pin mappings changed from RPi4). It is now powering my board once more. I'll try to work out which part of my usage of the WittyPi4 caused this problem in the first place.
Setting the shutdown delay to zero appears to be the root cause of why the Witty4Pi subsequently cuts power too early when powering on. I've removed this setting (so now using default delay) and I no longer see the problem after a programmed shutdown. I think it might be worth warning users of unintended consequences of setting this delay too short, since it appears to have a dual purpose in how the system operates.