Skip to content

taiyonemo/pwnagotchi-plugin-pisugar3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

pwnagotchi-plugin-pisugar3

pwnagotchi plugin for pisugar 3 UPS.

Installation

  1. 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.

  2. 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
  1. Enable the plugin in /etc/pwnagotchi/config.toml by adding the following line.
main.plugins.pisugar3.enabled = true
  1. Set the percentage that should trigger a power off.
main.plugins.pisugar3.shutdown = 5

TODO

  • 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??

Referaces

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/

About

pwnagotchi plugin for pisugar 3 UPS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages