Closed Zbrooklyn closed 3 years ago
did you activate loading of the i2c kernel module in raspi-config ? once done, check communication with Full-featured-demo-code.py script
do you mean try method 2?
Method 2 Open a terminal and typing: i2cset -y 1 0x17 50 127 b Shutdown Raspberry Pi and remove all batteries and power supply. Insert batteries back into the battery slot. Execute OTA.py python script. UPS Pro Will be turned off after upgrading, Please unplug the power supply, remove the batteries from UPS Pro. Insert the batteries back to UPS Pro and then connect power supply and turn it on by press power switch.
did you activate loading of the i2c kernel module in raspi-config ? once done, check communication with Full-featured-demo-code.py script
also when i run the first step
i also get this error
FAIL] UPS Plus Installation is Incomplete! ... failed!
[info] Please visit wiki for more information:.
pi@raspberrypi:~ $ curl -Lso- https://git.io/JLygb | bash
[info] Welcome to 52Pi Technology UPS Plus auto-install Program!.
[info] More information please visit here:.
[info] -----------------------------------------------------.
[info] https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136.
[info] -----------------------------------------------------.
[info] Start the configuration environment check....
[ ok ] Network status is ok....
[info] Start the software check....
[ ok ] git has been installed..
[ ok ] pi-ina219 library has been installed.
[ ok ] smbus2 library has been installed.
[info] create /home/pi/bin directory....
[info] Create python3 script in location: /home/pi/bin/upsPlus.py Successful.
[ ok ] Create UPS Plus IoT customer service python script successful.
[info] Create crontab list for pi user..
* * * * * /usr/bin/python3 /home/pi/bin/upsPlus.py
* * * * * /usr/bin/python3 /home/pi/bin/upsPlus_iot.py
[info] crontab has been created successful!.
Traceback (most recent call last):
File "/home/pi/bin/upsPlus.py", line 21, in <module>
ina = INA219(0.00725, address=0x40)
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 116, in __init__
self._i2c = I2C.get_i2c_device(address=address, busnum=busnum)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_GPIO/I2C.py", line 64, in get_i2c_device
return Device(address, busnum, i2c_interface, **kwargs)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_GPIO/I2C.py", line 97, in __init__
self._bus = Adafruit_PureIO.smbus.SMBus(busnum)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 125, in __init__
self.open(bus)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 150, in open
self._device = open("/dev/i2c-{0}".format(bus), "r+b", buffering=0)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-1'
[FAIL] UPS Plus Installation is Incomplete! ... failed!
[info] Please visit wiki for more information:.
[info] -----------------------------------------------------.
[info] https://wiki.52pi.com/index.php/UPS_Plus_SKU:_EP-0136.
[info] -----------------------------------------------------.
pi@raspberrypi:~ $
did you activate loading of the i2c kernel module in raspi-config ? once done, check communication with Full-featured-demo-code.py script
i this in config dtparam=i2c_arm=on
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on
If you are on an older version of Raspberry Pi, such as Raspberry Pi Model B, you may need to change the script to I2C0, otherwise reboot and try again.
I'm running it in raspberry pi 4
thank you @nickfox-taterli and @frtz13 for your help finally after i uncommented the i2c i got it working
i think in the wiki it should say that it is required as step 1
although i do have 2 questions
1) is there a way to safely power down the raspberry pi using the button, right now it justs cuts the power when i push the button
2) raspian os has a built in battery monitor is there a way to show the battery level in the task bar
try OTA firmware.. I am getting this issue , very similiar. :|
pi@raspberrypi:~ $ cd ~
pi@raspberrypi:~ $ git clone https://github.com/geeekpi/upsplus.git
/upsplus $ python3 OTA_firmware_upgrade.py
Traceback (most recent call last):
File "OTA_firmware_upgrade.py", line 22, in <module>
aReceiveBuf.append(bus.read_byte_data(DEVICE_ADDR, i))
File "/home/pi/.local/lib/python3.7/site-packages/smbus2/smbus2.py", line 433, in read_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
OSError: [Errno 121] Remote I/O error
my /boot/config.txt file
dtoverlay=i2c-rtc,ds1307,addr=0x68
dtparam=i2c_arm=on
[pi4]
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
[all]
When you switch from normal mode to OTA mode, please remember to remove the power and battery and reinstall it.
try OTA firmware.. I am getting this issue , very similiar. :|
pi@raspberrypi:~ $ cd ~ pi@raspberrypi:~ $ git clone https://github.com/geeekpi/upsplus.git /upsplus $ python3 OTA_firmware_upgrade.py Traceback (most recent call last): File "OTA_firmware_upgrade.py", line 22, in <module> aReceiveBuf.append(bus.read_byte_data(DEVICE_ADDR, i)) File "/home/pi/.local/lib/python3.7/site-packages/smbus2/smbus2.py", line 433, in read_byte_data ioctl(self.fd, I2C_SMBUS, msg) OSError: [Errno 121] Remote I/O error
my /boot/config.txt file
dtoverlay=i2c-rtc,ds1307,addr=0x68 dtparam=i2c_arm=on [pi4] dtoverlay=vc4-fkms-v3d max_framebuffers=2 [all]
did you assemble it as wiki's instructions ? and please try to execute this command : i2cdetect -y 1 and paste the results here.
@yoyojacky @nickfox-taterli Work to me finnaly! It was a problem/defect on UPS power button. I was not entering on OTA moda. 🥇
@yoyojacky @nickfox-taterli Work to me finnaly! It was a problem/defect on UPS power button. I was not entering on OTA moda. 🥇
thank you @nickfox-taterli and @frtz13 for your help finally after I uncommented the i2c I got it working
I think in the wiki it should say that it is required as step 1
although I do have 2 questions
- is there a way to safely power down the raspberry pi using the button, right now it justs cuts the power when I push the button
- raspian os has a built-in battery monitor is there a way to show the battery level in the taskbar
does anyone have an answer for this post?
when i run these instructions this is my response