pwnagotchi plugin for pisugar 3 UPS.
-
Enable i2c by running
sudo raspi-config
select option 3 and enable i2c. You can skip this if you have already enabled I2c to setup a RTC. -
use scp to copy the plugin to
/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default
.
scp pisugar3.py pi@10.0.0.2:/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/default/pisugar3.py
- Enable the plugin in
/etc/pwnagotchi/config.toml
by adding the following line.
main.plugins.pisugar3.enabled = true
- Set the percentage that should trigger a power off.
main.plugins.pisugar3.shutdown = 5
- Display battery percentage as read from register 0x2a
- Add provisions for callibrating the value from 0x2a
- Display battery voltage from 0x22 and 0x23
- Display charging status. 6th bit from 0x02
- Safe shutdown using soft switch or powerswitch.
- Pisugar RTC??
https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/plugins/default/ups_lite.py https://github.com/kellertk/pwnagotchi-plugin-pisugar2/blob/main/pisugar2.py https://github.com/PiSugar/PiSugar/wiki/PiSugar-3-Series#%EF%B8%8F-full-functions-ups https://www.tindie.com/stores/pisugar/