This plugin DOES require using the official pisugar-power-manager-rs install.
# Go to the home directory
cd ~
# Install PiSugar Power Manager
curl http://cdn.pisugar.com/release/pisugar-power-manager.sh | sudo bash
cd ~/
git clone https://github.com/PiSugar/pisugar2py.git
make sure to change /!CHANGE ME!/ to your pwnagotchi's python version see below for values
Jayofelony 64bit use /python3.11/
other is most likely /python3.9/
or /python3.7/
to find your version run ls /usr/local/lib/ | grep python
you should see `pythonX.X, use the highest value's of X if you get more than 1
cd ~/
sudo cp -r ~/pisugar2py/ /usr/local/lib/!CHANGE ME!/dist-packages/pisugar2
cd ~/
wget https://raw.githubusercontent.com/rai68/pwnagotchi-pisugar2-plugin/master/pisugar2.py
sudo cp ~/pisugar2.py /usr/local/share/pwnagotchi/custom-plugins/pisugar2.py
In /etc/pwnagotchi/config.toml add:
main.plugins.pisugar2.enabled = true
main.plugins.pisugar2.shutdown = 5
main.plugins.pisugar2.sync_rtc_on_boot = true
PiSugar2 web settings are accessible at http://10.0.0.2:8421/#/
The support library exposes all of the available commands from the pi-sugar in a python library for developers