wallento / sungrow-websocket

Python Library to acees the websocket interface of Sungrow inverters
MIT License
7 stars 3 forks source link

different data items for SunGrow SG15RT and SG5.0RT #2

Open pohly opened 1 year ago

pohly commented 1 year ago

Somehow the SunGrow SG15RT reports "Active Power = ID active_power" whereas the SG5.0RT reports "Total Active Power = ID total_active_power".

Both of them got installed today as new devices. I don't know where to check, but I'd expect the firmware in the inverter and communication module to be the same.

One difference is that the SG15RT has two strings attached, the SG5.0RT only one. If that's the difference, then it's counter-intuitive that the inverter with one string reports "total active power" (i.e. a sum).

The values seem comparable, but it's odd and will make processing of the data more complex (not much, but still...).

What I was really hoping to find where different values for the two strings that are attached to the SG15RT because I want to figure out which part of the roof (West and East) are producing how much energy, but that doesn't seem to be available?

The web interface has voltage and current per string. Is that what I am looking for? I suppose so, but I am not sure (no electrical engineer...).

pohly commented 1 year ago

Is there some documentation available for the API that this library is using?

wallento commented 1 year ago

Hi,

I found the naming scheme pretty inconsistent. Unfortunately there is no real documentation, I just used the web frontend and found that it communicates with the inverter via this websocket. I could there find all the items being requested and map them. I use string voltage and string current and calculate the power by multiplying, but it's not perfect.

pohly commented 1 year ago

After some more research I found https://github.com/bohdan-s/SunGather which does something similar. It's documentation has some links to manuals.

Thanks for sharing how you use the data. It confirms my own thoughts on how to track strings.

But I'll probably use SunGather, so feel free to close this issue.

damolp commented 1 year ago

SunGather uses ModBus (TCP 502) while this uses the WebSocket that runs the WiNet web interface (TCP 8082).

The ModBus registers are "consistent" in that the register is (almost) guaranteed to not change across firmware/hardware versions as it's a "Public API", however the WebSocket is only used by WiNet and should be considered a "Private API".

The WebSocket API does seem to be faster for communicating with secondary devices connected over RS485, which for my usage is a bonus.

pohly commented 1 year ago

FWIW, SunGather can also use the WiNet web interface - that's all that seems to work in my case.