-
I assumed it would signal when external power returns (AC power supply), but the script that I have assigned to it, never runs (it would simply write to a log file). My two PiJuice HATs (f/w 1.6 and software 1.8) are set to wake up when AC returns after an interruption, and they do wake up, so that is not why I ask about Power present. I just couldn't find information about it (the documentation lags quite a bit behind the state of the software). The assigned script is very simple as it only writes to a log. All other event scripts that I use, do the same and more, and they use the same way to do the writing. It runs fine in Thonny (as user pi). I mean to say there is not much reason to suspect the script code and whether it runs when PiJuice wants it to. Some of the other scripts are run regularly triggered by events. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
After disabling the No power event so the Pi isn't shut down within a minute or so by the assigned script, the Pi will continue to run on battery until the battery charge eventually falls below one of the thresholds set in the GUI. |
Beta Was this translation helpful? Give feedback.
After disabling the No power event so the Pi isn't shut down within a minute or so by the assigned script, the Pi will continue to run on battery until the battery charge eventually falls below one of the thresholds set in the GUI.
When restoring AC power before PiJuice decides battery power has dropped too much, the Power present event is indeed triggered as https://github.com/tvoverbeek mentioned here #960 (comment). It does take a little while before this happens.
The script I assigned to this event only writes a message to the log.
Doing something more useful based on this event is another thing ...