Solution: Reading Solax SK-SU5000(E) inverters & SDM630V2 Modbus Power Meters

Many thanks for the support. I need the writing registers for the following setting and, if necessary, the factors for the conversion:

maximum battery charge in A
maximum battery discharge in A
minimal battery capacity

The background is that they want to program an intelligent battery management, which the SK-SU does not have. The control by means of 3-phase counter carlo cavazzi works so far quite well. Unfortunately I have the problem that I have to adjust the charge of the battery to the time of day in order to load the yield of the PV system> 70% into the battery.

Many many thanks.

@archinaut220379 You should be able to achieve the control you want using the SolaxBatteryManager module of my script. The sample config file has an example from my system which does exactly this, it has different minimum battery levels for different time periods, and allows you to control whether to charge from the grid during that period. I use it to charge by batteries on nighttime off-peak power if they have been drained below 30% to get me through the morning peak period.

I’m using the SDM630V2 meter rather than the Gavazzi, as it’s a lot cheaper, but I don’t think it’s worth the effort of replacing your meter. Instead, since both are well documented, I think the best course of action would be to add an input driver for the Gavazzi meter to my script, then move the Gavazzi meter from the inverter to the computer running the script. To create the driver, copy PowerScraper/SDM630ModbusV2.py at master · InfernoEmbedded/PowerScraper · GitHub to Gavazzi-#meter model#.py, then update the modbus interactions to suit. Please send me a Github pull request when done so others can make use of this too.

I also have a meterless 3 phase solution, but it involves having a Solax inverter on each phase, which doesn’t sound like your setup.

Hello,
I already understood your program. But I have a Carlo Cavazzi electricity meter that communicates perfectly with the Solax via modbus RS485 rtu and the self-consumption mode works well. I do not want to change these systems and operate the Solax in the remote control mode. Rather, I would just like to adjust the value for the battery charge accordingly, so that the charge is low in the morning hours and is at noon at maximum to use the surpluses> 70% for the battery charge. This has the advantage for me that the internal backup systems such as minimum battery charge continue to function fully.
Would it be possible to send me the write register number for setting the maximum charge of the battery.
I assume that the factor is 100, because you can read this value from the read registers without problems. All registers with the value 100 are certainly write registers and I do not want to try these all out.
Also I would not run this system like you as a python program, but realize this with the perl program “fhem”. My request at the German as well as Dutch support was very sobering, as they sometimes did not even know that the devices modbus TCP capable.
Thanks in advance.

regards
Matthias

mail: archinaut220379atgooglemail.com

I would recommend not going down that path, as those settings are persisted, and changing them many times will use up the wear cycles on the flash/eeprom much faster.

Note that even when in remote control mode, the inveter still honours the battery current and charge level limits, as well as restricting the charge current when the battery is near fully charged. The inveter will not exceed these, even if commanded to.

I suspect that if the gavazzi meter is connected to a single inveter, then the grid values reported should also be taken from there.

If thats the case, then running the scraper with the meter as a data source should work.

Have you tried running the script as a monitor with no battery control yet? Feed-in power should show you the sum of your grid draw from all phases if its working the way I suggested above.

But if I wanted to read the variables in modbus inverter should I find the list of variables?
And what door do you work on?
Thank you

@enricomax1 I’m not quite sure what you’re asking, but the Modbus driver takes data from the ethernet port of the inverter and exports them inputs to EmonCMS. The list of variables is in the source: PowerScraper/SolaxModbus.py at master · InfernoEmbedded/PowerScraper · GitHub

Hey Great work on this Alastair, For my setup i would like to have a night rate and a day rate for battery charging current. So 50amps during the day on solar and 20amps at night during cheap power periods. This means changing the charging current twice a day by using a modbus write and the life of the eprom worry’s me. Its a real pain there is no current setting split eg one for charging by AC or and one for Solar.
I dont see away around this but let me know if i am wrong, it seams any thing i need to change would be a modbus write function. The way around this would be if we were able to write to the running variables rather than the fixed eprom ones, this would mean unlimited changes without affecting the eprom but would be lost after complete power loss but even thats a easy fix to check and rewrite on the off chance that happened.
Let me know your thoughts :slight_smile:

