Monitoring & Controlling a Hybrid Solis Inverter

SonsOfHigSolar
Posts: 25
Joined: Tue Sep 26, 2023 4:00 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#71

Post by SonsOfHigSolar »

Dear Mr Pablo,

Apologies for adding another message but have you perchance had time to have a look? Thank you again!

James
MrPablo
Posts: 292
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#72

Post by MrPablo »

I'll confess that I completely forgot about this!
I'll update this weekend though, thanks for reminding me.
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
64kWh Kia E-Niro
MrPablo
Posts: 292
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#73

Post by MrPablo »

Yet again, I forgot to update this thread when I said I would. This time however, my brain randomly poked itself and remembered to revisit it.

Below is a guide showing end to end how to query specific register(s) from the Solis hybrid inverter, using Node Red.

First, identify what registers you're interested in - this can be a single register, multiple that are next to each other, or completely disparate registers.
There's several documents out there that show what registers are available, I often use this one - https://www.scss.tcd.ie/brian.coghlan/E ... 8-1854.pdf

It's important to realise that registers are grouped into types, with different function codes used to query / write data.
Here's how it looks in this document.
Image
Most of the useful information can be found in the 3X register range, all of which is read only and with no risk of accidentally changing a setting.

Secondly, head to that section of the documentation.
Image

And then to the registers you're interested in
Image

In this case, I want to query:
- 33130 to 33131
- 33133
- 33134
- 33135
- 33137
- 33138

You'll notice these register addresses are all quite close to each other, with a total range of 33130 to 33138 - 8 registers (or 16 data frame bytes).
If querying multiple registers, it's sensible to request them in one batch, and the Solis inverter can support up to 100 data frame bytes (50 registers).
For reference, each register address is made up of two bytes.

Heading to Node Red, you'll need the following:
Image

Injection node will trigger your query when clicked.
Function node contains the query parameters.
Modbus-Flex-Getter node runs the actual query.
Buffer Parser node splits out the single response into multiple outputs.
Debug nodes show the actual results for testing purposes.

In the next post, I'll show how these nodes need to be configured.
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
64kWh Kia E-Niro
MrPablo
Posts: 292
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#74

Post by MrPablo »

Once you have defined the registers you're interested in, you can configure the function node like below.

Image

fc - This is the modbus function needed to read or write to a register. As shown in the last post, this register range uses function 4.
unitid - The modbus address of the inverter. Earlier in the thread, I explained this is generally set to 1, but you can set this on the inverter itself.
address - The address of the first register to be read / written to. Even if you are referencing several registers, it's always the first one.
quantity - The number of data frame bytes - generally 2 x count of registers. For the Solis, this should be a max of 100.

The Flex-Getter node will be set up as per the guidance earlier in this thread.

Next, the Buffer Parser node.
As multiple registers are being queried, the inverter will send all information in one go, but it's likely you'll want to split these out.

Image

This is a very useful node, and relatively simple to set up. The lower window contains the configuration for each of the registers you're querying.

First, define the data type - use the modbus document earlier to confirm the type per register.
Take 'Meter Active Power', this has a type of S32 or Signed 32 bit integer. This is also written as int32, but notice there are two options - the Solis inverter uses Big Endian, or be.

Next, enter the name of the register for your reference.
After that, length is always set to 1. The length is already determined using the data type.

