Read out values from SMA Sunny Island

Hello community,

I want to read out some values of my SMA Sunny Island like the battery percentage and the current charging speed, to do some automation in my home.
Does anyone know how to do that on a Sunny Island device? I know that it supports modbus, but I don’t understand how to find the right registers.

Thanks for your help!

1 Like

Hi, I’ve made some re-engineering. Now I have some values.
Do you still need help?

Thanks for your help, actually I already found out how to use the Modbus binding to extract the data.

That’s my script, which I have in things.

Bridge modbus:tcp:sunnyisland [ host="##ipv4##", port=502, id=3, connectMaxTries=3] {

// SMA battery loading in percent
Bridge poller ISLAND_load_bat_percent [ start=30845, length=4, refresh=5000, type=“input” ] {

             Thing data lISLAND_load_bat_percent [ readStart="30845", readValueType="uint32" ]


             }

// actual_bat_current
Bridge poller ISLAND_actual_bat_current [ start=30843, length=4, refresh=5000, type=“input” ] {

             Thing data ISLAND_actual_bat_current [ readStart="30843", readValueType="int32", readTransform="JS(divide1000.js)"  ]


             }

// bat_temp
Bridge poller ISLAND_actual_bat_temp [ start=30849, length=4, refresh=5000, type=“input” ]

             {

             Thing data ISLAND_actual_bat_temp [ readStart="30849", readValueType="int32",readTransform="JS(divide10.js)" ]

                             }

// today charge energy
Bridge poller ISLAND_today_charge_energy [ start=30595, length=4, refresh=5000, type=“input” ]

             {

             Thing data ISLAND_today_charge_energy [ readStart="30595", readValueType="uint32" ]

                             }

// today discharge energy
Bridge poller ISLAND_today_discharge_energy [ start=30597, length=4, refresh=5000, type=“input” ]

             {

             Thing data ISLAND_today_discharge_energy [ readStart="30597", readValueType="uint32" ]

                             }

// battery charge status
Bridge poller ISLAND_bat_charge_status [ start=31057, length=4, refresh=5000, type=“input” ]

             {

             Thing data ISLAND_bat_charge_status [ readStart="31057", readValueType="uint32" ]

                             }

// battery charge count
Bridge poller ISLAND_battery_charge_count [ start=30857, length=4, refresh=5000, type=“input” ]

             {

             Thing data ISLAND_battery_charge_count [ readStart="30857", readValueType="int32" ]

                             }

// actual battery charge in Watt

    Bridge poller ISLAND_actual_bat_charge [ start=31393, length=4, refresh=5000, type="input" ]

             {

             Thing data ISLAND_actual_bat_charge [ readStart="31393", readValueType="int32" ]

                             }

// actual battery discharge – funktioniert nicht

// Bridge poller ISLAND_actual_battery_discharge [ start=31395, length=4, refresh=5000, type=“input” ]

// {

//             Thing data ISLAND_actual_battery_discharge [ readStart="31395", readValueType="uint32" ]

  //                           }

// actual power island grid / Wirkleistung ISLAND in W

    Bridge poller ISLAND_actual_power [ start=30775, length=4, refresh=5000, type="input" ]

             {

             Thing data ISLAND_actual_power [ readStart="30775", readValueType="int32" ]

                             }

// actual Absorptionsphase ja/nein

    Bridge poller ISLAND_Absorptionsphase [ start=31059, length=4, refresh=5000, type="input" ]

             {

             Thing data ISLAND_Absorptionsphase [ readStart="31059", readValueType="uint32" ]

                             }

}

Which values did you get?

I only read out these values:

Bridge modbus:tcp:si6000 [ host="ip", port=502, id=3, connectMaxTries=10 ] {
    Bridge poller input1 [ start=30845, length=2, refresh=10000, type="holding" ] {
        Thing data battery_percent [ readStart="30845", readValueType="uint32" ]
    }

    Bridge poller input2 [ start=30775, length=2, refresh=10000, type="holding" ] {
        Thing data power [ readStart="30775", readValueType="int32" ]
    }
}

To see if it discharges or charges you have to look if the power input is negative or positive.

Ok, I’m still looking for the variables, which indicate, if the system makes battery management or not.
f. ex: full-loading or equal-loading
But I didn’t find the fully dataset…

You can combine these pollers for efficiency, example

// SMA battery registers
// reads 30843 - 30846
Bridge poller ISLAND_bat_stuff [ start=30843, length=4, refresh=5000, type=“input” ] {
             Thing data ISLAND_actual_bat_current [ readStart="30843", readValueType="int32", readTransform="JS(divide1000.js)"  ]
             Thing data ISLAND_load_bat_percent [ readStart="30845", readValueType="uint32" ]
             }

You’d need to adjust channel links to Items of course

Anyone got already a control via Modbus? Like manually start and stop charging from grid?