Git Product home page Git Product logo

Comments (13)

nickfox-taterli avatar nickfox-taterli commented on August 22, 2024 1

When you switch from normal mode to OTA mode, please remember to remove the power and battery and reinstall it.

from upsplus.

yoyojacky avatar yoyojacky commented on August 22, 2024 1

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.

from upsplus.

frtz13 avatar frtz13 commented on August 22, 2024

did you activate loading of the i2c kernel module in raspi-config ?
once done, check communication with Full-featured-demo-code.py script

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

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

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

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:~ $ 

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

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

from upsplus.

nickfox-taterli avatar nickfox-taterli commented on August 22, 2024

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.

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

I'm running it in raspberry pi 4

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

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

from upsplus.

hellresistor avatar hellresistor commented on August 22, 2024

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]

from upsplus.

hellresistor avatar hellresistor commented on August 22, 2024

@yoyojacky @nickfox-taterli
Work to me finnaly!
It was a problem/defect on UPS power button. I was not entering on OTA moda.
🥇

from upsplus.

nickfox-taterli avatar nickfox-taterli commented on August 22, 2024

@yoyojacky @nickfox-taterli
Work to me finnaly!
It was a problem/defect on UPS power button. I was not entering on OTA moda.
🥇

from upsplus.

Zbrooklyn avatar Zbrooklyn commented on August 22, 2024

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 taskbar

does anyone have an answer for this post?

from upsplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.