diy solar

diy solar

Modbus Register Backflow Power for Solis Hybrid Inverter

> was it hard to do? How did you figure out the protocol and the encoding?

I used
2 RS485 interfaces:
- one is slave and emulates a smartmeter, with the inverter being master
- the other is master and talks to the actual smartmeter
So the python script can tweak values measured by the meter on the fly. It should work with all brands of inverters, if you can find the modbus registers for the meter.
So you’ve got one RS485 master reading from the actual meter as slave, and then a second RS485 slave that emulates the meter and responds to the Solis Hybrid as master. Is a Python script how you are communicating between the two?

I’ve got a PLC I am programming as an energy meter using Modbus CT sensors, so that mirrors your RS485 master, but sounds like I’d need a second PLC to emulate the Solis meter as an RS485 slave and I’ll need to figure out the easiest way to communicate between them…

As a worst-case I suppose I could use the digital IOs as a crude binary gas pedal: speed up (export more power); slow down (export less power).

Don’t plan to add the hybrid for at least a year but sounds like I have some background work to do…
Right now I'm not doing anything special with it, I'll use it to coordinate export between the two Solis inverters... because they can't do it on their own... and the guy who sold them told me they could.

Source code -> https://github.com/peufeu2/GrugBus

With Solis you can set the meter placement:

"Meter placement: Load": it measures power used by the house. In this case there is no control loop, the inverter will output whatever power the meter says the house is consuming (plus export limit if applicable).
Sounds as though the easiest thing to do what I’m aiming for is to just leave the inverter in Load Offset mode and report more consumption than actual…
That gives direct control over output power, but unfortunately Solis S5 outputs the absolute value of whatever the meter reports, so you can't use it to control battery charging from grid...
Oh, do it only recognizes consumption and cannot even sense export…. Bummer.
"Meter placement: Grid" it measures power used by the house + inverter, and the control loop tries to keep it at zero (or below the export limit if it has excess power available). When this total is zero, the inverter exports as much power as the house uses, and everything's fine. Adding a constant value to the power reported to the inverter shifts the zero point. So, say it reads the meter, adds +100W, then passes the value to the inverter... then the inverter will try to bring that value to zero, which results in outputting 100W more than what the house uses, which is exactly what you want to do. However if you do that at night you will donate this extra power to the grid from your batteries, so changing the value added depending on state of charge could be more useful.
My nighttime plan is to take the inverter off grid. I’m hoping there is a way to control it to do that via Modbus, but if not, I’ll use a contactor.

For daytime, it sounds like the easiest would be remain in Load mode and have the meter report a level of Load / consumption which corresponds to the Export Limit - (AC-coupled-Solar output - actual-load). If I’ve understood correctly, this will deliver exactly the power needed to export at the Export Limit.

In the early morning when the battery is low as well as in the late afternoon when the sun is setting, Grid mode would be better because then export from the Solis will be limited to incoming DC-coupled solar in addition, correct?

Ideally, I’d like to control when the hybrid switches between modes, but a preprogrammed schedule would probably work well enough…
> Hopefully that can be done without rewriting to flash.

It reads the meter every second so flash isn't going to be involved...
Meter emulation is a fantastic way to take control of the inverter and should also allow the possibility to modulate charge power if there is a zero export zero import mode.
 
So you’ve got one RS485 master reading from the actual meter as slave, and then a second RS485 slave that emulates the meter and responds to the Solis Hybrid as master. Is a Python script how you are communicating between the two?
It's an Orange Pi Lite from aliexpress running a python script, and a bunch of isolated WaveShare USB-RS485 interfaces. Orange Pi Lite has a super wimpy CPU, draws less than a watt of power, and it's super cheap. It's ideal for this. The python script runs both masters and slave, it's multitasking...

In fact there's another USB-RS485 interface to talk to the inverter's COM port because it's quite slow and sometimes it times out. Putting it on the same modbus as the smartmeter would add latency, so I used a dedicated interface. The nice thing with USB is you can plug as many as needed.

I put all the source code on github -> https://github.com/peufeu2/GrugBus

I’ve got a PLC I am programming as an energy meter using Modbus CT sensors, so that mirrors your RS485 master, but sounds like I’d need a second PLC to emulate the Solis meter as an RS485 slave and I’ll need to figure out the easiest way to communicate between them…
Sounds complicated. Modbus smartmeters aren't expensive. Besides, Solis gives one in the box with the inverter.

Sounds as though the easiest thing to do what I’m aiming for is to just leave the inverter in Load Offset mode and report more consumption than actual…
Yes
My nighttime plan is to take the inverter off grid. I’m hoping there is a way to control it to do that via Modbus, but if not, I’ll use a contactor.
There's an ON/OFF register, if you set it to power off, it shuts down all the power stages leaving only the screen and modbus port running, then you can turn it back on via modbus. This mode uses just a few watts compared to a few tens of watts when the power stages are on but idling. However, small gotcha: the backup output also powers off, so if you intend to use it to power your freezer, you'll need a DPDT relay or something. IMO it's necessary to have a source selector or relay anyway in case the inverter breaks down.
Ideally, I’d like to control when the hybrid switches between modes, but a preprogrammed schedule would probably work well enough…
There's a register to set the mode too.

