Hypfer / deye-microinverter-cloud-free

Documentation and tooling to use Deye microinverters without the solarman cloud
106 stars 14 forks source link

Hints for protocol decoding #2

Closed abrain closed 10 months ago

abrain commented 11 months ago

Hi, thanks for publishing the dummy cloud! I also worked on deciphering the protocol over the past weeks and we basically found the same things. I might have some additions, I'd need to check in detail.

Until now, I only had access to packets from the SUN300G3 and I see you are using the 600 model. There should be a value specifying the number of usable/used MPPT paths, but I see several bytes with the value 0x01.

The relevant payload bytes are: 15, 131, 132, 228, 252 Is one of them constantly 0x02 for you?

Hypfer commented 11 months ago

I'm not entirely sure which bytes you mean, but you can use the kaitai struct at ide.kaitai.io to compare different payloads in an interactive dissection.

In the attached zip, you will find a data message from a sun600 data_msg_sun600.zip

abrain commented 10 months ago

Awesome, thanks! I was able to identify the byte in question:

numberOfMpptPaths: payload.readInt8(131)

Maybe these are useful to you as well:

dailyYield: payload.readUInt32LE(33) / 100,
totalYield: payload.readUInt32LE(37) / 10,
startupSelfCheckingTime: payload.readUInt16BE(243),
previousUpdate: new Date(
    payload.readUInt8(245) + 2000,
    payload.readUInt8(246) + 1,
    payload.readUInt8(247),
    payload.readUInt8(248),
    payload.readUInt8(249),
    payload.readUInt8(250)
)