I’m handling the problem in a different way, by setting the minimum charge value in each period, if grid charging is enabled for that period, the system will charge at (up to) the maximum charge rate until that level is reached, and then stop.

I use this to ensure that if my batteries are fully discharged during the evening peak period, I have enough in them (charged at overnight offpeak) to get me through the morning peak period.

Note that I am setting the target amount of energy to be stored, not the charge current. Is there a particular reason why you want different charge currents at night?

For those of you who are using the battery control feature, I noticed a problem recently and just published a fix which will improve your PV generation when the battery is full.

There is also a fix which renames the confusing ‘Feedin Power’ and ‘Grid Power’ to ‘Measured Power’ & ‘Inverter Power’.

The problem described is a result of the built in power management in the inverter reserving the requested amount of power for the battery, whether the battery is charging or not. The fix is to set the battery power to 0 once charged, which frees additional power for the inverter to feed to the grid.

Thanks a lot Alastair! I am getting Solax X3-HYBRID-10.0T soon. Do you expect the Scraper being compatible with that one as well? If not, may I ask who/where at Solax you did ask for the list of Modbus registers? Best regards, Ian

@jpr I expect the registers will be the same :slight_smile:

Hello Alastair, the battery control script is writing to inverter registries. Couldn’t there be an issue with wear flash/eeprom cycles? At least the battery minimum charge registry seems to me to be configuration kind of registry and therefore persistent type one.

I dont write to minimum charge, thats handled in software.

I likely did not understand correctly to something. The script SolaxBatteryControl.py does have 3 calls client.write_register(), that I understood are writing to Solax Modbus registers. That was source of my question. Whether those registers, written by the script, couldn’t wear off eventually in case that they are configuration, flash/eeprom types. So the script does not call those functions daily? I thought that the minimum charge manipulation is used for regular daily control.

The modbus registers are not necessarily backed by real hardware registers. The registers that I write to (written every poll_period, I use 0.5secs is my setup) are the external control registers that tell the battery charge/discharge unit how much power to draw/provide. They are explicitly marked for external control.

I don’t touch the limits at all. The limits in my script are implemented by clamping the charge/discharge power to 0 when those limits are met.

I see! the “explicitly marked for external control” is the answer. Thanks for clarification. Now if I only can get the modbus manual for my inverter. I had asked the official Solax support and only got “official” Solax answer, exact citation: “we onlu open it to the big ditributer who really need it. I am sorry we don’t provide it to end user.” :frowning: Don’t you have any better contact who I could try to ask for Modbus register list? I am of course ready to sign their NDA if needed. Best, Ian

My local Solax engineer was quite helpful (you won’t get anywhere with the Chinese staff), and provided the read-only register set. He’s left now though.

You might be able to get write register set on signing an NDA, that would be up to the engineer to discuss. I didn’t go down this path.

Came across this thread while trying to solve a problem I have. I have a controller system and when it switches my cars on to charge during cheap rate (at night) the Solax tries to feed it and uses up all my battery stores so that there is nothing left for the morning. What I want to do is tell my Solax not to discharge the battery when I turn on the cars to charge and then afterwards switch it back to doing it’s normal thing. I figured that if I send the setchargerpower (write to 0x51) 0 then it will not discharge the battery. How would I switch it back to doing it’s own thing once I’m done? Is there a magic value, or does the inverter need to be in a specific work mode for this to work? Any advice much appreciated.

Hi folks. I’m new to OEM and am looking to get data from my SolaX X1-hybrid G3 into emoncms. Eventually I plan to get a RPI to run this on, but for now, can I run this script on my Mac using python? Inverter is connected both wired and Wi-fi but I have the latest firmware where the api is locked down. Port 502 still open though. I’ve no idea where to start though. Help would be most appreciated. Thanks!