But if you use both grid mode and load mode, then in load mode you must report power used by the house, and how will you know it? Then you need another meter just for the house. Simpler to use grid mode all the time.

Meter emulation is a fantastic way to take control of the inverter and should also allow the possibility to modulate charge power if there is a zero export zero import mode.
Yes, when the other Fronius inverter produces enough, the meter detects export and reports negative power, then the Solis grabs this power to charge the battery. It's very convenient*, makes it able to AC-couple with any other brand of grid tied inverter. If you substract a constant value from meter power before passing it to the Solis, turning the power negative, it will do the same.

* but Export Limit must be set high enough so it's not compatible with zero export.
 
It's an Orange Pi Lite from aliexpress running a python script, and a bunch of isolated WaveShare USB-RS485 interfaces. Orange Pi Lite has a super wimpy CPU, draws less than a watt of power, and it's super cheap. It's ideal for this. The python script runs both masters and slave, it's multitasking...

In fact there's another USB-RS485 interface to talk to the inverter's COM port because it's quite slow and sometimes it times out. Putting it on the same modbus as the smartmeter would add latency, so I used a dedicated interface. The nice thing with USB is you can plug as many as needed.

I put all the source code on github -> https://github.com/peufeu2/GrugBus
I’m slowly coming up to speed on all this stuff and your suggestion just might cause to eventually dive into OrangePi Lite…

For now, I’m diving into PLC and Ladder Programming.
Sounds complicated. Modbus smartmeters aren't expensive. Besides, Solis gives one in the box with the inverter.
I’m doing quite a bit more than just making a standard meter. I’m monitoring grid wires (split-phase import/export) as well as 240VAC grid-tied solar production. So my PLC can calculate how much additional power I want exported by the hybrid or how much excess export I want consumed / absorbed by the hybrid in real-time.

In addition, it’s monitoring the DC-coupled solar power charging the battery as well as the two weakest cells of the battery that determine usable SOC.

So the PLC knows throughout the day exactly what I’d like to be doing and when.

I was planning to get a Conext XW Pro or a Victron Multiplus II because they both support full real-time control through Modbus, but now I’m trying to understand whether there is a way to achieve the equivalent with a Series 6 Solis Hybrid.

During daylight hours, I want to export as much solar power as possible while remaining below my export cap.

At night, I want to go off-grid to supply Critical Loads (primarily refrigerators) for as far into the night as the battery will last, and then go back on-grid when there is no possibility of spurious export.
There's an ON/OFF register, if you set it to power off, it shuts down all the power stages leaving only the screen and modbus port running, then you can turn it back on via modbus. This mode uses just a few watts compared to a few tens of watts when the power stages are on but idling.
I’m planning to have my Critical Loads always supplied by the Hybrid, so turning off does not seem appealing. Though I suppose that if the battery is drained in the middle of the night, powering down the fridges until sunrise could be another option to consider…
However, small gotcha: the backup output also powers off, so if you intend to use it to power your freezer, you'll need a DPDT relay or something. IMO it's necessary to have a source selector or relay anyway in case the inverter breaks down.
Not quite understanding - does the hybrid contain internal transfer switches and can they be controlled, or are they only automatically opened when grid signal goes down?

I’m planning to have a DPDT contactor under PLC control to go off-grid at sundown and back on-grid at sunrise.
There's a register to set the mode too.
And does changing that register write to flash?

I suppose only writing that register twice per day would be less of an issue that changing export power every ~5 seconds…

I was hoping there was a way to schedule different hours for different settings.

If so, I’d at most need to make changes every few days or weeks (winter schedule vs summer schedule, overcast day versus sunny day, etc…).
But if you use both grid mode and load mode, then in load mode you must report power used by the house, and how will you know it? Then you need another meter just for the house. Simpler to use grid mode all the time.
My PLC meter knows AC-coupled Power being generated as well as export/import to/from grid, so load = generation - export.
Yes, when the other Fronius inverter produces enough, the meter detects export and reports negative power, then the Solis grabs this power to charge the battery. It's very convenient*, makes it able to AC-couple with any other brand of grid tied inverter. If you substract a constant value from meter power before passing it to the Solis, turning the power negative, it will do the same.
Variable charge power and the ability to control is fundamental to what I’m aiming to achieve. Whatever the limits of the Solis hybrid are, it sounds like I can achieve control over both generation/export as well as consumption/absorption through existing operating modes by emulating the meter.
* but Export Limit must be set high enough so it's not compatible with zero export.

Yeah, from what you are saying, sounds like I’m better off avoiding use of the export limit and just stick to zero export through the peak part of the day and mask the existence of the AC-coupled export. When I’m over my export limit the Solis will absorb by charging the battery and when I want more export because it’s morning or late afternoon and I want more export, I switch to ‘minimize grid power’ mode and emulate additional load.

