Monitoring & Controlling a Hybrid Solis Inverter

Post Reply
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Monitoring & Controlling a Hybrid Solis Inverter

#1

Post by MrPablo »

Hi all, I'm hoping some of this information might be useful, particularly those with a Solis 5G hybrid inverter.

I recently installed Solis RHI 5G as part of my garage PV & battery storage setup, but it was quickly apparent that the logging and data available via the included Wi-Fi stick and app was rather lackluster. I spent some time researching alternative ways to pull data out for reporting, plus remotely change some key settings, all connected via Home Assistant.

A couple of weeks ago, a friend also had the same inverter installed but isn't quite ready for Home Assistant. Instead, I set up a basic dashboard in Node Red for him to use - here's how I did it for reference if anyone else could use it.
Details will be spread over several posts!

First, I stopped using the included Wi-Fi monitoring stick. It was too locked down, with no easy way to use it locally, instead all data was sent to the cloud.
Instead, I bought an Elfin EW11, a RS485 to Wi-Fi adaptor. This little stick is easy to find and often very cheap, plus easy to wire in as needed. For those that want a LAN version, there's also the EE11.
I used the connector and body of the original Wi-Fi stick, removing the PCB and soldering a cat5e cable to the connectors (Solis RS485 pinout here).

I left the EW11 hanging below with some cable strain relief, looking like this:
Image
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#2

Post by MrPablo »

Once connected, the EW11 powers up using 5v supplied by the inverter.
I got it connected to the Wi-Fi network, setting a static IP address.

The next step is to configure the RS485 connection on the EW11 settings.
Assuming your wiring was correct in the first place, this should be very simple - all you have to do is set it up with the correct baud rate, etc.
Image

Next, it's a case of setting up the communication settings. A simple TCP server works well, but make sure to keep a note of the port number as that'll be needed in Node Red (or any other system you use to send Modbus queries).
Image

Once this is done, you should be ready to start sending requests to the inverter and getting useful data back!
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#3

Post by MrPablo »

I use Node Red for much of my automation logic, simply because my feeble brain likes the visual flow based approach.

You can install Node Red on many different devices, from a basic Raspberry Pi up to a powerful x86 server. There's plenty of guides out there that better explain how to install and set this up, but I would strongly recommend setting up a file store for context information.
This means that useful datapoints won't be lost if you have to restart Node Red for whatever reason.

Node Red is a flow based approach, where data is passed from node to node as message attributes.
This makes it pretty easy to export and import pre-configured logic, then adjust to your own requirements.
I've put a link to download an export of the flow I'm using to create this web accessible dashboard
Image

Node Red - Solis Flow


You can also install modules to extend the capabilities of Node Red - you'll need to install node-red-contrib-modbus. This is done by going to 'manage palette' in the Node Red ui, searching for it and simply clicking install.
You'll also need to install node-red-contrib-buffer-parser, node-red-dashboard and node-red-contrib-bit.

Once you've imported the example flow, you'll see something like this:
Image
Next, it's time to configure the node that handles connections to the EW11.

Double click a node called 'Solis Inverter' as shown below:
Image

Select the edit icon to the right of 'Add new modbus-client', then enter settings as below:
Image
Last edited by MrPablo on Mon Oct 24, 2022 1:47 pm, edited 1 time in total.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#4

Post by MrPablo »

Now that a new Modbus client has been set up, it's time to associate that with all of the Modbus nodes, and there's quite a few...
Look for any nodes which have this logo:
Image
Double click the node, and select your newly created Modbus client from the dropdown. There's 12 of these nodes that will need to be updated.

Once that's done, click Deploy in the top right. This will then save all the changes plus start up a dashboard you can access via the browser.
By default, this dashboard is shown at node-red-ip-address/ui, so for example 192.168.1.10/ui.

All going well, data will start populating this basic dashboard, updating every two seconds.
If there's no data showing, it's time to check the Modbus connection is actually working. I'd suggest:
- Checking the wiring between the inverter and the EW11 or other Modbus adaptor.
- Checking the slave address as set in the Solis inverter settings. By default, this Node Red flow expects the address to be 01. If it's different in the inverter settings, it's a pretty simple job to change it there.

More details about exactly what this flow can do in the next post.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#5

Post by MrPablo »

There's 11 groups of logic inside the Node Red flow, split into two different types.
First, there's the read groups (blue background). These query specific ranges of Modbus registers containing useful information, but don't actually make any changes to the inverter settings.
Next, there's the write groups (yellow background). These actually update settings on the inverter itself, either automatically or via user interaction on the dashboard.

Read Groups

Query Inverter Performance
There's two groups of registers which are queried every two seconds. These contain information such as PV output in watts, inverter temperature, load power and historical performance such as daily generation in kWh.
The buffer parser nodes split this information out and apply and conversion factors needed. Not all of the values are displayed in the dashboard, but I've left them there for users to investigate as needed.

Query Inverter Storage Control Parameters
This runs whenever Node Red starts up, extracting the current state of settings such as Allow Grid Charging, Scheduled Charge / Discharge Enabled, etc. Most are there for reference, but again can be useful.

Query Inverter Schedule Details
This can be manually run to display the following schedule settings - the max charge & discharge current, schedule 1 charge and discharge timeslots, plus the same for schedule 2 if set up.

Write Groups

Set Inverter Date & Time
My inverter clock seems to drift slightly, so this runs once per day and sets the inverter clock to the current date and time.

Set Scheduled Charge Current
This runs whenever the user changes the max charge current on the dashboard, or if the Auto SOC logic is enabled. By default it's set to 100 amps.

Set Scheduled Discharge Current
This runs whenever the user changes the max discharge current on the dashboard, but is otherwise never run.

Set Auto SOC Target
I'll cover this in more detail in the next post, but this is where the user can set a desired SOC that the inverter will charge or discharge to during a scheduled period. This is set in the dashboard, but will trigger several other sets of logic.

Set Scheduled Charging Type
On the dashboard, there's a schedule type dropdown (again, more details in the next post) - when the user adjusts this or if there's a change in current battery SOC, this set of logic will either enable or disable schedules, or set the max charging current to 0 amps or whatever the user specifies as max.

Set Inverter Schedule Type
This logic runs based on the selected schedule type selected in the dashboard. Simply put, it enables or disables the schedule on the inverter itself.

Set Grid Charge Type
If you disable / enable grid charge on the dashboard, this will update the associated setting on the inverter.

Set Inverter Power State
This runs if the user toggles the inverter power switch on the dashboard. When off, the inverter will stop providing PV and battery power to the load.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#6

Post by MrPablo »

So, apart from making it so I can pull up the current performance stats on the phone, what else is this Node Red flow useful for?

Auto SOC Schedule
Out of the box, the Solis 5G Hybrid has a pretty simple approach to scheduled charging. If enabled and within the charge slot = charge the battery to 100%.
But what if you only want to top the battery up part way to recover from cloudy days, etc? Normally you'd have to go manually adjust the schedule on the inverter, not great if you want something more autonomous.

This set of logic overcomes that!
Image

On the dashboard, there's a Schedule Type dropdown with three values:

Inverter Schedule
This just follows the inverter timing set on the inverter, charging to 100% as per the usual inverter behaviour.

None
This will disable the use of scheduled charging and discharging completely.

Auto SOC
When selected, the inverter will do the following during a scheduled charging period.
- If the battery SOC is lower than the Auto SOC Charge Target, it will charge the battery at max specified current.
- If the battery SOC is equal to the target, it will set charge current to 0 amps, but keep the schedule enabled. This means any load will be provided by the grid (and PV if generating) only.
- If the battery SOC is higher than the target, it will disable the schedule completely, allowing the battery to be used for any inverter loads.

I hope this very long set of posts come in handy for someone, if there's any questions or suggestions, please let me know!
Last edited by MrPablo on Mon Oct 24, 2022 2:03 pm, edited 1 time in total.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#7

Post by MrPablo »

As an additional point, it's possible to use this flow as a backbone for more complicated automations.
For example, I have an enhanced version which can automatically adjust the target SOC.

