diy solar

diy solar

Modbus Register Backflow Power for Solis Hybrid Inverter

marky0

New Member
Joined
Apr 24, 2022
Messages
36
Location
UK
I currently have the Solis RHI-6K-48ES-5G hybrid inverter which I am connecting remotely from a Raspberry PI via the Modbus.
I want to be able to automate the power exported to the grid, depending on the state of charge of my battery.
i.e. 0 export when battery State of Charge (SOC) is <90%, some positive export as the the battery becomes fully charged.

I had expected this to be the default operation of the inverter itself. If you have a battery why would you want to export to the grid when your battery is not fully charged !! But surprisingly this is not how the Solis inverter operates. If you set a positive export, "Backflow Power" as it is called in the solis menu, this export is maintained regardless of the battery SOC. o_O [ edit : @peufeu has shown in the thread below that this is actual incorrect. You can programme the inverter to only export when the battery SOC is 100% by enabling optimum income and disabling a discharge timeslot]

But I need the 40XXXX modbus holding register that writes the backflow power .
Found only one modbus map online that indicates that the input read register could be 306508, here

Before I do a complete read of all 40XXXX registers and try and reverse engineer it, does anyone have a map which specifies the backflow register number or achieved what I want to do remotely ?

Many Thanks to @peufeu who has given me the correct answer in this post. The answer is Modbus register 43074
 
Last edited:
I currently have the Solis RAI-6K-48ES-5G hybrid inverter which I am connecting remotely from a Raspberry PI via the Modbus.
I want to be able to automate the power exported to the gird, depending on the state of charge of my battery.
i.e. 0 export when battery State of Charge (SOC) is <90%, some positive export as the the battery becomes fully charged.

I had expected this to be the default operation of the inverter itself. If you have a battery why would you want to export to the grid when your battery is not fully charged !! But surprisingly this is not how the Solis inverter operates. If you set a positive export, "Backflow Power" as it is called in the solis menu, this export is maintained regardless of the battery SOC. o_O

But I need the 40XXXX modbus holding register that writes the backflow power.
Found only one modbus map online that indicates that the input read register could be 306508, here

Before I do a complete read of all 40XXXX registers and try and reverse engineer it, does anyone have a map which specifies the backflow register number or achieved what I want to do remotely ?
Very interested to see whether you succeed to control power export from your Solis inverter through Modbus.

Where is it you got the idea that would be possible?
 
Very interested to see whether you succeed to control power export from your Solis inverter through Modbus.

Where is it you got the idea that would be possible?
I already control my overnight charging current from the grid to the battery by writing to Modbus register 43141. This means I can set a battery SOC by the morning to whatever value I want to within about 1%. I am assuming there must be a modbus register for backflow power. So once I know it, the control is straightforward.
 
I already control my overnight charging current from the grid to the battery by writing to Modbus register 43141. This means I can set a battery SOC by the morning to whatever value I want to within about 1%. I am assuming there must be a modbus register for backflow power. So once I know it, the control is straightforward.
Does that mean, for example, if you wanted to absorb 1kW of AC-coupled solar export that otherwise would be getting exported to grid, you can achieve that dynamically by writing register 43141 whenever you want to?

My use case is to invert/export all DC-coupled solar power in the morning until the combination of AC-coupled + FC-coupled - load = Export Limit, at which point I want to start curtailing DC-coupled power to remain under my Export Limit through the peak hours of the day (meaning battery will be charging) and turn to again start cranking up DC-coupled power in the afternoon as solar power fades.

I know that the Schneider Conext XW Pro and Victron Multiplus II both support this capability through Modbus commands but was told by Solis US that their inverters can only be read through Modbus and cannot be remotely controlled.

Your above statement already pretty much proves what they told me is untrue (whether because they were not telling the truth or were uninformed by the Ginlong) so I’m very interested to understand how you got the idea of controlling your Solis inverter through Modbus and the capability you are discovering.

Your RAI-6K-48ES-5G uses a 48V battery and puts out 230VAC - are you using it with the Solis Autotransformer to deliver 240/120V Split Phase?

I’m considering that option as well as the new High-Voltage split-phase storage inverter Solis just announced: https://www.ginlong.com/energy_storage_inverters8/3,8_11,4k_s6_h_us.html
 
Following this with interest. I'm setting up a Modbus connection to my RHI-3K-48ES-5G and would like to be able to poke the charge current and times and also to get am (almost) continuous feed of the export/import rate. I've almost got the hardware set up. I just need to write the software next.
 
Following this with interest. I'm setting up a Modbus connection to my RHI-3K-48ES-5G and would like to be able to poke the charge current and times and also to get am (almost) continuous feed of the export/import rate. I've almost got the hardware set up. I just need to write the software next.
Are you using your RHI-3K-48ES-5G in the US with an Autotransformer or in the EU / UK?

