Inverter power (charge/decharge) controller: grottman.py (Do not use it, just for discussion!) #654
Replies: 7 comments 10 replies
-
|
Hi there, looks awesome! I'm not used to this inverter, but looks it's full hybrid, right? So it is capable of injecting into grid? What you do if I got it right is like "batt charge priority" mode where the inverter should prioritize charging the batteries, but looks Growatt is not able to do it, right? I have the SPF5000 series, so It's not able to do and my meter just have the optical port. In Portugal, energy costs the grid pays is 1/3 to 1/4 of what they charge you and I'd need to spend some good money to have certification to be able to connect to grid, so no good incentive for me to do so. I have another issue and this is why i need so much of Grott. I have total power of 7Kw available from the grid. And the cheap energy price in my plan is from 22 to 8. So I have automation in Home Assistant that , by 9:30 PM it fetches solar production forecast from Solarcast ( which is awesome precise) , gets the current battery percentage and estimates what would be the target battery percentage at 8:00 am ( worst case scenario) to go thought the next day without consuming from the grid during the peak hours. Then asnwer could be three:
Second automation is more complex and goes with charging routines, as i have tons of appliances and a big house with ACs and an EV. So charging the batteries and not overcoming 7Kw power is tricky. I do it with the help of Node-red where i read MQTT values ( from Grott) to learn about total power consumption at the moment and adjust battery power charge - like you do... I have a PID component to get right on 7KW target. I could do it also the way you are doing, by reading on the multimeter or from a Pzem on the grid mains, but grott do it's job nicely and it is simpler. |
Beta Was this translation helpful? Give feedback.
-
|
This is interesting Johan, thanks for sharing. I'm intrigued to know how often your script changes register values on a typical day, and whether you have any concerns on the impact this may have on the life of the inverter storage (EEPROM, flash, whatever is used). I've been running some automations for a while (about 2yrs) on my SPH inverter that adjusts the battery charge rate according to solar output. In my case I want to maximise total "solar capture" and the AC output rating of my hybrid inverter is less than the maximum output from my panels. When PV output nears the maximum AC output, I open up the charge rate to the batteries to capture that extra power. It works well... but recently I began thinking about whether this system (which can make in excess of 200 changes per hour when solar output is highly variable due to clouds) could be prematurely ageing my inverter. I'd be interested to know if anyone knows what storage mechanism Growatt uses in the inverters. If these values were stored in RAM I'd have no concerns but if they're using EEPROM or other types of storage with a limited write life, our fancy automations could kill them off quite rapidly. |
Beta Was this translation helpful? Give feedback.
-
|
I did some research @ the internet and until we now the type of EEPROM used it might be nut a good idea to write to much to the Inverters EEPROM. According chatgpt it is plausible that the used registers are based in the EEPROM (not all registers are). Thanks to @TheBobsta for attending me. I will stop using Grottman and start using the Chint Smartmeter a soon as possible. |
Beta Was this translation helpful? Give feedback.
-
|
I tried 1,2 and 4. It does not make any difference. |
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately does not work either :( |
Beta Was this translation helpful? Give feedback.
-
|
Quick update (@TheBobsta here - I accidentally used the wrong account when commenting previously). I had some maintenance to perform on my SPH inverter at the weekend. To carry this out I disconnected it from AC, battery and PV. (i.e. a full power-down) After 15 mins of work I reconnected power and noticed that whilst the inverter maintained some settings (grid max/min, CT mode, battery type, etc.) as well as the clock, it LOST all the Work Mode data - schedules, charge/discharge rates, stop charge/discharge values. This leads me to think that the values we're changing with our automations may in fact be stored in RAM and not EEPROM. |
Beta Was this translation helpful? Give feedback.
-
|
A few months on, wondering how those who are using this on a regular basis are finding it? I'm tempted so would be great to hear how it's gone and any gotchyas. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the examples/controller directory (Alpha Branche) I added a new python script (grottman.py) that I use to control my inverter power.
Ultimately I do not want to deliver or retrieve any power from the grid, with this script I try to control this by changing the charge or decharge percentages.
I am using this script for my MIN 3600 TL-XH inverter with ARK HV batteries (at this moment 7,5 Kwh will be extended to 15 soon).
Be aware until yesterday I did not had a smartmeter connected to the inverter so I had to build something myself.
I have a CHINT DSSU666 now but not connect to the inverter yet.
In the Netherlands we have standard a Smart Meter from the provider at home. This smart meter has a so called P1 port that can be use to read actual power/energy values (This is really actual information a message is being send every 2-4 seconds, if values changes)
I connected an ESP32 to this connector that reads the smart values and create a MQTT message. Format of the message:
Next to it I use the Grott MQTT message for reading actual Inverter information.
The inverter is being controlled by setting to right registers. You need Grottserver fors this (mode = server for grott v3).
In grottman I use EactR (received power) - EactD (delivered power) as actual Power used/delivered. The goal is to make this value as close to 0 if possible.
At this moment my inverter is set to charge (mode 1) the batteries from 08:01 - 18:00 and discharge (mode 2) from 18:01 - 08:00.
I made this settings with Grott in proxy mode via the Growatt App (TOU settings). Be aware you have to define 3 time periods (08:01 - 18:00, 18:01-23:59 and 0:00 - 08:00).
I am thinking of automating this too, but that is for MVP2 (if I ever reach that).
Grottman looks at the power used and in charge mode it will calculate the Charge percentage (the part of the solar energy used for Charging the batteries). This percentage is based on the total power the inverter can deliver. In my case 3600/100 = 36 watt per percentage.
This value is controlled by register 3047 (for a min TL-XH). If we deliver power to the grid the percentage can be raised (Use more to charge the batteries) and if we need power the percentage will be lowered.
In the evening I want as much power from my batteries as possible but do not want to deliver power to the grid. This can be controlled by setting the decharge percentage (register 3036). Again 1 percent is 36 watt so by increasing 1 percentage the inverter / batteries will deliver an additional 36 watt.
I did some additional things to smooth the spikes (defined max steps) and set the initial percentages at startup and mode change.
Grottman also send out a MQTT message with information on his behavior.
Maybe you can use this also as a base for your own controlling script (and you do not have a Growtt/Chint/Eaton smart meter).
Reactions/Remarks are welcome!
Beta Was this translation helpful? Give feedback.
All reactions