Fronius Solar Power Inverter

dth_powermeter
fronius
dth_solar
dth_hvac
dth_misc

(Tim Flinders) #1

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.


SMA Sunny Boy Inverter Integration
(Keaton Hoskins) #2

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


(Tim Flinders) #3

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.


(Wob76) #4

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.


(Tim Flinders) #5

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.


(Wob76) #6

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

Code

Wob


Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)