The last wrinkle is that I eventually want to add an EVSE and charge an EV during the peak part of the day, but since that is intended to consume only power that otherwise would be getting exported, I think it’s something the PLC can take care of..,
 
I’m slowly coming up to speed on all this stuff and your suggestion just might cause to eventually dive into OrangePi Lite…
It's just a single board computer that runs linux with SD card instead of harddrive. I picked this one because it's cheap, in stock, and it uses 1W. There are many similar products from other manufacturers. I don't know about PLC, but really it doesn't matter what you use as long as you know how to use it and it works.
I’m doing quite a bit more than just making a standard meter. I’m monitoring grid wires (split-phase import/export) as well as 240VAC grid-tied solar production. So my PLC can calculate how much additional power I want exported by the hybrid or how much excess export I want consumed / absorbed by the hybrid in real-time.
That's a bit of a duplication of the existing control loop inside the inverter, which makes me wonder what kind of inverter are you using right now?
In addition, it’s monitoring the DC-coupled solar power charging the battery as well as the two weakest cells of the battery that determine usable SOC.
Is it lead acid? If you keep the batteries, you a compatible inverter...
I was planning to get a Conext XW Pro or a Victron Multiplus II because they both support full real-time control through Modbus, but now I’m trying to understand whether there is a way to achieve the equivalent with a Series 6 Solis Hybrid.
I don't know S6. I hear Victron and Deye are very controllable (although for the Deye you will of course have to navigate lots of half-Chinese documentation). Victron is expensive ; Deye is at a really good quality/price point in France, I almost bought Deye instead of Solis, the deciding factor was horror stories heard from the French Deye distributor, but that has nothing to do with the quality of the product itself. SunSynk seems to put a huge markup on them though...

What I dislike about Victron Multiplus is that all the power goes from PV to 48V back to mains voltage, and at 48V that's a huge current.

Basically if you want to do something a bit complex with an inverter, you should look for someone who knows it well or has done the same. It would be a bummer to get an inverter then hit a firmware snag that prevents you from doing what you want.

Not quite understanding - does the hybrid contain internal transfer switches and can they be controlled, or are they only automatically opened when grid signal goes down?
It depends on the brand, some are internal, some are external, some are optional, watch out for unexpected expenses for this kind of accessories!

Solis has internal transfer switch. When grid is present, grid port is connected internally to backup port. In a blackout, grid port disconnects, and the inverter supplies power to backup port. When turned off, both grid port and backup port are disconnected.

And does changing that register write to flash?
No idea! But you get something like 10-100k write endurance cycles in these flash chips, so once a day is fine, once a second is not.
 
It's just a single board computer that runs linux with SD card instead of harddrive. I picked this one because it's cheap, in stock, and it uses 1W. There are many similar products from other manufacturers. I don't know about PLC, but really it doesn't matter what you use as long as you know how to use it and it works.
For a critical component such as an energy meter / monitor / master controller, I was worried any ‘computer’-based controller would not have the reliability of a PLC. For reporting and logging data, different story…
That's a bit of a duplication of the existing control loop inside the inverter, which makes me wonder what kind of inverter are you using right now?
Ah, I’m on the hairy-edge with a 1-2 year plan to come back off the cliff.

Currently, I have a small 1kW array charging a 24V DIY LiFePO4 battery through an SCC, To consume / offset I’m using 2 1kW GTIL inverters powered by the same battery. The GTILs limit themselves to offset consumption (one per leg) with no additional controller needed.

I’m working on the PLC-based energy meter / master controller as part of the system upgrade I’m planning for around the time I get an EV (1-2 years).
Is it lead acid? If you keep the batteries, you a compatible inverter...
My DIY 8S / 24V LiFePO4 battery was educational and I’ll have no regrets when I upgrade to an OTS battery. If Solis offers a 48V LV variant, I’d consider moving to 48V but once I’m moving to a higher-quality OTS battery anyway, I’m open to going to an HV battery (144-192VDC).

The inverter will drive the choice of battery, not the other way around.
I don't know S6. I hear Victron and Deye are very controllable (although for the Deye you will of course have to navigate lots of half-Chinese documentation). Victron is expensive ; Deye is at a really good quality/price point in France, I almost bought Deye instead of Solis, the deciding factor was horror stories heard from the French Deye distributor, but that has nothing to do with the quality of the product itself. SunSynk seems to put a huge markup on them though...
We don’t have Deye here because they are exclusively sold to Solark, but that is a good reference point for the capability I am after.

The S6-H-K-US will be Solis’ first split-phase inverter for the US market: https://www.ginlong.com/uploads/file/Solis_datasheet_S6-EH1P(3,8-11,4)K-H-US_USA_V1,2_2023_03.pdf
What I dislike about Victron Multiplus is that all the power goes from PV to 48V back to mains voltage, and at 48V that's a huge current.
I was considering a 3kW Multiplus II powered by my 24V battery. With dual ~1 meter 3/0 battery cables, I2R losses are acceptable.

Also, if you are exporting DC-coupled solar power, there is no efficiency loss associated with going into and back out of the battery…
Basically if you want to do something a bit complex with an inverter, you should look for someone who knows it well or has done the same. It would be a bummer to get an inverter then hit a firmware snag that prevents you from doing what you want.
Precisely why I so greatly value this exchange with you. GXMNow has a system doing exactly what I’m interested in based on a Conext XW Pro (and is the original inspiration for my PLC-based energy monitor with Modbus communication - I’m following down the path he pioneered and proved).

Solark-like capabilty has been Victron’s sweetspot for decades, and they have the most active and well-established DIY control community. So while I don’t have a specific pioneer / champion on the Forum (mainly because most Victron owners here are using their Multiplus IIs either on an RV or off-grid), I have little doubt the Multiplus II can do everything I could ever want (though for a hefty premium, especially for split-phase). Victron had specific documentation regarding Mobbus control through PLC, for example.
It depends on the brand, some are internal, some are external, some are optional, watch out for unexpected expenses for this kind of accessories!
I was asking specifically about Solis. Multiplus II has internal 50A transfer switches which can be externally controlled to disconnect and reconnect, so no additional contactor required.

Pretty certain the Conext XW Pro has the same (possibly at only 30A, however).

But from what you wrote below, the Solis offer to control path to bring the hybrid off-grid while grid remains active (so external contactor required for the capability I am interested in…).
Solis has internal transfer switch. When grid is present, grid port is connected internally to backup port. In a blackout, grid port disconnects, and the inverter supplies power to backup port. When turned off, both grid port and backup port are disconnected.
But that automatic control is the only path to control the internal transfer switch, correct? There is no setting that can be set over RS485 that causes the hybrid to open the transfer switch while grid is active, correct?
No idea! But you get something like 10-100k write endurance cycles in these flash chips, so once a day is fine, once a second is not.
Agree, writing 2 times per day for 10,000 cycles = 13.7 years, and let’s not even talk about 100,000 cycles…
 
For a critical component such as an energy meter / monitor / master controller, I was worried any ‘computer’-based controller would not have the reliability of a PLC.
I bought a spare :ROFLMAO:

Now about your EVSE, it's always the same thing with smart "connected" devices: they do what they want, but not what you want.

Say you have a hybrid inverter, it has its own smartmeter (or CT) to control export power, so when it runs on battery it doesn't export and when excess solar is available then it can limit export to the value you set.

Now you add an EVSE with "green solar features", of course it comes with another CT or smartmeter (incompatible with the one you already have so you got to install both, obviously) ; that measures excess solar power so the EVSE can use it.

Currently there is no standard protocol for the inverter to communicate with the EVSE so it's all dumb: you have to set the inverter to export, and the EVSE to use excess exported power. So they're communicating through the amount of power flowing in the wires... Unless maybe the two are the same brand and they can talk to each other, so in this case you have to read all the fine print for everything.

Now suppose you want to route excess power to your water heater or your AC or whatever. Well you may buy a device for that, which comes with, drum roll, you guessed it, its own smartmeter or CT which is obviously incompatible with the others so now you have 3 smartmeters. And the fun thing is when there's excess power exported, both EVSE and that new device will want to grab it at the same time, which opens a whole new can of worms.

Basically there are two types of installations that work: either off the shelf, all from the same brand, all devices made to work with each other (lots of opportunities to sell expensive accessories here, would you like a $1000 "master box")... or DIY with a custom brain/computer to coordinate the mess. It's totally not user-friendly at the moment.

One more reason why I went with the linux single board computer, I can always add more modbus dongles later for this type of stuff...

Also, if you are exporting DC-coupled solar power, there is no efficiency loss associated with going into and back out of the battery…
I don't get what "DC coupled solar power" is

But from what you wrote below, the Solis offer no control path to bring the hybrid off-grid while grid remains active (so external contactor required for the capability I am interested in…).
Correct. I don't know why you'd want to do that though.

But that automatic control is the only path to control the internal transfer switch, correct? There is no setting that can be set over RS485 that causes the hybrid to open the transfer switch while grid is active, correct?

Correct, that's how it looks inside:
1679815807015.png
In "Power OFF" mode, both relays are open.
In "Power ON" mode, you cannot control the grid relay. It will close if grid is available, and open in case of blackout. You can control the backup output relay via modbus.
 
I bought a spare :ROFLMAO:

Now about your EVSE, it's always the same thing with smart "connected" devices: they do what they want, but not what you want.

