I installed a Pipower3 on my Raspberry Pi 4B today. Nice kit - took me only 15 mins to install and works like a charm.
Then I installed the pipower3 software module according to the instructions provided on your website:
git clone GitHub - sunfounder/pipower3: PiPower 3
cd pipower3
sudo python3 install.py
Installation of the software was OK and the Raspberry rebooted.
But it doesn’t work.
- entering “pipower3-service -a” results in “command not found”
- entering “pipower3 -a” results in
Traceback (most recent call last):
File “/opt/pipower3/venv/bin/pipower3-service”, line 8, in
sys.exit(main())
^^^^^^
File “/opt/pipower3/venv/lib/python3.11/site-packages/pipower3/init.py”, line 7, in main
spc = SPC()
^^^^^
File “/opt/pipower3/venv/lib/python3.11/site-packages/spc/spc.py”, line 72, in init
raise IOError(f"SPC init error: I2C device not found")
OSError: SPC init error: I2C device not found
More info: “sudo systemctl status pipower3” gives
× pipower3.service - pipower3 service
Loaded: loaded (/etc/systemd/system/pipower3.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2025-01-31 17:06:11 CET; 2h 10min ago
Duration: 258ms
Process: 2150 ExecStart=/usr/local/bin/pipower3 start --background (code=exited, status=0/SUCCESS)
Main PID: 2152 (code=exited, status=1/FAILURE)
CPU: 209ms
jan 31 17:06:11 raspberrypi systemd[1]: Starting pipower3.service - pipower3 service…
jan 31 17:06:11 raspberrypi pipower3[2150]: running at background
jan 31 17:06:11 raspberrypi systemd[1]: Started pipower3.service - pipower3 service.
jan 31 17:06:11 raspberrypi systemd[1]: pipower3.service: Main process exited, code=exited, status=1/FAILURE
jan 31 17:06:11 raspberrypi systemd[1]: pipower3.service: Failed with result ‘exit-code’.
Also tried the following without success:
pi@raspberrypi:~/pipower3 $ source /opt/pipower3/venv/bin/activate
(venv) pi@raspberrypi:~/pipower3 $ pip3 install git+http://github.com/sunfounder/spc.git
Defaulting to user installation because normal site-packages is not writeable
…
ERROR: Will not install to the user site because it will lack sys.path precedence to spc in /opt/pipower3/venv/lib/python3.11/site-packages
How to get it working ?
From your error message, it seems that the Raspberry Pi is not detecting the i2c address of pipower3, you can use the command
i2cdetect -y 1
You can use the command i2cdetect -y 1 to check if the i2c address is read, the i2c address of pipower3 is 0x5B.
Please observe the power light on the pipower PCB to see if it shows normal. Also it would be good to provide us some photos of the PCB in use so we can confirm the situation.
I’m on a Raspberry Pi 4B, Bookworm.
All pipower lights are normal - battery fully charged.
I ran the command you suggested, this is the result:
pi@raspberrypi:~ $ i2cdetect -y 1
Error: Could not open file /dev/i2c-1' or
/dev/i2c/1’: No such file or directory
I found the solution: I had to switch on I2C in raspi-config.
raspi-config > interface options > I2C > enable
and then of course I had to restart the service: systemctl restart pipower3.
I suggest you add this to the installation instructions.
Now I get
pi@raspberrypi:~ $ pipower3 -a
Input voltage: 5140 mV
Output voltage: 5088 mV
Battery voltage: 8196 mV
Battery percentage: 97 %
Power source: 0 - External
Input plugged in: True
Charging: False
Internal data:
Shutdown request: 0 - None
Board id: 3
Default on: 1
Shutdown percentage: 10 %
Glad you solved the problem. Normally the raspberry pi will automatically recognize the pipower3 ID eeprom, and turn on i2c automatically, we will continue to test to reproduce the problem.
Maybe my configuration information can help you when trying to reproduce:
- Raspberry Pi 4B 2G
- Debian GNU/Linux 12 (bookworm)
- SSD connected to USB 3 port
- no SD card installed
- Aeotec Z-stick Gen5 in USB port
- Mele remote control via dongle in USB port
- Ethernet via cable
- installed software: Domoticz (home automation), Zwave-js-ui and Mosquitto MQTT. Nothing else. But I don’t think that’s relevant in this context as none of these software have anything to do with I2C
- the raspberry never had a hat installed before , the Pipower3 is the first and only one
- I2C setting had never been tampered with before (I didn’t even know this setting existed)
- I strictly followed the Pipower3 installation instructions, both hardware and Pïpower3 software
! 'm very satisfied with the Pipower3 as it works very well and it ensures continuity for my home automation system.
Maybe one last question: have you any idea about the lifetime of the batteries ? How many years will they last (roughly) ? You mention that it’s a custom made battery pack, but you don’t seem to sell them separately for a Pipower3.
Thanks for your support !
Thanks for the feedback, the pipower3’s battery pack is good for about 1000 charge cycles.