HI,
I was thinking of using your scheduler. But, I am concerned that my customer will make a mistake with it and then cannot do anythign about it until the scheduler 'kicks' in to affect further changes. Is there a GPIO I can pull down to 'awake' the Rpi and bypass ths scehduler at all?
There is no built-in funtionality that does what you mentioned, however you can always implemt it by yourself. The software is written in BASH, and modification on it should be rather simple.
Maybe a better way is to write your own script/program, which monitors a GPIO and renames the "schedule.wpi" file if that GPIO is pulled down. You can put the full path of your script/program in this beforeScript.sh file, so it gets executed on boot before running the schedule script. Renaming the "schedule.wpi" file will effectly disable the schedule script.
@admin Hi, sorry never got notification of a reply. Thanks for the suggestion. Looks/sounds promising 🙂
@admin If the scheduler is active and has put my Rpi on standbye then any program I have running to monitor a GPIO (to delete that file) cannot be running. Were you thinking of the scemario of when the scheduler wakes up my Rpi and THEN it looks at whether the GPIO is pulled down? If so that would not solve my UserCase. I think that is what you mean but just wanted to make sure
@andrew-simpson17 I guess I misunderstood your question. I thought you want to disable the schedule script if the the script was badly written and it prevents your Raspberry Pi from normal boot on (by immediately shutting it down). In that case the user can pull down a GPIO while booting up the Pi and the program you prepared can rename the schedule script and disable it.
Back to your question:
Is there a GPIO I can pull down to 'awake' the Rpi and bypass ths scehduler at all?
Yes. GPIO-4 (BCM naming) is the GPIO that does exactly the same. It is also the GPIO that directly connects to the switch onboard, as well as the "SW" pin in unpopulated header P3. Momentally short it to GND will have the same effect like tapping the button, which turns on your Pi.
Now that you said it I feel stupid. I do this in my code already to simulate a shutdown.
So sorry for taking up with your time with this. But thank you
@admin Hi. Just been testing this. Is there any scenario when the RPi is off/standby, the power bank is connected (and active) and the lipo battery is connected that when you press your power/toggle switch the white light comes on briefly but the Rpi does not start up?
@andrew-simpson17 sounds like the MCU gets reset when the button is pressed. There is a topic for that behavior on Witty Pi 3 Mini and Witty Pi 4 Mini. But I don't think Witty Pi 4 L3V7 has this issue.
@admin Hmm, so should not happen with L3V7 then? But it looks like it is?
@andrew-simpson17 the symptom is similar, but the reason may be different.
If your power source can not deliver required peak current, the MCU may also get reset.
Thanks but the power source is fine and monitored