Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New order on aliexpr and had to modify the script #10

Open
ser opened this issue Jul 9, 2022 · 9 comments
Open

New order on aliexpr and had to modify the script #10

ser opened this issue Jul 9, 2022 · 9 comments

Comments

@ser
Copy link

ser commented Jul 9, 2022

Hi, I've just bought UPSlite v1.2 on aliexpress and I have a small issue when used with Zero2W:

# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                   

It's on 0x32 not on 0x36 anymore.

I also had to modify the script to read capacity:

def readCapacity(bus):
        "This function returns as a float the remaining capacity of the battery connected to the Raspi UPS Hat via the provided SMBus object"
        address = 0x32
        read = bus.read_word_data(address, 4)
        swapped = struct.unpack("<H", struct.pack(">H", read))[0]
        capacity = swapped/256-100
        return capacity
@linshuqin329
Copy link
Owner

Hello, I can post your UPS-Lite photos for me. I want to confirm whether you bought the fake UPS-Lite. Someone copied my product, and then sold on aliexpress

@maxromanovsky
Copy link

@linshuqin329 I had the same issue with the second UPS-Lite I bought. I bought it on Shopee, and it was definitely fake. Wires from the battery were thin, it had spelling mistakes. On/off switch was different... I sent it back and waiting for refund. And it had the same different I2C address.

IMG_1197

@linshuqin329
Copy link
Owner

@maxromanovsky yes, this UPS-Lite is fake, it is not my product

@maxromanovsky
Copy link

@linshuqin329 where can I buy your original product?

@linshuqin329
Copy link
Owner

@wjhrdy
Copy link

wjhrdy commented Oct 10, 2022

I fell for the same product here. I cant decode the 32 bytes on the i2c block from address 0x76.

from smbus2 import SMBus
with SMBus(1) as bus:
    print(bus.read_i2c_block_data(0x76, 0, 32))

> [255, 255, 120, 160, 0, 0, 0, 0, 0, 2, 255, 255, 151, 0, 255, 255, 255, 255, 255, 255, 0, 105, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255]

Time to get a real one.

@linshuqin329
Copy link
Owner

@wjhrdy I need to see the UPS-Lite physical photo on your hand. From the pictures of Amazon, I cannot judge whether your UPS-Lite is my product

@wjhrdy
Copy link

wjhrdy commented Oct 11, 2022

Imagepipe_0

@linshuqin329
Copy link
Owner

@wjhrdy I confirmed that this is a fake UPS-Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants