Hello, I am using a WittyPi 4 mini with a RaspberryPi zero1.1 W. I have multiple units actually. I received a unit back from the field. I repaired some cracked solder joints on an SD card attached board. Now when I test the device, I am confused. I apply 12V to a DC-DC converter which is connected to the P2 on the WittyPi board. Everything boots fine, my RaspberryPi program runs fine. The signal to shut the system down is received and the WittyPi shuts the system down. The WittyPi schedule says the system should be off for 15minutes. Once the system is shut down, the WittyPi white led blinks at the expected 4 second cycle. Here is the unexpected part. The WittyPi red led follows the white at a say a .05 second delay. The visual result is that the white and red led look like a wave. The system does not ever wake back up? I would really appreciate any hints on this condition.
It seems you have turned on the dummy load, which will power your Pi for very short moment and it does so when the white LED blinks. This behavior is defined in the firmware and can be configured in the software. You may search "dummy load" in the user manual for more details. You don't need to turn on the dummy load unless you are using a power bank to power Witty Pi, also the dummy load is just a trick and there is no guarentee that it will work with all power banks.
If your Pi didn't wake up at expected time, first check if Witty Pi's power source is still present (5V on P2). In your case most probably it is because you mentioned the LED is blinking.
Incorectly configuring the low-voltage threshold may prevent Witty Pi from booting your Raspberry Pi, this logic is defined in the canTriggerAlarm() function in firmware. If you configure the low-voltage threshold to a (too) high value, the firmware will incorrectly think the current input voltage is too low and shutdown the device and also refuse to turn on the device. If you don't feed battery voltage to VIN in P2 header, you should not configure low-voltage threshold because it will not work in such case. Low-voltage threshold can be set/unset via software, you may search "Set low voltage threshold" in the user manual.
Thanks uuGear. the wave blinking was exactly as you suggested. I've fixed that.
I still struggle with getting the WittyPi to wake up. I have cleared any low or high voltage thresholds, and cleared the temp related thresholds as well. I could not get the Witty Pi to wake up. Next, I created a much more simple program to see if code had anything to cause an issue. Although, I do have two units working fine in the field with this hardware set up and this code.
Next, I wondered if the WittyPi board itself had a hardware issue. I put a new WittyPi board in the system, and still will not wake up.
Here my schedule:
# Raspberry Pi on for 3 minutes, off for 1 minutes
BEGIN 2000-06-01 00:00:00
END 2035-07-31 23:59:59
ON M3 WAIT # ON state for 3 minutes
OFF M12 # OFF state for 1 minutes
The wait state waits for my Raspberry Pi to send a signal to shutdown. This works by the way. Only the reawaken does not work.
Boy would I love hints here.
Please check the wittyPi.log file, and see if the system time has been properly synchronized with the RTC, and if the startup has been collectly scheduled. If for some reason the schedule wasn't followed, you may find some clues in the log too. You may paste the log here for checking as well.
After Raspberry Pi has been shutdown, please check if its power has been fully cut by Witty Pi. Its red LED should go off. It the power is not cut, there is no way Witty Pi can wake up your Pi in the future.
Also please confirm if the power supply is consistantly connected and present.
I’m having a similar issue. My program records video for 5 minutes, then shutdowns the Pi. Once shutdown the witty pi cuts power and 10 minutes later starts up the pi again (like it’s supposed to) but only does that one time. Looking through the wittyPi.log it looks like the RTC time and system time aren’t synchronized and that might be preventing the proper execution of the next startup? It says that it scheduled it, but it really doesn’t seem like it did.
Incorrect time synchronization is one of the most common reasons to cause scheduling problems. This is why we removed the automatic time sychronization from the software since Witty Pi 4, and only suggest users to synchronize the time manually.
Check the scheduled time in the log and compare it with the timestamps after, if your Pi's system got changed afterward, there is a big chance the schedule would not be executed (because system time already exceeded the scheduled time).
I’m having a similar issue. My program records video for 5 minutes, then shutdowns the Pi. Once shutdown the witty pi cuts power and 10 minutes later starts up the pi again (like it’s supposed to) but only does that one time. Looking through the wittyPi.log it looks like the RTC time and system time aren’t synchronized and that might be preventing the proper execution of the next startup? It says that it scheduled it, but it really doesn’t seem like it did.
Thanks so much for the reply! Is there an easy way to programatically synchronise the time before calling runScript.sh to schedule the next startup? I tried sourcing the utilities.sh script from within my application but get several errors (particularly when trying to call the utility function rtc_to_system)