MichaluxPL / Sofar_LSW3

Get MODBUS data from Sofar (K-TLX) inverter through LSW-3 or LSE module
GNU General Public License v3.0
99 stars 47 forks source link

Incorrect range for register addreses evaluation? #58

Open NCmajk opened 5 months ago

NCmajk commented 5 months ago

How does it work for you with the lines 157 and 158 of InverterData.py?

These lines: pos_ini=str(hex(pini)[2:4].zfill(4)) pos_fin=str(hex(pfin-pini+1)[2:4].zfill(4))

with example configuration: register_start1=0x0484 register_end1=0x0487

For pos_ini this will give the result 0048 instead of 0484 which I get correctly when I set range [2:5] .