Offset is how you match the register address to the right output.
Offset will always start at 0 and increment upwards, with each complete register going up by 2 (remember there's 2 data frame bytes per register).
For example, take Battery Voltage. This has an address of 33133, compared to the starting address of 33130, giving a difference of 3. Multiply the 3 by 2 data frame bytes and you have an offset of 6.

I don't use the mask function, but there are guides online if you're interested.

Finally, the scale option. Sometimes a register stores information with a scale applied. For example, battery voltage is stored at 10 = 1.0V (as per the Solis modbus document), so you'll need to rescale the output to get a 'correct' number.
Applying a scale factor of 10 means that 499 becomes 49.9v.

Finally, the debug nodes are used just so the output can be easily checked. See below for an example.

Image


So, there you go. A simple guide to how the function and buffer parser nodes can be used to read or write Modbus registers using Node Red.
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
64kWh Kia E-Niro
SonsOfHigSolar
Posts: 25
Joined: Tue Sep 26, 2023 4:00 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#75

Post by SonsOfHigSolar »

Thank you so much! You're a hero! That's perfect.
MrPablo
Posts: 292
Joined: Mon Oct 17, 2022 1:26 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#76

Post by MrPablo »

Much earlier in this thread, I mentioned how I'd prefer a solution that used ESPhome instead of Node Red. The benefits would include more robust logic that didn't rely on good connectivity with a server, plus easier integration in Home Assistant.

I finally finished this work and have installed DIY ESPhome based controllers on 3 Solis inverters so far.
I'm planning to upload the code, PCB & CAD files alongside documentation on GitHub in very near future, but for now here's a few pictures.

Image
I designed a very basic carrier PCB that mass produced ESP32 and RS485 modules plug into - the minimum order was 5, so I have 2 spare at the moment.

Image
The enclosure is 3D printed, no longer than the main body of the Solis provider logging stick - I'll be sharing the CAD files so others can print their own if needed.
The connector is an Exceedcon EC04681-2023-BF, I ordered 3 samples from the manufacturer on Alibaba here.

Image
It's a compact package when fitted, plus 5v, ground and 2 GPIO pins are available in the bottom connector.
I use this connect to control 2 5v PWM fans for automatic cooling, but you could trigger a relay or connect a sensor instead.
The unit is powered by the inverter itself, so no need for a separate power supply.


In terms of features, there's quite a lot...

Almost 60 sensors, most refreshed with 1s interval:
  • PV voltage, current & power - per MPPT and total
  • Inverter, house, battery and backup power
  • Battery voltage, current & power
  • Meter voltage, current & power
  • Battery SOC, health, voltage, current & power
  • Daily MPPT, battery, import and export energy
  • Inverter status flags (errors & warnings, etc)
Ability to change inverter settings:
  • Schedule start and end times, for all 3 slots
  • Schedule charge & discharge current
  • Inverter output limitation
  • Grid charge on / off
  • Inverter mode (self use, feed in priority)
Finally, smart control logic. Auto SOC scheduling expands on the existing inverter scheduling, making it possible to finely control how your batteries are charged.
  • Multiple schedule types (inverter, none or auto SOC based)
  • Target charge SOC - terminate charging at a specific battery percentage
  • Target discharge SOC - force export to a specific battery percentage (useful for Flux, etc).
At the moment I use my control stick via Home Assistant, but it should be possible to control via a web browser if needed (I haven't tested performance yet though).
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
64kWh Kia E-Niro
User avatar
Fintray
Posts: 1685
Joined: Mon May 31, 2021 6:37 pm
Location: Aberdeenshire

Re: Monitoring & Controlling a Hybrid Solis Inverter

#77

Post by Fintray »

Impressive work there Mr Pablo :xl:
3.87kWp PV
10.24kWp PV SolarEdge system
Tesla Powerwall 2
100 x 47mm Navitron tubes (still being installed!) Now likely to be removed for more PV.
MK2 PV router DHW diverter
Morso 5kW WBS
Vaillant AroTherm 10kW ASHP
Nissan Leaf
Tinbum
Posts: 1195
Joined: Mon May 31, 2021 9:55 pm

Re: Monitoring & Controlling a Hybrid Solis Inverter

#78

Post by Tinbum »

Fintray wrote: Wed Jun 05, 2024 11:14 am Impressive work there Mr Pablo :xl:
Ditto
85no 58mm solar thermal tubes, 28.5Kw PV, 3x Sunny Island 5048, 2795 Ah (135kWh) (c20) Rolls batteries 48v, 8kWh Growatt storage, 22 x US3000C Pylontech, Sofar ME3000's, Brosley wood burner and 250lt DHW
Post Reply