Fronius Solar Power Inverter

I wanted to share this Device Type I’ve written to read the realtime, day, month, year values from a Fronius Solar Inverter connected to solar panels.

The Device Type polls and reads the values from the inverter directly on the LAN. It is a little rough and ready at the moment but hopefully someone else will find it useful.

The code for the DeviceType can be found here

Let me know what you think, hopefully you don’t find any bugs.


Is this written with the Modbus Protocol Interface? I am trying to integrate my SMA inverter and the developer documentation states

With the Modbus protocol interface, SMA makes flexible integration of inverters possible

The Fronius Inverter has a local web api that is REST based that can be queried on the local LAN which this devicetype uses.

Looking up Modbus it looks like it is more a serial style interface, I believe there are TCP/IP variants of Modbus. If the interface is TCP/IP with text and not in XML/Json format you may have trouble integrating with SmartThings. SmartThings does not play well with raw TCP/IP messages on the LAN, typically you might need something to translate like a raspberry pi (See LightWaveRF integration)

SMA may have a REST interface either on the LAN or in the cloud but it looks like it is only Modbus.

Since this seems to be the only post about Fronius DH I’ll just have to bring it back from the dead.

Just wondering if you are still using your DH, I’ve made some changes to it and looking to make a few more, my system also has the smart meter attached so I’m pulling in house power and grids feed also. I’m new to groovy and ST, so just fumbling my way through it at the moment.

I’m struggling with how to best format the tiles, I’ve updated to a multi tile for solar that includes the day, year and total energy at the bottom.

I’ve also made it detect and convert Energy readings to kWh and MWh.

I changed the main API call to GetPowerFlow, it may be new since you created your DH, it integrates data from both inverter and smart meter. But it’s missing the meter readings for house and grid. I managed to add a second parselan call, but it processes them a seperate passes, need to look at how to store values so I can do a little maths with some of the numbers.

Anyway I’ll post my code once I progress a little further. Here is a screenshot, night at the moment so no production, main tile fades from offline colour (grey) to online colour (blue), current Max value is 5kw, but need to move that to a preference for different size systems.

I still use the device handler but don’t really have great uses in my house for the results of the handler. I guess I could turn things on when producing electricity. Definitely be interested in looking at what you have done, the interface looks much better using the new options for a DH.

I don’t have the smart meter but could be a configuration thing for the DH to turn that on and off.

I am in the same boat, not automation using this yet, but I do have ideas on using it to automate my AC when power is available.

I am trying to mimic devices I have in my existing automation software (Domoticz) so took most of the maths from the nodered flow I was using to integrate that, not all of the values are used in tiles at the moment.

I think I am happy enough with the tile layout for now, but no doubt I will continue to tweak.

I have tried to stick with standard colours for tiles (as per the docs). I wanted to make a “setting” for the colour max values, but I can’t seem to pull a setting into the colour range area, so tweak as you see fit for your system size\power usage.

Solar goes from Grey (0 = Offline) to Blue (mine is set to 5000) as it produces.
The Grid Value will range from positive (Importing) to negative (exporting) The tile for that goes from Orange (import) to grey (0 = Offline) to Green (Export)

I have no doubt I have some errors in my code, first attempt at a DH and first time using groovy, any fixes or improvements welcome.

Current View



I’m using this new version of Fronius Solar Inverter DH, I put my IP and TCP port (Suppose is port 80) but nothing shoes on mt smarttings app. I don’t have a smart meter, maybe that’s the problem? but shouldn’t it show the PV production? I installed the device handler and the just added a new device poiting it to the DH previously installed. Should I also install some kind of smartapp? sorry but I’m a newbie on this…
Thanks very much

Hi. Sorry to revive an old thread, but I just installed this DH and like Joao above, I am having trouble getting a reading.
Are there any other settings that I could tweak?

Hi @Wob76, Thank you so much for writing this DTH.

In the new Smartthings app the labels are all mixed up and the data displayed is restrictive. The new app only displays ‘energy consumption’ and ’ power meter’.

The total solar produced for the day is displayed as energy consumption in the new app and power meter displays the current solar output.

Also in the logs I see the error at every polling interval
8:41:38 AM: error java.lang.NullPointerException: Cannot get property ‘EnergyReal_WAC_Sum_Consumed’ on null object @line 148 (parse)

Are you please able to look into this. thank you!


Sorry but my smartthings hub lives in the drawer collecting dust. I just wasn’t able to get it to replicate some of the existing automation routines and system integration of my existing automation system so I never fully migrated.

All my code is still up on github for anyone to update as required.


Hi @Wob76 thank you for the prompt reply. I am newbie to the groovy code but I will poke around.

Can you please clarify what do you use for the meter number?