MichaluxPL / Sofar_LSW3

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

Potential bug #44

Closed AlesMacoun closed 1 year ago

AlesMacoun commented 2 years ago

Hi @MichaluxPL, first of all, thank you for your script, good job! :-)

I'm trying your script on friends Sofar HYD 3000 and I find out a potential bug on line 138: pos_ini=str(hex(pini)[2:4].zfill(4))

I used config value 0x0200 and this line translate it to 0020, which I think is wrong. Unfortunately I'm not python specialist, so I can't fix it, but If hardcore value 0200 to request, it is working.....

Thank you Ales

MichaluxPL commented 2 years ago

If it was a bug, than it wouldn't work correctly :) If it doesn't work for Your inverter - you can try slightly different approach from InverterHWData.py.