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

Hi folks,

I have published a scraper which can read both the Wifi & TCP/Modbus interfaces of the Solax inverters, As well as the Modbus RTU interface of the Eastron SDM630V2 3 phase energy meters, and publish them to EmonCMS.

Contributions are welcome, source is here: GitHub - InfernoEmbedded/PowerScraper: A scraper for power devices to feed data to OpenEnergyMonitor

The next feature in the implementation pipeline is to pretend to be a Carlo Gavazzi EM24 meter back to the inverters, to allow inverters on one phase to compensate for loads on another.

1 Like

Hi deece,

This is a FWIW type of thing. When I saw the term “scraper” I immediately thought of:
Scraper gets data out of web pages
as denoted in the results of a Google search for the term scraper.

Maybe something like data extractor, or data collector would be a better choice?

Point taken, it did start off scraping the JSON provided on the Wifi interface of the inverters, but progressed beyond that pretty quickly once I got access to the ethernet interface of the machines.

Hi Alastair

I have the same solax unit working with modbus via node-red flow and posting to EmonCMS. I have been trying for a few months to write to the Solax unit via modbos. have you tried this at all?

Paul

I’ve asked the engineers for access to the docs for writing the registers, but they will only provide them under NDA, and by voiding the warranty on my inverters.

Instead, I’m looking at tricking the inverters into charging/discharging at will by masquerading as the Gavazzi energy meter that can be used instead of the current transformer.

I have a solution pushed that allows for control of the battery charging & discharging.

Here are the features that I’ve designed for:

  • Arbitrary number of time periods
  • Allows solar energy to be diverted from inverters with full batteries to inverters with charge capacity available
  • Allows heavy loads to be fed by inverters on different phases
  • time period dependent minimum battery capacities

Hello,

can you help me.I need the modbus TCP Write Register numbers for the Solax-SK-SU E to change the installation settings. Thank you.

archinaut

NDA means Non-Disclosure Agreement - in other words, Solax had provided the information on the condition that it is not disclosed to anyone else. So Alastair is not allowed to tell you or anyone else what he’s been told.

Given most folks wouldn’t want to intentionally void a warranty on a high-cost item such as an inverter,
he may have decided a voided warranty wasn’t worth the info, in which case he never got the info.

If you tell me what you are trying to achieve, I may be able to add support to my script for you.

I’ve added some updates:

  1. It can use the inverters as the data source for power consumption
  2. An extra control has been added to decouple single phase/3phase power zeroing from the invert capacity being tapped out (eg. you can switch to 3 phase compensation when power on any 1 phase exceeds 1kW, to reduce the wear on the batteries)
  3. Batteries can be linked so when performing 3 phase zeroing, they all charge/discharge at the same rate. This avoids the problem where one battery is charging where another is discharging (with the resultant energy loss)

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?