Fronius inverter integration

Still getting the error
Fronius Inverter URL: http://192.168.0.6/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System&DeviceId=1&DataCollection=CommonInverterData
10:23 AM custom_components/fronius_inverter/sensor.py (ERROR) - message first occured at 10:08 AM and shows up 4 times

Updated to latest in HACS 0.81 now not working ie sensor there but no data. Error below

Unable to connect to Fronius: HTTPConnectionPool(host='192.168.0.6device', port=80): Max retries exceeded with url: /?Scope=System&DeviceId=1&DataCollection=CommonInverterData (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f83de97d890>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

Very strange URL

0.8.1 looks like it’s broken.

But 0.8 looks like it’s working

Left the debug in there - sorry.
Just added a new release v0.8.2

Just updated and half way there get 2 sensors only - i am using scope = system and below error
fronius

Wed Jul 24 2019 16:23:36 GMT+1200 (New Zealand Standard Time)
fronius_inverter: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 261, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 380, in async_device_update
    await self.hass.async_add_executor_job(self.update)
  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_inverter/sensor.py", line 177, in update
    state += self._data.latest_data[self._json_key]['Values'][item]
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'int'

0.8.2 looks like it’s working

just

Better :grinning: thanks

Awesome thanks for the update

Sun has gone down
Capture
error

Unable to connect to Fronius: HTTPConnectionPool(host='192.168.0.219', port=80): Max retries exceeded with url: /solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f1a7da3d610>, 'Connection to 192.168.0.219 timed out. (connect timeout=10)'))

After restart card there but no dater

Capture1

Unable to connect to Fronius: HTTPConnectionPool(host='192.168.0.219', port=80): Max retries exceeded with url: /solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fc727118910>: Failed to establish a new connection: [Errno 113] Host is unreachable'))

Test with Fronius Inverter 0.82
This my config

  - platform: fronius_inverter
    ip_address: "192.168.0.xxx"
    monitored_conditions:
      - ac_power
      - day_energy
      - year_energy
      - total_energy

With the sun down I also get an error

Fronius Inverter URL: http://192.168.#.#/solar_api/v1/GetInverterRealtimeData.cgi?Scope=System&DeviceId=1&DataCollection=CommonInverterData
July 24, 2019, 10:23 AM custom_components/fronius_inverter/sensor.py (ERROR) - message first occured at July 24, 2019, 10:08 AM and shows up 4 times

But everything is displayed correctly my scope is set “System”

I don’t think there is a way to avoid errors in the log when an API endpoint goes offline.

Most API’s are available most of the time, but the Inverter is off for hours.

The only option would be to add sunset and sunrise times to the component and not try to update during those times.

Can someone confirm the exact times that the inverter goes off/online?

interesting ours is set for wifi to be always on but if you are saying this is relating to the inverter being off line I would imagine that would change based on wether it is producing anything ???

If we could change it in the config and use time or sun that will work I think. Some will use sun and overs will use time or automation…

I’ve uploaded a version to the master branch that now defaults to accessing the API from “sunrise” to “sunset”, but can be overridden manually via:
start_time: ‘07:00’
stop_time: ‘17:00’

Let me know how it goes…

Will have to test tomorrow very busy day at work

All seems to be working for me - no errors over night

1 Like

looks like its work.
this is my
config

 - platform: fronius_inverter
    ip_address: "192.168.0.219"
    monitored_conditions:
      - ac_power
      - day_energy
      - year_energy
      - total_energy

do I need to add scope as I have only have one inverter. an no powerflow

morning after updating to .97.2 get the attached when there is no sun ie shows unknown

instead of zero ??

It’s very hard to force a value after an update in this case.

We ideally don’t want to drop all values to zero each night (such as yearly total) when there is no data available, which conflicts with getting no data if the system is restarted at night.

All good just use to show zero

@safepay just got your new update. Updating it now. :slight_smile: