Encoding of messages from ShineWifi
patcher-ms opened this issue · comments
Hello, I managed to decode the content of the packets emitted by ShineWifi, at least for my interpreter. Maybe that can help reducing the amount of manual mapping.
Let’s start with the messages. There are two messages emitted periodically. One for input registers and another for holding registers.
Grott already deals with encryption and checksums so let’s skip that and dive into the content of the plaintext.
Each plaintext has a 67 bytes headers and several blocks of register values.
The header contains:
- 30 bytes for the data logger ID
- 30 bytes for the inverter ID
- 6 bytes for the date (Grott already decodes it so I’m not going to describe it here)
- 1 byte containing a number. I think it’s the number of 124 register blocks present in the message
Each register block contains:
- 2 bytes representing first address of the block
- 2 bytes representing the last address of the block
- 2*124 bytes representing the values
- 2 final terminal (I think) bytes
With this information we know exactly which bytes correspond to which register and we can interpret them with a lookup in this document https://github.com/johanmeijer/grott/blob/Beta-(2.8.x)/documentatie/Growatt-Inverter-Modbus-RTU-Protocol-II-V1-24-English-new.pdf
I’m not sure this is new information but I haven’t seen any documentation on how the mappings are generated and many questions about the mapping so hopefully it’s useful.
Am I missing something. This is what Grott is doing.