Say you have a hybrid inverter, it has its own smartmeter (or CT) to control export power, so when it runs on battery it doesn't export and when excess solar is available then it can limit export to the value you set.
My hybrid will rely on the import or export power I report to it through me emulated meter to control what it does…
Now you add an EVSE with "green solar features", of course it comes with another CT or smartmeter (incompatible with the one you already have so you got to install both, obviously) ; that measures excess solar power so the EVSE can use it.
My EVSE will rely on the ‘available’ export power as reported by the meter devise what charge power to use…

I may need multiple emulators / slaves, but there will be only a single physical meter…
Currently there is no standard protocol for the inverter to communicate with the EVSE so it's all dumb: you have to set the inverter to export, and the EVSE to use excess exported power.
Yes, so seperately telling the hybrid how much power to export and telling the EVSS how much ‘excess’ power to consume is the best way forward…
So they're communicating through the amount of power flowing in the wires... Unless maybe the two are the same brand and they can talk to each other, so in this case you have to read all the fine print for everything.
No, you just need the protocol to understand how each box communicates with it’s specific meter and then you can tell whichever box whatever you want go through meter emulation,..
Now suppose you want to route excess power to your water heater or your AC or whatever. Well you may buy a device for that, which comes with, drum roll, you guessed it, its own smartmeter or CT which is obviously incompatible with the others so now you have 3 smartmeters.
All emulated (assuming protocols for each are as public as that of the Solis hybrid…).
And the fun thing is when there's excess power exported, both EVSE and that new device will want to grab it at the same time, which opens a whole new can of worms.
You crank up EVSE charge power one step at a time while similarly cranking up EVSS export level…
Basically there are two types of installations that work: either off the shelf, all from the same brand, all devices made to work with each other (lots of opportunities to sell expensive accessories here, would you like a $1000 "master box")... or DIY with a custom brain/computer to coordinate the mess. It's totally not user-friendly at the moment.
I hear you, but the ability to emulate an energy meter for each box is key and opens things up, You need to understand the meter communication protocols for each box. You need yo understand the functionality of your multiple boxes under various mode settings, big then you cl have complete control.
One more reason why I went with the linux single board computer, I can always add more modbus dongles later for this type of stuff...
Agree. Single master PLC-based meter communicating with as many PLC-based slaves communicating with each respective box achieves the same thing…
I don't get what "DC coupled solar power" is
DC-coupled means a solar string provides DC power directly to an SCC. AC-coupled means that same string is connected to a string inverter or multiple Microinverters…
Correct. I don't know why you'd want to do that though.
I do not want to offset load at night connected to grid (spurious export). No issue with spurious export during daylight hours, but after the sun is down, I want to bring hybrid off-grid before offsetting ‘critical loads’ such as primary refrigerator…
Correct, that's how it looks inside:
View attachment 141366
In "Power OFF" mode, both relays are open.
In "Power ON" mode, you cannot control the grid relay. It will close if grid is available, and open in case of blackout. You can control the backup output relay via modbus.
But *Power OFF mode’ also means the Solis inverter is exporting no power through AC input, correct?

Sounds as though use of an external transfer switch is the easiest way to force a Solis inverter to go off-grid…

The Victron Multiplus II allows you to control the hybrid to go off grid or back on grid through a relay input, for example…
 
The simplest and best way would be for the inverter/EVSE/etc to expose an interface allowing direct power control (modbus, ethernet, etc).

However most manufacturers want to sell "master box" accessories so they don't want you to DIY your own! So they won't share the juicy registers, only the less useful ones. Although, I think Fronius gives this kind of access, maybe Deye too.

So I emulated a meter. The nice thing is, communication between inverter and meter is on an open modbus, easy to sniff and decode, there is no way for the manufacturers to block this kind of hack... and indeed it is quite versatile, I'm quite sure it will work for an EVSE too. If the EVSE uses a CT it is much harder because you'd have to generate a fake CT signal.

> I do not want to offset load at night connected to grid (spurious export).

OK... You could also set the export limit to negative, ie keep a constant consumption of say 100W. That way if your house uses more power, the battery will provide for it, and you don't have spurious export.

> But *Power OFF mode’ also means the Solis inverter is exporting no power through AC input, correct?

Correct, both grid and backup ports are disconnected, and the power conversion circuits shut down. It's the mode to use at night to avoid the inverter's idle power draw when the battery is discharged and the inverter would do nothing useful.

> Sounds as though use of an external transfer switch is the easiest way to force a Solis inverter to go off-grid…

Yes if you want it to be still on with the backup output active you need to switch off the grid port with an external relay.
 
> I do not want to offset load at night connected to grid (spurious export).

OK... You could also set the export limit to negative, ie keep a constant consumption of say 100W. That way if your house uses more power, the battery will provide for it, and you don't have spurious export.
The definition of ‘spurious export’ is changing here in California. Starting early next year, the utilities have been authorized to begin collecting ‘dual-channel’ data from the utility meters on the homes,

Up to now, all metered data was netted over an interval of at least 1 minute and typically 15 minutes or even 60 minutes.

So spurious export was easy to prevent by just assuring that over any netting interval, there was a small amount of net consumption.

