Ginlong Solis solar inverter monitoring

Show us the settings you use for that.

You can only have one master on a modbus serial link.

I’m going to give this a bit more of a try.

My inverter is in the detached garage so I can’t cable it to my openHAB server. I’ve ordered on of these to connect over WiFi. It’s a sister product of the Elfin range, which are pretty good.

I also bought a plug that I’m hoping will mean I can connect to the inverter without having to borrow the connector from the WiFi stick. A bonus is that it includes the male half so I can get to the baseband Modbus that the stick is putting out to see if there’s any chance of using the stick to read the registers instead of an external device.

1 Like

So to read the register with the battery load percentage for example, I use:

mbpoll -a 1 -m rtu -d 8 -P none -b 9600 -t 3 -r 33139 /dev/ttyUSB1 -1 -q -B -0

This gives me this output:

-- Polling slave 1...
[33139]:        50

I configured a Modbus Serial Slave thing with the same values, a poller and a data thing. They all list as online, but an Item value is always NULL. I have seen these errors in openhab.log:

[WARN ] [rt.modbus.internal.ModbusManagerImpl] - Error getting a new connection for endpoint ModbusSerialSlaveEndpoint@164bc49b[portName=/dev/ttyUSB1]. Error was: java.lang.InterruptedException null
[WARN ] [rt.modbus.internal.ModbusManagerImpl] - Could not connect to endpoint ModbusSerialSlaveEndpoint@164bc49b[portName=/dev/ttyUSB1] -- aborting request ModbusReadRequestBlueprint@d8ba82b[slaveId=1,functionCode=READ_INPUT_REGISTERS,start=3005,length=17,maxTries=3] [operation ID 1dfbeee0-7952-4b53-8639-dcc94ec63c94]

I’ve searched the forums, so I have:

  • Added the device to the JVM parameters
  • Upgraded the nrjavaserial library
  • Upgraded the binding to v. 3.1
  • Tried a number of different settings

But no avail…

Binding can’t get at your serial port.
Note that if mbpoll has hold of the port, openHAB cannot.
If you have more than one Bridge Thing referencing the same port, make sure they all match in setting details.

Don’t keep them secret.

Hi @barneyd, did you get anywhere with this? I’m still running the mbpoll-script. I tried the modbus-binding again after upgrading to 3.1, but now I’m getting CRC-errors:

Error with read: org.openhab.core.io.transport.modbus.internal.ModbusSlaveIOExceptionImpl: Modbus IO Error with cause=ModbusIOException, EOF=false, message='I/O exception: IOException CRC Error in received frame. 0 bytes of payload () with invalid CRC of 01 83 ', cause2=null

So that still doesn’t work. I did get a call from my solar panel installer asking me to re-insert the logging stick so they can monitor the installation for errors, so I was wondering if you got it to work.

The plug I bought didn’t fit. I’ve put this on hold as I’m installing an AC coupler battery storage inverter, which has become the priority project.

On the Modbus binding there is an option for RTU encoding. Worth checking that is set correctly? You will get an invalid checksum error if the response from the inverter isn’t encoded as expected by the binding.

The other thing that can cause a checksum error is if another master is polling the same slave at the same time.

Can you tell us how did you go about it? I have always crc error when I attempted to read the registers.

Have you done writing to the inverter’s modbus port? I wonder if we can write to the holding register to control the power output of the inverter depending on the demand. Or any other controls that may be beneficial to us

