While reading through this in an attempt to write something similar myself (thanks, this is quite helpful!) I've noticed this line:
https://github.com/jmccrohan/pysolarmanv5/blob/main/pysolarmanv5/pysolarmanv5.py#L101
To me this seems to be a request/response code, actually it seems to be 2 fields:
Setting the first one to a random number (or a counter), will cause the inverter to reply with the same number being set in the same field of response. This is useful to match a response to a request we've sent.
The second field seems to be a counter which counts up for every packet the inverter sends through the network. My assumption currently is that it's used for de-duplication. While the inverter doesn't seem to care what's in there, I suspect it may be good practice to set this to some unique value for every packet.
While reading through this in an attempt to write something similar myself (thanks, this is quite helpful!) I've noticed this line:
https://github.com/jmccrohan/pysolarmanv5/blob/main/pysolarmanv5/pysolarmanv5.py#L101
To me this seems to be a request/response code, actually it seems to be 2 fields:
Setting the first one to a random number (or a counter), will cause the inverter to reply with the same number being set in the same field of response. This is useful to match a response to a request we've sent.
The second field seems to be a counter which counts up for every packet the inverter sends through the network. My assumption currently is that it's used for de-duplication. While the inverter doesn't seem to care what's in there, I suspect it may be good practice to set this to some unique value for every packet.