This is done though using:
- Solar forecast from Solcast (with automated adjustment to account for shading)
- A database with 30 minute net energy consumption as recorded by Home Assistant, averaged out over 60 days
- A load of messy looking SQL and Node Red logic

Ultimately, this spits out a target SOC at regular intervals that should be sufficient to get me to the next charging period at no lower than 20% SOC.
Image

For example, last night at 00.25, the forecast ran (orange shaded area), suggesting that if I had 86% battery at 04:30, I'd make it through the day.
The blue line is the actual battery SOC, showing how it charged to target, then used the grid until the peak period started.
You can see how the battery has charged more than forecasted - this is because it's been sunnier than expected, plus less load than normal.
Finally, the red shows expected SOC through the day, based on the very latest solar forecast - today it looks like I'll finish at 45% SOC.
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Monitoring & Controlling a Hybrid Solis Inverter

#8

Post by Oldgreybeard »

Brilliant write up, very many thanks for taking the trouble to detail everything. I'm particularly interested in the Elfin WiFi interface module, that sounds as if it is an ideal way around the problem of getting data out of any inverter with an RS485 capability. I'm using an ESP8266, plus an RS485 interface module, to get data from my Sofar inverter and to make data available via MQTT, that Home Assistant can then read. This works OK, but it is a bit slow, the update rate is around once every 30 seconds, and that can be a bit too slow.

I'm tempted to get one of the Elfin modules to play with, and have a go at getting it to work with Home Assistant. I'd quite like to have a go at a better control system for the inverter, too. My inverter and batteries are an outbuilding so it's a bit of a nuisance going out there to manually change the inverter settings, for example, switching it to auto mode when we have a spell of good weather, or changing the battery SoC charge % with changes in the seasons.

I'm not 100% sure I want to do that from HA, my gut feeling is that it might make sense, from a reliability point of view, to have a control sub-system that talks to the inverter and allows settings to be changed, and that also makes data available to HA as required. The Sofar inverters have two RS485 interfaces, so are slightly easier to connect to, but they don't make 5V available to the second interface, it's literally just the RS485 Rx/Tx wires on a two pin socket. I might have a go at trying to find the pinout for the 9 way D connector that the WiFi logger stick connects to, as that must have power available, so might be a better way to connect.
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
MrPablo
Posts: 240
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#9

Post by MrPablo »

Thanks Oldgreybeard! You raise a good point about Home Assistant (or whichever system that's used) acting as the main point of control.

I had been considering an ESP32 running ESP-Home, using that as the middleman. That way I could expose the sensors to HA from that, plus switches, etc, that are also exposed for control.

With a bit of work, it would be possible to program it to reset relevant values to a safe default if it loses contact with HA for a defined period. It's on my growing to-do list...
10x 405W JA Solar panels (4.05kWp) @ 5 degrees
3x 405W Longi panels (1.22kWp) @ 90 degrees
16.5kWh DIY LifePo4 battery
Solis inverter/charger
0.6kW Ripple WT
Oldgreybeard
Posts: 1873
Joined: Thu Sep 09, 2021 3:42 pm
Location: North East Dorset

Re: Monitoring & Controlling a Hybrid Solis Inverter

#10

Post by Oldgreybeard »

I like the idea of using an ESP32 as a the middleman. I've been playing with ESP Home a bit. I discovered some modules that have an ESP32/ESP8266 together with a mains power supply and relays that look to be ideal for making smart switches, and intend to have a go at getting one of these to control our heat recovery ventilation boost, as the existing humidity sensing boost control doesn't work as well as it should. What it needs is something to detect a rate of change of humidity, rather than an absolute value, say a 2% increase in RH over 2 minutes, as an indicator that the shower is running, or we're cooking.

Making an ESP Home sub-system for controlling/monitoring the inverter seems to make sense, especially if I can combine that with a simple display, ideally just mounted on the wall in the hall, as a quick and easy way to see how things are going.
25 off 250W Perlight solar panels, installed 2014, with a 6kW PowerOne inverter, about 6,000kWh/year generated
6 off Pylontech US3000C batteries, with a Sofar ME3000SP inverter
Post Reply