jbuehl / solaredge

SolarEdge inverter logging data capture
GNU General Public License v3.0
288 stars 60 forks source link

Maybe want to help dissecting the 0x3c2 message #183

Open eriksl opened 12 months ago

eriksl commented 12 months ago

Hi,

As I am getting the 0x3c2 messages very frequently I am trying to get some sense out of it. Maybe it's useful. Maybe you'd like to help a bit here?

This is what I already found out:

The bytes 12-15 are interesting because they have zero inside whenever there is no solar yield (checked with historical data fetched using tcp modus). So I'd say they are something related to yield. I cannot, however, find a factor that makes the value into either a power or a current value that would be related to that moment. So I already checked if they might be two 16 bits values actually, but then the values really don't make sense at all, the first two bytes are all over the place, which would be typical for LSB's. The field makes more sense as a 32 bit value, in my opinion.

It's interesting that if the value is not zero, the last byte (MSB) is always 0x40 or greater. I suspect the first few bits may be flags. I am now trying while masking various high bits.

Do you know any other interesting things I might try?

Also, where did you get the list of commands from (e.g. PROT_CMD_SERVER_POST_DATA = 0x500). Maybe there is more from where that come from, in the meantime?

Regarding the issues I reported earlier, yes I do see that I am frequently missing some received bytes, making the messages corrupt. I have been using various ways of interfacing, so I am starting to think it's either a hardware issue on the inverter's side, but a bit unlikely, as I tried both RS485 interfaces, or maybe even a firmware bug? Manually adding pull up resistors did not help (and the built-in ones, using the DIP switches) are very hard to reach and operate, I'd rather not touch them.

I am on the track that the error recovery might work like TCP, where absence of an ack, after a timeout, results in a retransmission. Problem is the timeout is way too long. So I'ld like to try what happens if I send an (additional) ack about the previous sequence, when I receive a corrupt packet, maybe that will, like TCP, trigger an immediate re-send of the data.

Thanks! Erik.