Fronius Solar Component

I’ve just seen this thread regarding Fronius solar inverters and thought that since the API is available and a few people have integrated in various ways, it would be nice to have a proper core HA component for these. These solar inverters seem to be quite popular so I’d imagine plenty of people would end up using the component.

There are some other links I found if it helps in any way.

Fronius API site

someones git for API interface

another git for API interface

I have no coding ability so putting it out there for those that do.

As it turns out, there was a HA integration started but never finished? Anyone with the skills to complete it?

https://github.com/home-assistant/home-assistant/pull/8931

I put together this custom component which only deals with the Fronius inverter at this point and pulls out all the info necessary.

5 Likes

The component that was started by @nielstron has been merged in the dev branch of HA. I tried it today but couldn’t get it going. I did also try the CC from @safepay which works. I think it would benefit the community if that now official component would be used and tested to iron out any problems.
As soon as I get that one working I will start using that.

I’m using this custom component and it is working perfectly. I’m no programmer but wondering if maybe this should have been the core version instead of what is now coming out in v0.96

Big thanks to @safepay for your work mate, much appreciated. (now I just need to sort out a monitor for power usage…)

1 Like

One issue I have discovered is that if I restart HA while the inverter is offline (at night) then the component fails to load:

Error while setting up platform fronius
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 126, in _async_setup_platform
SLOW_SETUP_MAX_WAIT)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/fronius/sensor.py”, line 74, in setup_platform
if SENSOR_TYPES[variable][0] in fronius_data.latest_data:
TypeError: argument of type ‘NoneType’ is not iterable

which leaves me with:

image

I’m just waiting for the sun to come up so I can restart HA again to make sure it comes back to life, but it would be nice if this didn’t happen. Unfortunately I can’t help, only report :pensive:

Dave. Please make sure you are using the latest release. I have tweaked it a bit so best to do that first.

1 Like

Ok cheers. I just grabbed the latest and will see how it goes. Thanks

@safepay. Just wanted to say thank you for the component…

1 Like

@safepay - want to add another thanks for the fronius component. Appreciate it!

1 Like

After some mish mashing with the other ideas I tried yours…restart hassIO…“HUH! IT works!” …

Another thanks!

1 Like

@safepay After struggling with why I could not get the core integration working I found this post (which talks about a couple of custom components that are working) so I decided to give one a try…works without any problems…Thanks for your work!

Anyone else looking for the working solution for now…try here: https://github.com/safepay/sensor.fronius

1 Like

@safepayJust an update and a question. The component has proven to be excellent over the past 24 hours and I have been busy today connecting a fronius smart meter. That went well and connected very easily and quickly detected by the inverter. My question is as I already had the three extra sensors for the smart meter in my config (initially they did not appear which I thought was nifty) I was expecting that after the smart meter was connected and I restarted HA they would appear…sadly after several restarts they have not appeared.

I know the meter is working because I now see extra information both on the local IP application and the solarweb application.

Any ideas what to try in HA?

Here is my config:

  - platform: fronius_inverter
    ip_address: 192.168.1.181
    monitored_conditions:
      - ac_power
      - day_energy
      - year_energy
      - total_energy
      - ac_current
      - ac_voltage
      - ac_frequency
      - dc_current
      - dc_voltage ### all the above are working
      - grid_usage ### these are the three that are not appearing in the /developer-tools/state
      - house_load
      - panel_status

Cheers!

Hi Steve,

You probably need to set the PowerFlow boolean:
powerflow: True

1 Like

Cheers…I didn’t notice that in the documentation…found it now.
Case of RTFM…better!

1 Like

This component has been working perfectly however I am noticing (not sure exactly when it started) that the values for Year Energy and Total Energy seem to be incorrect… I don’t think my system has generated the below figures somehow!

image

I am I the only person seeing this behaviour?

I am also getting “wrong” values for Year and Total Energy. Instead of showing 1000 Wh (or 1 MWh), it shows 1000 MWh.

I am also using the Fronius compnent, works great, thanks to @safepay
Just one question I have regarding the polling interval. Can it be changed somehow to get faster updates?
Currently it looks like it updates the figures every 60 secs, I would like to change that to like 10 secs or so.
regards

@safepay I have been using your Fronius Component for over 4 months now and its fantastic. I just updated to the latest release from https://github.com/safepay/sensor.fronius as I noticed you had made an update 19 days ago and I had noticed the below error when I was trying to remove all the errors under 0.107.7

020-04-18 04:02:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 425, in _async_add_entity
    raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.fronius_ac_power. Platform fronius_inverter does not generate unique ID

Although there is this error I cannot fault the way the component is working?
Any ideas whats the cause of this?

Cheers again and this nothing urgent as outwardly the component is working well at the moment.

Just updated to 109 and get the below error in the logs
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for fronius_inverter doing I/O at custom_components/fronius_inverter/sensor.py, line 325: result = requests.get(self._build_url(), timeout=10).json()

1 Like