Bridge modbus:tcp:solcelle [ host="192.168.1.47", port=502, id=1  ] {

    // read-write for coils. Reading 4 coils, with index 4, and 5.
    // These correspond to input register numbers 000005, and 000005
    //Bridge poller coils [ start=4, length=2, refresh=1000, type="coil" ] {
    //    // Note the zero based indexing: first coil is index 0.
    //    Thing data do4 [ readStart="4", readValueType="bit", writeStart="4", writeValueType="bit", writeType="coil" ]
    //    Thing data do5 [ readStart="5", readValueType="bit", writeStart="5", writeValueType="bit", writeType="coil" ]
    //}
    // read-only for input registers. Reading 2 registers, with index 1500, 1501, 1502, 1503.
    // These correspond to input register numbers 301501, 301502, 301503, 301504.
    Bridge poller input_3005 [ start=3005, length=38, refresh=10000, type="input" ]{
        Thing data input_3005 [ readStart="3005", readValueType="uint16", readTransform="JS(milli.js)"]
        Thing data input_3007 [ readStart="3007", readValueType="uint16", readTransform="JS(milli.js)"]
        Thing data input_3009 [ readStart="3009", readValueType="uint16"]
        Thing data input_3014 [ readStart="3014", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3017 [ readStart="3017", readValueType="uint16"]
        Thing data input_3019 [ readStart="3019", readValueType="uint16"]
        Thing data input_3021 [ readStart="3021", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3022 [ readStart="3022", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3035 [ readStart="3035", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3038 [ readStart="3038", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3041 [ readStart="3041", readValueType="uint16", readTransform="JS(tidel.js)"]
        Thing data input_3042 [ readStart="3042", readValueType="uint16", readTransform="JS(prosent.js)"]
    }

    //Bridge poller holding_1100 [ start=1100, length=5, refresh=10000, type="holding" ]{
    //    Thing data holding_1103 [ readStart="1103", readValueType="uint16", writeStart="1103", writeValueType="uint16", writeType="holding" ]
    //}
}
//Solcelleinverter
Number Inverter_Today_KW_once       "Produsert per dag [%.1f kWh]"                             (gPersist, gSolcelle)

Number Inverter_Realtime_ACW        "Produksjon nå AC[%.3f kW]"                                  (gPersist, gSolcelle)      ["Power"]       { channel="modbus:data:solcelle:input_3005:input_3005:number"}
Number Inverter_Realtime_DCW        "Produksjon nå DC [%.3f kW]"                                  (gPersist, gSolcelle)    { channel="modbus:data:solcelle:input_3005:input_3007:number"}
Number Inverter_AlltimeEnergy_KW    "Produsert totalt [%.0f kWh]"                              (gPersist, gSolcelle)        ["Energy"]      { channel="modbus:data:solcelle:input_3005:input_3009:number"}
Number Inverter_Today_KW            "Produsert i dag [%.1f kWh]"                               (gPersist, gSolcelle)        ["Energy"]      { channel="modbus:data:solcelle:input_3005:input_3014:number"}
Number Inverter_ThisYear_KW            "Produsert i år [%.1f kWh]"                               (gPersist, gSolcelle)    { channel="modbus:data:solcelle:input_3005:input_3017:number"}
Number Inverter_LastYear_KW            "Produsert i fjor [%.1f kWh]"                               (gPersist, gSolcelle)    { channel="modbus:data:solcelle:input_3005:input_3019:number"}
Number Inverter_Realtime_DCV        "Spenning DC [%.1f V]"                                     (gPersist, gSolcelle)    { channel="modbus:data:solcelle:input_3005:input_3021:number"}
Number Inverter_Realtime_DCI        "Strøm DC [%.1f A]"                                        (gPersist, gSolcelle)    { channel="modbus:data:solcelle:input_3005:input_3022:number"}
Number Inverter_Realtime_ACV        "Spenning AC [%.1f V]"                                     (gPersist, gSolcelle)        ["Voltage"]     { channel="modbus:data:solcelle:input_3005:input_3035:number"}
Number Inverter_Realtime_ACI        "Strøm AC [%.1f A]"                                        (gPersist, gSolcelle)        ["Current"]     { channel="modbus:data:solcelle:input_3005:input_3038:number"}
Number Inverter_Realtime_ACF        "Frekvens [%.2f Hz]"                                       (gPersist, gSolcelle)        ["Frequency"]   { channel="modbus:data:solcelle:input_3005:input_3042:number"}
Number Inverter_Temp                "Temperatur [%.1f C]"                                      (gPersist, gSolcelle)        ["Measurement", "Temperature"] { channel="modbus:data:solcelle:input_3005:input_3041:number"}

I haven’t tried it, but the PDF I linked to in this post lists all registers you can read from/write to.

How do you use modbus TCP with the solis inverter?

mbpoll don’t have 0x06 or 0x10 function code (write FC) as of the moment

I use a Modbus RTU to Modbus TCP converter.

I’ve managed to connect locally to Sofar inverter through TCP connection on port 8899 of the LSW logger (wifi dongle for sofar). It works of the v5 protocol of the wifi dongle (all dongles which serial numbers starts with 17xxx may work).

See [new binding] Logger LSW for Sofar/Omnik/IE for SolarmanPV based on protocol v5 (iGEN tech)

Within a month or 2 I will install my solar panels and batteries with the Solis RHI 1P-5K. I already checked this whole topic, but for me it’s not clear how to grab the data directly from the inverter. I’m reading a lot about a ‘monitoring stick’, is this included by default? Do I need to order other stuff?

Monitoring stick aka logger grabs data from inverter and pushes it to solarmanprv.com cloud or other. It is up to you whether you have in a package such logger or not. Ask your provider. Ask which logger you would have.

They sold me ‘online monitoring’ and asked if an UTP cable will be present. Will I be able to use the new binding you are developing, or do I need to check the modbus solution (never used this before)?

I have been confirmed by some users that following sticks may work:

  • wifi stick with firmware - LSW3_15_FFFF_1.0.57, those have serial number starting with 17xxx
  • wifi stick with firmware - LSW3_15_FFFF_1.0.65, those have serial number starting with 17xxx
  • eth stick with firmware - ME_08_2701_2.06, those have serial number starting with 21xxx

You can ask about the firmware version your supplier. Or you can ask for serial number (but this may not be precise information)

Am I missing something or is not possible to retrieve data simply using the standard Solis API. The API uses HTTP POST method, and the message transmission is in JSON format. The detailed API documentation is on the link at the bottom of this page API Access - SolisCloud : Service Centre.

2 Likes

I’ve raised a feature request on GitHub for a SolisCoud integration:

1 Like