paolosabatino / saj-mqtt

Python library and code to read and write registers via MQTT to SAJ H1 and similar power inverters
GNU General Public License v3.0
6 stars 2 forks source link

Documentation of registers #2

Closed h3llrais3r closed 12 months ago

h3llrais3r commented 12 months ago

Hi Paolo, can you provide the documentation you used for parsing the registers? I'm checking the parsed data and see some weird results, so I'm wondering if I have the same modbus documentation as you. I also see a few times in my documentation that the register is a uint16 (struct H) while in the parsedata.py, it unpacks it as int16 (struct h).

Example: image

So according to my documentation it should be like this (second line) but then the numbers seems to be totally incorrect: image

with your format: Grid data: Voltage: 228.1V Current: -1.440A Frequency: 49.98Hz DC current: -372ma Active power: -79W Apparent power: 328W Power factor: -0.2

with the format according to my documentation: Grid data: Voltage: 228.1V Current: 653.920A Frequency: 49.98Hz DC current: -372ma Active power: 65457W Apparent power: 328W Power factor: -0.2

paolosabatino commented 12 months ago

Simply enough, the documentation of some registers is just wrong. There are several int/uint mismatches, but also registers that are documented in the PDF have no correspondence with real data or some registers exposed by the inverter are not documented in the PDF - for example, the readings for the external Smart Meter.

Most of them, though, are correct and useful.

h3llrais3r commented 12 months ago

Thanks for the info, so I suppose you are also using the document 4_5868569929443185242.pdf which dates from 2020? (Document Number: J-RD-SW-G-1503001)

paolosabatino commented 12 months ago

Yes,it is from 5 sep. 2020

h3llrais3r commented 12 months ago

Ok, thx, then we have the same documentation.