What hardware are you using to communicate with your Solis Inverter over RA485 / Modbus?

So like the OP, you are also trying to control / change charge power dynamically over Modbus as well as to monitor import and export rate from the inverter?

Are you using an external energy meter with your Solis Inverter?

The functions I would be interested to control are:

-Power export out through the AC input (export from the inverter).

-Going off grid and going back on grid (if the inverter does not provide control over internal transfer switches, this is easy enough to provide through an external contactor).

Does Solis or Ginlong provide any documentation regarding Modbus communication with their inverters or is it just that lone register map file that was once published and guys like you both poking around to see what registers you can read and write through Modbus?
 
Does that mean, for example, if you wanted to absorb 1kW of AC-coupled solar export that otherwise would be getting exported to grid, you can achieve that dynamically by writing register 43141 whenever you want to?
I don't quite understand what you want to do, but here is a video which describes how to control the solis inverter using modbus.
Register 43141 controls the charge current when you enable battery charging from the gird (no solar). This modbus map shows a large proportion of the available registers but does not seem 100% complete (doesn't include the topic of this thread, specifically backflow power). I am interested to know if there is anyone out there that has a full Modbus map that includes backflow power. In theory, anything that you can see or do at the front panel of the inverter should be controllable remotely through modbus.
 
Are you using your RHI-3K-48ES-5G in the US with an Autotransformer or in the EU / UK?
UK. My location should be a clue ;)
What hardware are you using to communicate with your Solis Inverter over RA485 / Modbus?
I'm using two Waveshare RS-485 to Ethernet adaptors. One is going on the inverter and one is going to connect to the wifi datalogger. That way the Solis cloud will still work as normal. Then I will be using a Raspberry Pi to connect to the Waveshare on the inverter over ethernet and access the registers.
So like the OP, you are also trying to control / change charge power dynamically over Modbus as well as to monitor import and export rate from the inverter?
Yes
Are you using an external energy meter with your Solis Inverter?
I've the standard setup with a Acrel meter and CT hooked up to the inverter.
The functions I would be interested to control are:

-Power export out through the AC input (export from the inverter).

-Going off grid and going back on grid (if the inverter does not provide control over internal transfer switches, this is easy enough to provide through an external contactor).

Does Solis or Ginlong provide any documentation regarding Modbus communication with their inverters or is it just that lone register map file that was once published and guys like you both poking around to see what registers you can read and write through Modbus?
No official documentation that I know of. Just the bits we've found and watching registers change and comparing to what we see on the inverter and cloud.
 
I don't quite understand what you want to do, but here is a video which describes how to control the solis inverter using modbus.
Fantastic, thanks. In terms of what I am interested in doing, the primary difference is that I want to modulate AC charge power from grid during the day while DC solar power is available. So the only question I have is whether increasing charge power to 10A more than can be delivered by DC-coupled solar power into the inverter alone will result in the additional 10A of charge current being taken from grid power (hence reducing any AC-coupled solar export by 10A).
Register 43141 controls the charge current when you enable battery charging from the gird (no solar).
Yes, I see that from the video and the functionality when DC-coupled solar power is 0W is clear. For my use, I need to understand whether increasing charge current beyond that being delivered by DC-coupled solar power into the MPPT alone results in the difference being drawn from grid (variable / controllable absorption of AC-coupled export power / current).
This modbus map shows a large proportion of the available registers but does not seem 100% complete (doesn't include the topic of this thread, specifically backflow power). I am interested to know if there is anyone out there that has a full Modbus map that includes backflow power.
Me too ;).
In theory, anything that you can see or do at the front panel of the inverter should be controllable remotely through modbus.
Solis USA told me the opposite (obviously incorrect, at least for charge current). Are you based in the USA or in the UK/EU?
 
UK. My location should be a clue ;)

I'm using two Waveshare RS-485 to Ethernet adaptors. One is going on the inverter and one is going to connect to the wifi datalogger. That way the Solis cloud will still work as normal.
Will these Solis Inverters function without being connected to Solis Cloud? I.E. internet down or traffic blocked by firewall (on purpose)?

What is the functionality you get through Solis Cloud that you find desirable?
Then I will be using a Raspberry Pi to connect to the Waveshare on the inverter over ethernet and access the registers.

Yes
So you are not interested in modifying export / power generation rate nor in co trolling when the inverter switched between its various pre-canned operating modes, right?
I've the standard setup with a Acrel meter and CT hooked up to the inverter.
Cool. Are you using that setup to control export limit or just for monitoring export to grid? Have you attempted to decide the communication from meter to inverter? I assume the inverter is the RS485 master and the meter the slave, correct?
No official documentation that I know of. Just the bits we've found and watching registers change and comparing to what we see on the inverter and cloud.
I’m a bit mystified why Solis would integrate remote control through Modbus but would not publicize nor document that fact. Perhaps they are concerned about support. But then why would they enable the capability at all?

Is there any additional official / documented use for the RS485 connection other than monitoring?
 
Will these Solis Inverters function without being connected to Solis Cloud? I.E. internet down or traffic blocked by firewall (on purpose)?
Yes. The Cloud is for monitoring (the data is logged at 5 minute intervals) and some remote configuration settings. Solis can also upload firmware updates to the inverter when requested.
What is the functionality you get through Solis Cloud that you find desirable?
It's just the handy display of the data. I hope to be able to run without that in time.
So you are not interested in modifying export / power generation rate nor in co trolling when the inverter switched between its various pre-canned operating modes, right?
Not at present.
Cool. Are you using that setup to control export limit or just for monitoring export to grid? Have you attempted to decide the communication from meter to inverter? I assume the inverter is the RS485 master and the meter the slave, correct?
I haven't looked at the meter at all. It's used by the inverter to balance the load and measure import/export.
I’m a bit mystified why Solis would integrate remote control through Modbus but would not publicize nor document that fact. Perhaps they are concerned about support. But then why would they enable the capability at all?

Is there any additional official / documented use for the RS485 connection other than monitoring?
I'm not sure.
 
Yes. The Cloud is for monitoring (the data is logged at 5 minute intervals) and some remote configuration settings. Solis can also upload firmware updates to the inverter when requested.
As long as the inverter can function standalone...

Did the inverter require provisioning by Solis over internet when first set up before it would function?
It's just the handy display of the data. I hope to be able to run without that in time.
Understand.
Not at present.

I haven't looked at the meter at all. It's used by the inverter to balance the load and measure import/export.
I'm not sure what you mean by 'balance the load'. My understanding is that the meter is there to limit the export to grid (including offsetting AC-input-side loads). So with export limited to 0kW/0A, the meter is used to assure the inverter pushes enough power out of its AC-input to offset loads on the AC-input without any power exporting to grid (perhaps that is what you meant by 'balancing loads' if balancing = offsetting :)).

But you can also set the inverter to export up to a limited amount of power/current, in which case the meter monitors export to grid and communicates export to the inverter to power generation can be throttled when it exceeds the limit.
I'm not sure.
At any rate, I'm excited to understand that the capability is there.
 
Did the inverter require provisioning by Solis over internet when first set up before it would function?
A very good question. I didn't do the install myself, but I believe it only needed local configuration as the datalogging stick that provides the internet connection is an optional extra.
I'm not sure what you mean by 'balance the load'. My understanding is that the meter is there to limit the export to grid (including offsetting AC-input-side loads). So with export limited to 0kW/0A, the meter is used to assure the inverter pushes enough power out of its AC-input to offset loads on the AC-input without any power exporting to grid (perhaps that is what you meant by 'balancing loads' if balancing = offsetting :)).

But you can also set the inverter to export up to a limited amount of power/current, in which case the meter monitors export to grid and communicates export to the inverter to power generation can be throttled when it exceeds the limit.
Yes, you're right. I meant that the inverter uses the meter to work out if there is export or import at any given moment and adjust its AC output and battery charge/discharge to try and bring that to zero - unless it has surplus solar and is set to allow export.
 
Are you sure about the inverter name?

RHI-6K-48ES-5G exists on Ginlong website
RAI-3K-48ES-5G exists on Ginlong website
RAI-6K-48ES-5G does not exist on Ginlong website

I have S5-EH1P-6K so I'll speak about this one.

I want to be able to automate the power exported to the gird, depending on the state of charge of my battery.
i.e. 0 export when battery State of Charge (SOC) is <90%, some positive export as the the battery becomes fully charged.

S5-EH1P-6K does this automatically but you need to set the options correctly.
If you set it to "Sell as much power to grid as possible" then it will do that, it will export even if the battery is not full.
If you set it to "Self-use" and "Optimal income" then it will give priority to house loads, then charging the battery, then export only if there is excess power.
It's probably the same with yours.

I had expected this to be the default operation of the inverter itself. If you have a battery why would you want to export to the grid when your battery is not fully charged !!
If you have a contract that allows you to sell power at an good price then you'd want to do that. Pretty rare, but the option exists.
The configuration menus are not very clear, not very understandable lol. But if you check the correct options it will do what you want.
I think you also have to set EMP to ON.
Read this https://diysolarforum.com/threads/solis-s5-various-issues.52383/

Before I do a complete read of all 40XXXX registers and try and reverse engineer it, does anyone have a map which specifies the backflow register number or achieved what I want to do remotely ?
-> https://github.com/peufeu2/GrugBus/tree/main/grugbus/devices
This is for S5-EH1P-6K inverter, but I heard many registers were the same.
 
Last edited:
Full configuration:
Backup OFF
Self-use ON
Time of use:
- Optimal Income ON
No charge/discharge time slots (everything zero)
Export Power Control ON
Safe Mode ON

Does that mean, for example, if you wanted to absorb 1kW of AC-coupled solar export that otherwise would be getting exported to grid, you can achieve that dynamically by writing register 43141 whenever you want to?
This is for S5-EH1P-6K, no idea what RAI does, but it's worth trying:

I have one Solis S5-EH1P-6K and one Fronius Primo.
To do what you want all you need to do is set Export Power Limit to a little bit above the maximum power produced by your other inverter.
The Solis will automatically absorb power generated by the other inverter to charge its battery.
No modbus commands are needed.
However you cannot set Export Power Limit to zero, because if you do so and it sees the other inverter exporting power above the limit that you set, it will freak out, go to safe mode, and sit there doing nothing. So you can't do zero export. Instead when the battery is full, it will export up to whatever you set in Export Limit.
 
Last edited:

I am quite interested in this document, but the link doesn't work, it says "Access Denied"! Can you share the PDF?

This is my software for controlling and monitoring Solis S5-EH1P-6K: https://github.com/peufeu2/GrugBus/tree/main/grugbus/

It's a shame the Remote Control protocol is not public, I would love to get my hands on it !

Now since some registers are written to Flash. If you do a few updates per day it's fine, but if you update them once every second or two to control power you will end up wearing out the flash chip. Which registers? I don't know lol. The docs don't say. Better safe than sorry, I didn't do it, and anyway I didn't find a register to control output power directly.

So I implemented a fake modbus smartmeter in python (it's an orange pi). The inverter queries it via modbus on the meter port, and I can feed it any data I want to control output power.
 
Last edited:
Are you sure about the inverter name?

RHI-6K-48ES-5G exists on Ginlong website
RAI-3K-48ES-5G exists on Ginlong website
RAI-6K-48ES-5G does not exist on Ginlong website

Sorry, typo, you are correct it is RHI-6K-48ES-5G (typo corrected in the post question), seems RHI-6K-48ES-5G is identical to your inverter S5-EH1P-6K, in all but name.

@peufeu you are a genius ! Your reverse engineering has given me exactly the answer I was after ! 43074, just tested and I can read and write to the register and modify the backflow power remotely. Merci Beaucoup ! You have save me so much time, and a good few flash write cycles ! :LOL:
 
Your reverse engineering has given me exactly the answer I was after ! 43074, just tested and I can read and write to the register and modify the backflow power remotely. Merci Beaucoup ! You have save me so much time, and a good few flash write cycles ! :LOL:
Hehe thanks. But normally you should not need to write the register: if the inverter is configured for self-use it will only export if PV panels produce more power than the battery can absorb.

Here battery charging power is in orange. When it's charged it falls to zero, and only then it exports to grid (red). While export power limit is set to 2kW, in self use mode as long as the inverter can charge the battery it will limit export to zero ; the limit only applies when the inverter has too much power and begins to export. So this self-use mode is basically "common sense".


1679745284128.png
 
Last edited:
Hehe thanks. But normally you should not need to write the register: if the inverter is configured for self-use it will only export if PV panels produce more power than the battery can absorb.
I tested out what you said this morning with mixed results. It seems that because I had a discharge time slot set that was the reason why the inverter exported the "back flow" power to the grid regardless of battery SOC. So I understand that a lot better now. Thank you ! The solis manual is just so bad !
But I found that when I set no discharge time slot the grid import/export becomes quite erratic..... certainly not as stable as in your figure above.
Untitled.png
This is a trace from testing this morning. I disabled the discharge timeslot between 10am to ~10:40am. Battery was not fully charged so I had expected the export to go to a stable zero. But you can see it is just all over the place. This trace is at 1min timestamps, the 5sec measurement on the inverter screen was all over the place. Clouds were very intermittent this morning so the power was surging to the panels which was maybe giving the control loop a hard time, or maybe this is to do with the distance between my CT clamp and inverter which is a good 20m ?

But there is another disadvantage to this. If I could get this more stable, when the inverter tries to export 0W there is always a small residual grid import, either due to CT clamp noise or inverter control loop tolerances. Its not much but I have found it adds up to ~0.5kWh per day which over a year is ~£100 on my current tariff. So I set the backflow power to a low 100W which ensures no grid export. You can see it in the figure above. So for me programming export on Modbus makes more sense when my battery is full so I can keep the residual backflow power of 100W.
 
Last edited:
Back
Top