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

Heya. @deece you mention a newer firmware. My portal reports Solax_SI_CH_2nd_20150211_DE01 and while I can connect to the inverter to set up WiFi etc I can’t get any response from the usual API routes. Most people I see having success are using a 2016 version on the firmware. Do you still have the update files?

I’m too new here to DM you sorry!

Hi Barry,

The Modbus interface is only accessible over the Ethernet port, not wifi.

Are you using the Ethernet port?

Ah right, I was trying to get the firmware to see if it assisted with the routes like /api/realTimeData which I see others using over WiFi.

I can at least telnet to 502 over the LAN cable which is a good sign, I’ll try and run your scarper now.

Progress!

{'name': '192.168.1.8', 'Requested Battery Power': 0, 'Grid Voltage': 241.0, 'Grid Current': 2.8, 'Inverter Power': 657, 'PV1 Voltage': 176.4, 'PV2 Voltage': 184.2, 'PV1 Current': 3.0, 'PV2 Current': 1.2, 'Grid Frequency': 50.1, 'Inner Temp': 38, 'Run Mode': 2, 'PV1 Power': 529, 'PV2 Power': 221, 'Battery Voltage': 0.0, 'Battery Current': 0.0, 'Battery Power': 0, 'Charger Board Temperature': 43, 'Charger Battery Temperature': 33, 'Charger Boost Temperature': 33, 'Battery Capacity': 0, 'Battery Energy Discharged': 0.0, 'BMS Warning': 0, 'Battery Energy Charged': 0.0, 'Battery State of Health': 30745, 'Inverter Fault': 0, 'Charger Fault': 0, 'Manager Fault': 0, 'Measured Power': 495, 'Feed In Energy': 0.0, 'Consumed Energy': 0.0, 'EPS Voltage': 0.0, 'EPS Current': 0.0, 'EPS VA': 0, 'EPS Frequency': 0.0, 'Energy Today': 3.7, 'Energy Total': 22486.4, 'Battery Temperature': 5.0, 'Solar Energy Total': 0.0, 'Power Budget': 495, 'Power Budget Average': 495.0, 'Usage': 162}
1 Like

@deece

Finally got around to installing. Just have a few questions.

Firstly, I have the script running on an emoncms PI and it is feeding the stats into emoncms so I know it’s communicating with both my inverters but that’s as far as I seem to be able to get it to do

Ultimately I want to control both inverter batteries so they charge and discharge at a similar rate so I can get the MAX 5000w from the combined batteries and not what they seem to do at the momemnt is have one charging from solar + the other battery seems to be discharging into the first battery

Each inverter will charge/discharge at 2500w

You mention some debug lines to see what the script is doing. Can you point me in the right direction please

Can you also advise what I should set the two inverters to in the config, I am on a single phase with both and getting the grid meter reading from the first inverter.

Do I set them both as “Phase 1” or should they be set as if they were separate phases?

Many thanks
Matthew

Is this thread dead. Really looking for some help with managing two batteries

Hi Matthew,

If you’re on a single phase installation, both inverters should be on Phase 1. This is only really relevant in 3 phase installs with single phase inverters.

To have the batteries act in unison, you want the following:

[Solax-BatteryControl]
source = "<inverter name>"
linked-batteries = true
timezone = "AEST-10"

@deece

Thanks for the reply, my config is as below. I have put in only what I have configured

I have two SK-SU5000E one with 14.4kww and the other with 10.5kww of batteries on a single-phase grid connection.

They are both reachable via DNS entry as “solax1” and “solax2” - Should I set them as the fqdn in the script or is it OK if the PI can just resolve the hostname to IP

[Solax-Modbus]
poll_period = 2
timeout = 5
power_budget_avg_samples = 30
installer_password = 2014
inverter_power = 4600
inverters = [‘solax1’,‘solax2’]

[Solax-BatteryControl]
source = “solax1”
linked-batteries = true

[Solax-BatteryControl.Inverter.solax1] # First inverter
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500

[Solax-BatteryControl.Inverter.solax2]
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500

If the host machine can resolve the bare hostnames, then you’re fine to use them in the config file.

Hi is anybody using this with hybrid x1 g4? Does it work as the g4 seems quite different to the previous versions.
They have removed the ethernet port so the only way to connect is WiFi which I think is read only. They have also stopped using a meter and use a CT clamp instead. There is a port they label as rs485 control but I can’t find any documentation for what it does.

@deece

Circling around to this again as I could not get it working, it was also winter so not much going on but grid charge/discharge here in the UK

Summertime and find my problem still needs resolving

I need to find my emonpi and setup again

TIA for future assistance

@deece

I am definitely behind the curve here, finally rebuilt my Home Assistant, Firewall, and EmonCMS onto a ProxMox host and got it all up and running

First with the latest Ubuntu LXC template I was getting the following error:

No module named ‘pymodbus.client.asynchronous’

The following solved it:

sudo pip3 install pymodbus==2.2.0rc4

I am able to ping both the hostname and fqdn of my inverters as setup in DNS from my EmonCMS VM but when running the script I get the following and just repeats:

root@ubuntu:/opt/PowerScraper# ./power_scraper.py 
Setting up EmonCMS
Setting up Solax-BatteryControl
Setting up Solax-Modbus
not connected
not connected
err [Failure instance: Traceback: <class 'KeyError'>: 'Total system power'
/usr/local/lib/python3.10/dist-packages/pymodbus/framer/socket_framer.py:181:_process
/usr/local/lib/python3.10/dist-packages/pymodbus/client/asynchronous/twisted/__init__.py:126:_handleResponse
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:696:callback
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:798:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:892:_runCallbacks
/opt/PowerScraper/Inputs/SolaxModbus.py:199:solaxRegisterCallback
/opt/PowerScraper/./power_scraper.py:61:outputActions
/opt/PowerScraper/Outputs/SolaxBatteryControl.py:102:send
/opt/PowerScraper/Outputs/SolaxBatteryControl.py:23:handleMeterPower

This is my current config:

[Solax-Modbus]
poll_period = 10
timeout = 5
power_budget_avg_samples = 30
installer_password = ****
inverters = ['solax1','solax2']

[Solax-BatteryControl]
source = "solax1"
linked-batteries = true
timezone = "AEDT-10" 

[Solax-BatteryControl.Inverter.solax1]
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500
max-power = 5000

[Solax-BatteryControl.Inverter.solax2]
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500
max-power = 5000

So I have two issues,
1 - Why can I not connect to the inverter
2 - What am I missing on the “Total system power”

Thanks in advance

Ok, Seems I am one step forward

the script is updating into EmonCMS and I can see that the battery power input/output is as it should be but no control as I still have one importing whilst the other is exporting

Still getting the following error

Looks like it is trying to set the second inverter to 0w but never changes and it stays exporting

solax2 to discharge at 0.0W
err [Failure instance: Traceback: <class 'KeyError'>: 'Total system power'
/usr/local/lib/python3.10/dist-packages/pymodbus/framer/socket_framer.py:181:_process
/usr/local/lib/python3.10/dist-packages/pymodbus/client/asynchronous/twisted/__init__.py:126:_handleResponse
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:696:callback
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:798:_startRunCallbacks
--- <exception caught here> ---
/usr/local/lib/python3.10/dist-packages/twisted/internet/defer.py:892:_runCallbacks
/opt/PowerScraper/Inputs/SolaxModbus.py:199:solaxRegisterCallback
/opt/PowerScraper/./power_scraper.py:61:outputActions
/opt/PowerScraper/Outputs/SolaxBatteryControl.py:102:send
/opt/PowerScraper/Outputs/SolaxBatteryControl.py:23:handleMeterPower
]

Can you share your config file? (After redacting passwords, etc)

[Solax-Modbus]
poll_period = 10 # seconds
timeout = 5 # seconds
power_budget_avg_samples = 30 # The maximum number of samples to average power budget over
installer_password = 1234 # The installer password for the inverter (same as used on the front panel), required if you want to use battery control
inverters = ['solax1', 'solax2']

[emoncms]
timeout = 5 # seconds
server = "http://emoncms"
api_key = "MY API KEY"

[Solax-BatteryControl]
source = "solax1" 
linked-batteries = true
timezone = "AEDT-10"

[Solax-BatteryControl.Inverter.solax1]
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500
max-power = 4600
#grace-capacity = 50
#grace-power-threshold = 3500 
#grace-charge-power = 500 

[Solax-BatteryControl.Inverter.solax2]
phase = 1
single-phase-charge-limit = 2500
single-phase-discharge-limit = 2500
max-charge = 2500
max-discharge = 2500
max-power = 4600
#grace-capacity = 70
#grace-power-threshold = 3500
#grace-charge-power = 500

# Define the time periods
# Suitable for ActewAGL Time of Use plans in Canberra, Australia
# Peak times are widened in case the time on the meter drifts

[Solax-BatteryControl.Period.MorningPeak]
start = "4:30:00"
end = "00:30:00" 
min-charge = 20 
grid-charge = false 
#force-discharge = 2500

[Solax-BatteryControl.Period.Offpeak]
start = "00:30:00"
end = "4:30:00"
min-charge = 70
grid-charge = true
#grace = false

Ultimately, I just want between the time of 04:30:00 and 00:30:00 to be able to stop the batteries from charging each other and balance themselves to either charge/discharge

The time period 00:30 - 04:30 is when my off peak/cheap rate and already force charge the batteries via Home Assistant and manage the charge capacity via an automation as I have two different size battery stacks

At all other times between 04:300 and 00:30 I just want to stop the two inverters from fighting with each other and the batteries from swapping charge from one to another and balance out

I only have on “source” setup under battery control and this is the inverter with the main CT clapm, should I put both in there? - will test so long

Well, That fixed the ‘Total system power’ error

Now to monitor

Batteries still fighting with each other

You should not use sudo with pip3. It can cause unexpected issues.

A post was split to a new topic: Solax Hybrid Gen 2 (SK-SU5000E) export control not working

Hi deece.

I am new here to learn how to get data from my Solax Su-5000 via modbus. This works, however, the connection is very unstable and I was thinking about a firmware update. Unfortunately I do not find a version to download.

Can you share Solax_SI_CH_2nd_20160912_DE02 with me?

Greetings from Germany,

Jan