With dual-channel data collection, there is no netting interval and the measurement of import or export is essentially instantaneous. My smartmeter collects data every 0.58ms and whenever it detects energy being instantaneously exported to grid, that value is accumulated into a separate register than that being used to accumulate instantaneous measurements of import from grid. Those are the ‘dual channels’ and it will mean spurious export can only be avoided by taking the hybrid off-grid.

Even set to consume 100W overnight, there is no hybrid inverter out there than can react quickly enough to prevent spurious export over an interval of under 1ms when a load consuming 200W shuts off (ie: a cycling refrigerator).

This is my motivation to take my hybrid inverter off-grid when it is offsetting the CLP panel overnight. Spurious export during daylight hours when I’ve already been authorized to export excess solar power is a non-issue, but overnight, when there is no sun shining, I don’t want even 1ms of export to be reported by my smartmeter (which is getting smarter :).
> But *Power OFF mode’ also means the Solis inverter is exporting no power through AC input, correct?

There's an ON/OFF register, if you set it to power off, it shuts down all the power stages leaving only the screen and modbus port running, then you can turn it back on via modbus. This mode uses just a few watts compared to a few tens of watts when the power stages are on but idling. However, small gotcha: the backup output also powers off, so if you intend to use it to power your freezer, you'll need a DPDT relay or something. IMO it's necessary to have a source selector or relay anyway in case the inverter breaks down.

I have a follow-on question about this: I assume ‘shutting down all power stages’ means DC-coupled battery charging through the MPPT shuts down as well when the inverter is turned OFF?

I’m considering the alternative ways to integrate a Solis Storage inverter into my system, I’m realizing the classic way of leaving the AC-output of the hybrid always powering the Critical Loads Panel may not be best.

An alternative could be to use a contactor to bypass the hybrid so that the CLP is directly grid-powered during the day and only revert the CLP to being powered by the hybrid at night (until if/when battery is fully discharged).

Used in this way, the function of the hybrid during the day would be to offset load as communicated by the energy meter through the AC input while using any excess DC-coupled power to charge the battery (no load or output through the AC output).

Then at sundown, CLP is switched to being powered by Solis through its AC output and AC input is disconnected using a second contactor. So hybrid goes into backup power mode and serves loads on CLP using battery power (without requiring communication from the meter).

If battery becomes fully-depleted before sunrise, there are two options:

1/ reconnect grid to AC input in which case I would want an operating mode that minimizes consumption from grid and passes-through grid power to serve CLP consumption.

2/ bypass hybrid power to CLP and shut down hybrid, so CLP loads are served directly by grid power and there is no power being consumed by the Solis hybrid until Sunrise at which point it needs to be powered on to begin recharging the battery using DC-coupled solar power.

It seems like the latter alternative would be better since no power is wasted powering the inverter when it is no longer needed but I’m interested in any insight you may have on which approach better suits Solis’ ore-canned operating modes as well as any other inputs on which approach would be better.

I won’t be actually adding a hybrid for another year+ but I am planning to modify my wiring before then including the necessary contactor s and PLC control to make the whole system function as I want.
 
It's an Orange Pi Lite from aliexpress running a python script, and a bunch of isolated WaveShare USB-RS485 interfaces. Orange Pi Lite has a super wimpy CPU, draws less than a watt of power, and it's super cheap. It's ideal for this. The python script runs both masters and slave, it's multitasking...

In fact there's another USB-RS485 interface to talk to the inverter's COM port because it's quite slow and sometimes it times out. Putting it on the same modbus as the smartmeter would add latency, so I used a dedicated interface. The nice thing with USB is you can plug as many as needed.

I put all the source code on github -> https://github.com/peufeu2/GrugBus
Thanks for that. Very useful. Now that I've got modbus access working over tcp alongside the wifi datalogger I have been using your register lists as a reference to see what my inverter is up to.

One value that doesn't quite match for my RHI-3K-48ES-5G is 33263 'meter_total_active_power'. From what I can make of the readings I'm getting, 33264 holds the Power in Watts and 33263 holds the direction with 0 being export and 1 being import. It's possibly the same for some of the other registers. I haven't looked too deeply into it yet.
 
On the EH1P it's a signed int32 but it is possible other models would use a separate sign register. It is the case on EH1P for the battery current.
 
On the EH1P it's a signed int32 but it is possible other models would use a separate sign register. It is the case on EH1P for the battery current.
Having watched it some more, I'm no longer sure. Sometimes that register seems to use 1 or 0 and sometimes the other seems to show a value that looks like 16 bit signed negative, I'll keep monitoring it and see what I can find.

Thanks again for all the work you put in to getting that list together.
 
meter total active power which on the US HVES 5G is Modbus address is 33263/64 is a S32 register. SInce this is modbus, it is two 16 bit reads to build the 32bit value.

3-30-2023 6-12-01 PM.jpg
 
