Modbus Config for Fronius Gen24 Inverter

Is someone here willing to share Thing & Items File for Fronius Gen24 Inverter?

I know there is an API available for Fronius, but I want to write few configuration settings via Modbus e.g. Minimum SoC from storage or the option Charge from Grid.


isn’t fronius sunspec ? start with

then whatever you want to write to just give it a try yourself and post here what did not work or worked and surely someone will help.
so start browsing the relevant pdf for your inverter

1 Like

With Sunspec I can read e.g. the Inverter Status


Bridge modbus:tcp:bridge "Fronius Inverter Bridge" [ host="", port=502, id=1, enableDiscovery=false ]
Thing modbus:inverter-three-phase:bridge:fronius "Fronius Gen24" (modbus:tcp:bridge) [ address=40069, length=112, refresh=15 ]


Number:Energy Fronius_Energy "AC Lifetime Energy" {channel=" modbus:inverter-three-phase:bridge:fronius:acGeneral#ac-lifetime-energy"}
String Fronius_Modbus_Status "Fronius Modbus Status" {channel=" modbus:inverter-three-phase:bridge:fronius:deviceInformation#status"}
Number:Frequency Fronius_ac_frequency "AC Frequency" {channel=" modbus:inverter-three-phase:bridge:fronius:acGeneral#ac-frequency"}
Number Fronius_Vendor_Status "Fronius Vendor Status" {channel=" modbus:inverter-three-phase:bridge:fronius:deviceInformation#status-vendor"}

For the Vendor Status I get at the moment the value 2

In a use case I want to try later, writing values to modbus, which is not supported via Sunspec, I have to read/write with “native” modbus.

So I had a look in the Modbus Info from Fronius to read the Operating State and some other registers.

With a little bit try & error I got following working

Bridge modbus:tcp:inverter1 "Fronius Inverter Bridge" [ host="", port=502, id=1, connectMaxTries=3] {

        Bridge poller DevType "Fronius Inverter 1 Poller Device Type" [ start=40108, length=1, refresh=60000, type="holding" ] {

                Thing data type "Fronius Inverter 1 Device Type" [ readStart="40108", readValueType="uint16" ]


        Bridge poller AC_Data "Fronius Inverter AC Data" [ start=40069, length=27, refresh=5000, type="holding" ] {

                Thing data ACPower "Fronius Inverter ACPower" [ readStart="40083", readValueType="uint16" ]


        Bridge poller DC1_Data "Fronius Inverter DC Data String 1" [ start=40253, length=26, refresh=5000, type="holding" ] {

                Thing data DC1_Voltage "Fronius Inverter DC Voltage String 1" [ readStart="40273", readValueType="uint16", readTransform="JS(smalimit1000.js)" ]



Number:Dimensionless        Fronius_Vendor_Status_Modbus                                {channel="modbus:data:inverter1:DevType:type:number"}
Number:Power                Fronius_ACPower_Modbus        "AC Power [%.0f W]"           {channel="modbus:data:inverter1:AC_Data:ACPower:number"}
Number:ElectricPotential    Fronius_DCVolt1_Modbus        "Voltage Input 1 [%.2f V]"    {channel="modbus:data:inverter1:DC1_Data:DC1_Voltage:number"}

But this is only reading. Does someone have examples for writing?

well what registers are you trying to write and show what the manual demands for those registers because the ones you show are read only.

The two registers I would like to write are


Can you help me how .things and .items should be?

Depending on solar prognosis for the next day, I will change Minimum reserve. Good prognosis next day, then I will set low minimum reserve for the night. Discharge storage in the night, recharge during the day and I will still have black out reserve.
Bad prognosis for the next day, I will set higher minimum reserve, so that there is more left for blackout.
If storage is already low, and there is bad prognosis for the next day, I will charge from grid to get some energy in the storage.


Bridge poller input [start=40351, length=4, refresh=500, type="holding" ]{
Thing data holding40351 "blablab"  [ readStart="40351", readValueType="uint16", writeStart="40361", writeValueType="uint16", writeType="holding"]
Thing data holding40361 "blablab"  [ readStart="40361", readValueType="uint16", writeStart="40361", writeValueType="uint16", writeType="holding"]
Number    holding40351    "blabla [MAP(]"                {channel="modbus:data:blab:input:holding40361:number"} file transformation

Thank you very much for your help.
As soon as I receive my storage, I will try!!!

Hi Markus,
have you already received your storage?
If yes have you managed to change for example the “charging from grid” status?
I am at the point that I can readout the data but I am not able to change the register over modbus.

Bridge modbus:tcp:froniusWR [host="", port=502, id=1]{
Bridge poller input [start=40361, length=1, refresh=500, type="holding"]{
Thing data holding40361 "blablab" [readStart="40361", readValueType="uint16", writeStart"40361", writeValueType="int16", writeType="holding"]
Switch holding40361 "blabla" {channel="modbus:data:froniusWR:input:holding40361:switch"

BR Daniel


yes it is working for me.


Bridge modbus:tcp:inverter1 "Fronius Inverter Bridge" [ host="", port=502, id=1, connectMaxTries=3] {
Bridge poller ChargeGrid "Charge from Grid" [ start=40360, length=1, refresh=5000, type="holding" ] {

                Thing data ChargeGridReg "Charge from Grid" [ readStart="40360", readValueType="int16", writeStart="40350", writeValueType="int16", writeType="holding"]

 Bridge poller StorCtl_Mod "Storage Control Mode" [ start=40348, length=1, refresh=5000, type="holding" ] {

                Thing data StorCtl_Mod "Storage Control Mode" [ readStart="40348", readValueType="int16", writeStart="40348", writeValueType="int16", writeType="holding"]


        Bridge poller InOutWRteReg [start=40354, length=3, refresh=5000, type="holding" ] {
                Thing data ChaSt "ChaSt"  [ readStart="40354", readValueType="int16"]
                Thing data OutWRte "OutWRte"  [ readStart="40355", readValueType="int16", writeStart="40355", writeValueType="int16", writeType="holding"]
                Thing data InWRte "InWRte"  [ readStart="40356", readValueType="int16", writeStart="40356", writeValueType="int16", writeType="holding"]



Number                      ChargeGrid_item                                             {channel="modbus:data:inverter1:ChargeGrid:ChargeGridReg:number"}
Number                      StorCtl_Mod_item                                     {channel="modbus:data:inverter1:StorCtl_Mod:StorCtl_Mod:number"}
Number                      OutWRte_item                                             {channel="modbus:data:inverter1:InOutWRteReg:OutWRte:number"}
Number                      InWRte_item                                             {channel="modbus:data:inverter1:InOutWRteReg:InWRte:number"}
Number                      ChaSt_item  "BYD Charge State [MAP(]"                                           {channel="modbus:data:inverter1:InOutWRteReg:ChaSt:number"}

Map File:


Rule for charging from grid with 2,5kW with my HVS 10,24kWh

sendCommand (OutWRte_item, -2400) // 2,5kW
sendCommand (InWRte_item, 5000)
sendCommand (StorCtl_Mod_item, 2)
sendCommand (ChargeGrid_item, 1)

Values for StorCtl_Mod, OutWRte, InWRte are described in the Fronius Modbus Documentation

1 Like

Thank you.
I will try this in the evening, I think I forgot the Adress-1.

BR Daniel

It works fine now, thanks for your support.

BR Daniel

1 Like