Power On Event? #701
-
I was wondering if there is an |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 11 replies
-
Not directly. |
Beta Was this translation helpful? Give feedback.
-
Just execute a job at boot (e.g. using a cron @reboot job) which checks if external power exists and if so sends you an email |
Beta Was this translation helpful? Give feedback.
-
I do not see the problem. If the 'no power' event is not triggered (and the Pi is running) there must be external power |
Beta Was this translation helpful? Give feedback.
-
Yes, this clarified it. I missed the 'not shutting down' when the 'no power' event occurs. |
Beta Was this translation helpful? Give feedback.
-
@lcnittl Attached the modified pijuice_sys.py and a modified pijuice_cli.py (to manipulate the added 'power back' setting) To test:
Notes: the 'power back' option only works when 'no power' is enabled. Pleae test and let me go how it goes. If no major problems i will commit it to the main branch so it will appear in the next version. |
Beta Was this translation helpful? Give feedback.
-
Apologies for the delay. Had it ready to commit, but then other stuff happened and it got on the back burner. |
Beta Was this translation helpful? Give feedback.
-
Absolutely no problem :-D Thanks for the commit!
…On Fri, 28 May 2021 at 13:25, Ton van Overbeek ***@***.***> wrote:
Apologies for the delay. Had it ready to commit, but then other stuff
happened and it got on the back burner.
Anyway, committed to the master branch now.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#701 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQQGFYU2WJKCUNFR2ECTYTTP54Q5ANCNFSM42XUVDBQ>
.
|
Beta Was this translation helpful? Give feedback.
@lcnittl Attached the modified pijuice_sys.py and a modified pijuice_cli.py (to manipulate the added 'power back' setting)
pijuice_cli.py.txt
pijuice_sys.py.txt
Remove the .txt extension (was needed because github does not allow uploading .py files)
To test:
sudo systemctl stop pijuice
sudo chown pijuice:pijuice /usr/bin/pijuice_sys.py
sudo systemctl start pijuice
and check withsystemctl status pijuice
sudo -u pijuice python3 <path to modified>pijuice_cli.py
toenable …