With dual-channel data collection, there is no netting interval and the measurement of import or export is essentially instantaneous. My smartmeter collects data every 0.58ms and whenever it detects energy being instantaneously exported to grid, that value is accumulated into a separate register than that being used to accumulate instantaneous measurements of import from grid. Those are the ‘dual channels’ and it will mean spurious export can only be avoided by taking the hybrid off-grid.
OK.

Reactive loads like motors and capacitors don't just consume energy, they pump energy in and out of the grid over a period. So it's not possible for the meter to detect export over a shorter time than one mains period and still be able to bill only active power and work properly with reactive loads.

That's how the French meters work, energy is counted per period, only active energy is billed (not reactibe) so indeed every time a load switches on or off, before the inverter reacts, the meter will register a short spike of import or export power.

If the legistation limits spurious export to zero then this means hybrid inverters become illegal, which is completely retarded but... not that surprising.

governmentdemotivator.jpeg


So the question is, what is the legal export limit...

If it is indeed zero then... it would not be that complicated to make a device that turns on a big heating resistor for a few milliseconds when needed, but it should be fast, ie it should use a direct measurement with a current transformer.

I have a follow-on question about this: I assume ‘shutting down all power stages’ means DC-coupled battery charging through the MPPT shuts down as well when the inverter is turned OFF?
Yes, when it's set to OFF the only things powered are logic, microcontrollers, ADCs, modbus, etc. Since modbus is still powered, you can tell it to turn on via modbus. All the telemetry is still available, so if my Pi turned the inverter off at night because the battery is empty, it will monitor voltage on the PV strings (also works when off) and turn the inverter back on when the sun rises.

I’m considering the alternative ways to integrate a Solis Storage inverter into my system, I’m realizing the classic way of leaving the AC-output of the hybrid always powering the Critical Loads Panel may not be best.
It's the simplest, but you can't turn off the inverter.
An alternative could be to use a contactor to bypass the hybrid so that the CLP is directly grid-powered during the day and only revert the CLP to being powered by the hybrid at night (until if/when battery is fully discharged).
This duplicates the contactor in the inverter, but it adds convenience: you can turn the inverter off, remove it for maintenance if it breaks down or mess with it without losing power to the critical loads.
Used in this way, the function of the hybrid during the day would be to offset load as communicated by the energy meter through the AC input while using any excess DC-coupled power to charge the battery (no load or output through the AC output).
No problem
Then at sundown, CLP is switched to being powered by Solis through its AC output and AC input is disconnected using a second contactor. So hybrid goes into backup power mode and serves loads on CLP using battery power (without requiring communication from the meter).
OK then maybe you don't need this contactor. There's a CT on the backup output, so maybe it's fast enough to control its output power without exporting.

2/ bypass hybrid power to CLP and shut down hybrid, so CLP loads are served directly by grid power and there is no power being consumed by the Solis hybrid until Sunrise at which point it needs to be powered on to begin recharging the battery using DC-coupled solar power.
It's what I'm doing, it works fine.
I powered the contactor from backup output, since it can be switched on/off via modbus. So when the backup output is on, it flips the contactor and critical loads are powered from backup port. When backup output is off, the contactor powers critical loads from grid. This way my freezer will be powered if there is a blackout, and also if the inverter breaks down.
However the backup output has a soft-start, voltage rises slowly over a few seconds, which makes the relay go zzZZZZZ-CLACK so I need to add a few seconds delay on it.
 
OK then maybe you don't need this contactor. There's a CT on the backup output, so maybe it's fast enough to control its output power without exporting.
I just tested it:
Grid is on, inverter is working normally in self-use mode
Backup port on
Connect 600W heater to backup port, switch on/off

The inverter takes a few seconds to react to a change of load on the backup port, so it does creates an import spike at turn-on and export spike at turn-off.
 
I got my setup working with my RHI-3K-48ES-5G. But... due to a typo, accidentlly set the wrong register while setting charge current. I fixed the typoe, but if anyone could tell me the correct value for register 43131 for my inverter so I can set it back to what it should be. My inverter seems to be working ok, other than the import is slightly higher than I would expect. I should have set 43141 Timed charge current - which is now working fine.
 
I got my setup working with my RHI-3K-48ES-5G. But... due to a typo, accidentlly set the wrong register while setting charge current. I fixed the typoe, but if anyone could tell me the correct value for register 43131 for my inverter so I can set it back to what it should be. My inverter seems to be working ok, other than the import is slightly higher than I would expect. I should have set 43141 Timed charge current - which is now working fine.

For the 5G HVES version this is what I have for that address

4-7-2023 8-34-09 AM.jpg

If you go in to the backup port settings from the screen menu, you should be able to read / write the Hz setting to verify
 
For the 5G HVES version this is what I have for that address

View attachment 143531

If you go in to the backup port settings from the screen menu, you should be able to read / write the Hz setting to verify
Thanks, but that's the wrong address. I set 43131, not 43113.
But I will go and have a look at the various settings on the screen to see if any look wrong. I have other things I want to look at in my loft anyway.
 
