Monitoring the solar inverter, part 2
Some time ago I was trying to monitor poll our 2000W “Growatt” inverter (model number 2000-S), and having mixed luck doing so. Ours does not seem to respond correctly to many of the messages most other software sends (at first I thought I was messing up the math for the shitty checksum they use, but it just doesn’t seem to work even using other people’s code directly).
What does work however is sending the “send me continuous updates” message, to an extent: as I mentioned last year, it seems to completely ignore the “delay” field and just send them as fast as it can… by my count it’s sending them at about 25Hz. I also do not know how to make it stop, other than power-cycling the inverter by toggling the AC disconnect.
Then when we started thinking about upgrading the PV system, I just assumed that they would not leave the old one in place, so I ceased worrying about it - we’d probably strip the old one off, and I’d give it to Dad, and it wouldn’t be my problem anymore. Unfortunately the most economical strategy meant leaving that in place until “phase 2” of the upgrade, and in the mean time after graphing the Fronius’ output, we’re left with a gaping hole where the stats from the Growatt inverter should be.
But anyway, I can work with this! After some mucking about ditching my NanoBSD install (because it lacked Python and I didn’t feel like figuring out how to get it on there right now) I managed to hack together some shitty Python code to make it work. I had some grief with the collectd module not being Python3 compatible (I fixed it locally, then when I went to create a pull request found that one already exists, but it doesn’t seem to be reflected in PyPI), and it took a non-zero number of minutes to figure out UDP ingress on the Kubernetes cluster my collectd container’s running in.
But it works! I can’t work out how to make it so that it only has 1-minute resolution, which annoys me… I may wind up changing the interval for the other inverter to 15 seconds so it’s a bit closer, but that means throwing away all data in the RRD and starting again, so we’ll see if it annoys me one day.
The code is dogshit, and it remains to be seen if it’ll start again automatically tomorrow… I think it will but who knows.
In case it’s useful for anyone else, I’ve uploaded it to GitHub: https://gist.github.com/fwaggle/3d18cb8b83d0f1a3a5c22d83408a2637
Update: 2022-03-14: Up fairly early this morning, before the inverter woke up, and was just starting to think it wasn’t going to work… but right as I remembered that the new inverter wakes up first due to the east-facing panels, it popped online and started tracking.
We had another absolutely terrible day for solar due to clouds, but we did still ping off the export limit quite a bit in the afternoon, and successfully avoided buying power for most of the day. I suspect winter will be worse still, but we’ll see!