jbuehl / solaredge

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

Issue painfully slow data extraction using RS485 solved #187

Open eriksl opened 11 months ago

eriksl commented 11 months ago

Hi,

Just to let you know, as follow-up to my earlier issue submission, I have resolved the painfully slow data extraction over RS485. This may be an issue with my setup, with recent inverters and/or recent firmwares.

I am not sure what's the exact issue, but I noticed that semonitor frequently complains about payloads being larger than expected (data length field). I have made a simple implementation in C that uses a state machine for the input and at any time when a magic signature is recognised, it stops parsing the data and restarts from there. This results in an "aborted" packet once in a while, but no more "strange" packets. That's one.

Also, now when no data is coming after an ack, I repeat the ack until it does.

The "bus master grant" request appears to be not needed at all, so I left it out. It's never acknowledged anyway.

The data is now coming in in real-time and if there is any backlog, the records are coming at about 10 records per second (as opposed to one record every few minutes).

The interesting thing is that the RS485 interface appears to be using no encryption at all.

eriksl commented 11 months ago

https://github.com/eriksl/secollect.git if you're interested