Thanks, but that's the wrong address. I set 43131, not 43113.
But I will go and have a look at the various settings on the screen to see if any look wrong. I have other things I want to look at in my loft anyway.

Sorry on the wrong register, from the same document that address is listed as unused

4-7-2023 1-44-36 PM.jpg
 
Sorry on the wrong register, from the same document that address is listed as unused

View attachment 143572
Thank you. All I could find is also that it is "reserved" Hopefully that does mean unused. It could also mean "We're using this for something, but we're not going to tell you." As things seem to be working, I'll leave it alone. Thanks again.
 
Thank you. All I could find is also that it is "reserved" Hopefully that does mean unused. It could also mean "We're using this for something, but we're not going to tell you." As things seem to be working, I'll leave it alone. Thanks again.
It is unused, so no worries and you got lucky!
 
It is unused, so no worries and you got lucky!
It isn't unused. It's Discharge Limitation (max battery discharge current). I don't know the units, it doesn't seem to be directly input in Amps. I had it set to 35 and my Max Discharge was 6.7A. When I changed it to 24 it showed 4.2A on the inverter. I've now set it to 0 and the inverter is showing the 50.0A from the BMS.
No wonder I was getting a slightly higher import than normal - anything over 6.7A - about 350W - was coming from grid at night and high loads during the day too. I suspect the rest of the "reserved" registers also override the other BMS values on that Control Parameters screen, on the RHI-3K-48ES-5G at least.
Control Parameters.png
Image from inverter manual.
 
Hi Peufeu,

just wondering if you could already share your experience with your grugbus scripts please?
My Cheap Solis with its acrel meter really has issues with its control loop as you can see below.
it’s oscillating over 20min and the only reason I believe it escaped from this Desaster was the fact that my PV generated more then the solis could consume…
would be interested if you have similar issues and if you can control it automatically by today? Controlling would mean your script needs to detect the oscillation, then adjust active_power to make sure the solis is not any longer taking power from grid just because it charges the battery to heavy…

Now I am thinking myself if i should try a solution by writing a holding-register to control it, or take your mitm approach by faking the smart meter.
writing holding-register at least the one I am opting for is stored in eeprom, which has limited write-cycles.

so your approach of simulating the smart-meter looks genius to me.

some postings before you mentioned that the only item the control loop wants to bring to zero is active_power.

as I do have a Sunny home manger which trust very much more then the acrel I am wondering if I could limit myself in only faking this single active_power register?

anyhow, have the exceed on stuff ready and 2 * rs485 usb converters and over the weekend I will give your mitm python script a shot:)

Thanks
IMG_1749.jpeg
 
My Cheap Solis with its acrel meter really has issues with its control loop as you can see below.
Here's mine (horizontal axis in seconds)
1685224217637.png

As you can see the control loop response doesn't have perfect damping. It rings a little, but it doesn't oscillate like yours.

If your horizontal axis shows HH:MM and not MM:SS here's a zoom level that should be closer to the plot you posted above:

1685224809393.png

I looked in my log and found a bit of oscillation too:

1685225211680.png

But it doesn't last for a long time and the amplitude is quite low. Also I'm not sure it comes from the inverter, it could be a load switching on and off quickly. Do you have a load like a heater controlled by a wave train dimmer or thermostat that does this?

What are your Solis settings for :
Export power limit
Meter placement

Do you have another inverter in the house or just the Solis?
 
Dear Peufeu,

inverter is a Solis RAI-3K-48ES-5G.
solis is the only Battery inverter. AC coupled I have another 4 SMA PV inverters.
your idea of checking other consumers in the house is good, however the oscillation can be easy repeated in low light times, when e.g. the solis could charge with more watts then the Pv is generating. So I would like to exclude other consumers as the source of the issue.

your active power indeed looks much more promising..

export-power limit: I think in mine it is called ‘back flow power’ and it is set to zero

the biggest culprit to me sounds the meter placement.
in have set it to ‘Pv inverter’. I think it must be set to ‘grid’, where indeed the meter is located. indeed the acres meter is at the same location as the sma energy Meter and both are directly behind the main grid fuses .

solis-cloud and the sma graphs look reasonable, even with setting meter placement ‘Pv inverter’. But I am happy to change if we believe it will be any good. Guess then I need to reverse the ct-clamps as well?

my acrel-meter indicates positive values when we export into grid.

i have been done a side-to-side comparison of the sma ‘psupply’ (which indicates export to grid) and acrel Meter ‘total active power’ on the MQTT subscriptions. They are really close-by. Maybe a diff of 100watts.

thanks

christian
 

Attachments

  • IMG_5382.png
    IMG_5382.png
    658.6 KB · Views: 5
  • IMG_5381.jpeg
    IMG_5381.jpeg
    64.1 KB · Views: 5
  • IMG_5380.jpeg
    IMG_5380.jpeg
    81 KB · Views: 5

diy solar

diy solar
Back
Top