safepay / sensor.fronius Goto Github PK
View Code? Open in Web Editor NEWA Fronius Sensor for Home Assistant
License: MIT License
A Fronius Sensor for Home Assistant
License: MIT License
Hi,
I make a powerflow query i have this result:
{
"Body" : {
"Data" : {
"Inverters" : {
"1" : {
"DT" : 78,
"E_Day" : 2104.699951171875,
"E_Total" : 2001023.125,
"E_Year" : 2104.699951171875,
"P" : 0
}
},
"Site" : {
"E_Day" : 2104.699951171875,
"E_Total" : 2001023.125,
"E_Year" : 2104.699951171875,
"Meter_Location" : "grid",
"Mode" : "meter",
"P_Akku" : null,
"P_Grid" : 430.77999999999997,
"P_Load" : -430.77999999999997,
"P_PV" : null,
"rel_Autonomy" : 0,
"rel_SelfConsumption" : null
},
"Version" : "12"
}
},
"Head" : {
"RequestArguments" : {},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2020-01-01T21:04:20+01:00"
}
}
Can you add this two variables?
This is a description of these variables:
mandatory field
available since Fronius Hybrid version 1.3.1-1
available since Fronius Non Hybrid version 3.7.1-2
current relative self consumption in %, null if no smart meter is connected
number rel_SelfConsumption;
mandatory field
available since Fronius Hybrid version 1.3.1-1
available since Fronius Non Hybrid version 3.7.1-2
current relative autonomy in %, null if no smart meter is connected
number rel_Autonomy;
Thank you.
Peter.
Hello,
Please add the version key to the manifest file, cause as of homeassistant version 2021.6 (June 2021), the version key is required to load a component. I have seen you have responded to another request that in v0.9.3 the version has been added. I have installed v0.9.3 but I still get the following message.
Thanks a lot in advance
Regards
Logger: homeassistant.loader
Source: loader.py:786
First occurred: 12:07:22 (1 occurrences)
Last logged: 12:07:22
No 'version' key in the manifest file for custom integration 'fronius_inverter'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'fronius_inverter'
The current sensor.fronius
add-on is based on v1 of the Fronius Solar API. I have an older Fronius Datalogger Web that uses v0 of the Fronius Solar API. I was able to make the add-on work with my equipment by changing the URL on line 21 of sensor.py
to read:
_INVERTERRT = 'http://{}/solar_api/GetInverterRealtimeData.cgi?Scope={}&DeviceIndex={}&DataCollection=CommonInverterData'
... and line 338 to read:
json_response = await response.json(content_type=None)
That's it. No changes are needed for the PowerFlow or Meter URLs, since neither were supported in v0 of the Solar API, as far as I can tell. I think that the changes to line 338 should work with either API. The reason for the change that I made to line 338 is that v0 of the Solar API returns a valid json response, but incorrectly tags it with a mime type of javascript. Disabling content checking in the json() call fixes the issue.
If we could have a config option to let the end user pick a version of the Solar API (with v1 as a default), then line 21 could select the correct URL format for that version of the API. Alternatively, a call to http://{}/solar_api/GetAPIVersion.cgi
will return "1" for v1 of the API and HTTP error 404 for v0 of the API, allowing you to test which version of the API is used by your Fronius device, then use that information to automatically pick the correct URL format.
Copies of the Fronius Solar API documentation are available here:
v0 -- https://www.fronius.com/~/downloads/Solar%20Energy/Operating%20Instructions/42%2C0410%2C2011.pdf
v1 -- https://www.fronius.com/~/downloads/Solar%20Energy/Operating%20Instructions/42%2C0410%2C2012.pdf
I've been having problems with the integration losing the entities ... in that they become unavailable.
I can fix the problem removing the entities, removing the integration from the config, rebooting, re-inserting the config back again and the rebooting again ... a painful process. Occasionally that doesn't work and I need to rename the integration so it creates brand new entities, losing all my history. I'm not sure if there's a better way, but it's the only way I know how to fix it.
It seems to happen on a complete reboot of the server or when patching Home Assistant. It occasionally happens on a soft reboot. It never used to be unstable, but I think it may be an issue with later patches breaking it.
Has any one got time to add support for the new energy dashboard?
I think all that's needed is to add support for the new statistics framework by adding to each sensor sensor a state_class that is set to measurement.
I've had to go back to 0.8.9 as the Day energy is coming up as 0.
hi, ist there any plan for an integration witch shows the current state of the Fronius Wallbox in Home-assistant. The Wallbox is connected with the Smart meter via WiFi.
manifest.json file is not updated to the newest version (0.9.5) accordingly
{ "domain": "fronius_inverter", "name": "Fronius", "documentation": "https://github.com/safepay/sensor.fronius/blob/master/README.md", "dependencies": [], "codeowners": ["@safepay"], "requirements": [], "version": "v0.9.3" }
I think sensor.py is missing import asyncio
Got Timeout Error and find the error in log file that asyncio.TimeoutError cannot be resolved.
Fixed it by importing asyncio module
While the inverter is automatically offline (by nights and by long sunless days of nordic winter when the inverter can't produce enough power to turn on) sensor can't connect. That is just a fact, not an error. Allowing to pause polling while sun is under horizon could be useful. But I don't know how we could recognise those almost sunless days. That would be useful too. But trusting "could data" might be an issue.
Sorry not sure if right place to post,
Love the new add on many thanks, much cleaner and better implementation then what i am using,
I use 3 other sensors which are not in the addon on i think?
Although i also have the fronius smart meter, so not sure if these are available to others without it?
These are
P_Grid which will give me a negative value if sending power to grid, or positive value if drawing from grid.
P_Load - Must be a smart meter one i guess?
P_PV - Shows amount of energy being produce by panels? None of the plugin ones seem to match that one so not sure if i am missing it?
Thanks
Ben
This is the below i have been using, I had a sensor 1, which was day total i have removed as was in the plugin,
#FRONIUS GRID USAGE NEGATIVE VALUE IS SENDING POWER BACK POSITIVE IS DRAWING FROM GRID
sensor 2:
platform: rest
resource: http://IPOFINVERTER/solar_api/v1/GetPowerFlowRealtimeData.fcgi
name: Fronius Grid Usage
value_template: '{{ (value_json.Body.Data.Site.P_Grid ) | round(3) }}'
unit_of_measurement: W
#FRONIUS LOAD
sensor 3:
platform: rest
resource: http://IPOFINVERTER/solar_api/v1/GetPowerFlowRealtimeData.fcgi
name: Fronius House Load
value_template: '{{ (value_json.Body.Data.Site.P_Load ) | round(3) | replace("-","") }}'
unit_of_measurement: W
#FRONIUS PANEL GENERATION CURRENTLY
sensor 4:
platform: rest
resource: http://IPOFINVERTER/solar_api/v1/GetPowerFlowRealtimeData.fcgi
name: Fronius Panel Status
value_template: '{{ (value_json.Body.Data.Site.P_PV ) | round(3) | replace("-","") }}'
unit_of_measurement: W
This is more of a request. Not sure if this is possible or not, but could we get daily_grid_usage and daily_house_load so easy comparison could be made with daily_energy?
Hello Safepay, Thanks again for working on this,
As per your comments, my powerflow seems to stop working during sundown,
Im sure making the times as you have it the "default" is probably best for most users which only have the inverter and not the smart meter,
But, I have the smart meter, and would love to see stats during the night please,
Can you add an option to disable the timer,
On a side note, the configurator checker kept throwing errors anytime i tried to use the end_time config line,
Invalid config for [sensor.fronius_inverter]: [end_time] is an invalid option for [sensor.fronius_inverter]. Check: sensor.fronius_inverter->end_time. (See ?, line ?). Please check the docs at https://home-assistant.io/components/sensor.fronius_inverter/
In the section Custom Power Wheel Card (if using a Powerflow)
it describes creating a utility_meter sensor to provide the necessary information for energy monitoring, however, if using PowerFlow rather than smartmeter you have neither sensor.fronius_smartmeter_energy_ac_consumed
nor sensor.fronius_smartmeter_energy_ac_sold
.
Do I need to enable both powerflow and smartmeter?
Next issue is that those inputs are in MWh and I think I need them in kWh? Do I need to create a template sensor to convert it into the correct unit?
Sorry if this covered somewhere but I couldn't find it.
What's the difference between SmartMeter and PowerFlow?
I have a Fronius Symo 3.7-3-M with a datamanager card and a Smart Meter 63A. Reading through the documentation there's a noteSet to True if you have a PowerFlow meter (SmartMeter)
- thus I've enabled both powerflow
and smartmeter
parameters. If I disable one of them, some data will be missing. In my understanding based on the above, if I have a Smart Meter, i also have a PowerFlow, right?
Why are these separate?
See issue detailed in the home assistant forums https://community.home-assistant.io/t/fronius-inverter-integration/19274/308
I have data being gathered via SNMP from my internet gateway and nas. But with the nas SNMP config it breaks the fronius integration - i get timeout errors ( no data gets collected). When I comment it out it starts to work again.
The developer docs for 2021.9 suggested that a planned change to energy sensors would be graceful allowing until 2021.11 for developers to make appropriate changes. This is not the case so suggest holding off on 2021.9 until a new release can be tested.
Thank you for this integration and your work! Great stuff!
In my log I get this error:
Failed to update: connection error
and the relevant sensors stay unknown
Fronius firmware:
Datalogger ID: 240.1147052
Software version: 3.16.7-1
Search for Firmware Update
Fronius Solar Net connection: Connected
Solar.web connection: Connected
Fronius integration v0.9.5
HA Config:
- platform: fronius_inverter
ip_address: http://192.168.1.25
When I go to the address mentioned in your readme I get a 404 error but both urls mentioned below it do work.
http:///GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData
404 Not Found
I really need the array voltage and amperage so I do hope to get this working again.
Hi,
Since my upgrade to.109, i could see this error filling up my log files. Everything else is working fine though.
2020-05-08 09:33:14 WARNING (MainThread) [homeassistant.util.async_] 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()
2020-05-08 09:33:15 WARNING (MainThread) [homeassistant.util.async] 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 356: result = requests.get(self._build_url(), timeout=10).json()
Current Version : 0.9.2
Any help is greatly appreciated
Hello, I'm currently trying to integrate and display at least one Fronius.
I don't get any error messages in the log, but the display is 0 no matter where
i have a fronius gen24 with 2 smart meters + 1x fronius symo in the same building.
later I wanted to add a second symo with a smart meter that is external.
But I can't even get one to run
I have now installed release 0.9.6
my config looks like this
sensor:
# - platform: fronius_inverter
# ip_address: http://192.168.4.96
- platform: fronius_inverter
name: Gen24Home
ip_address: http://192.168.10.96
powerflow: True
power_units: kW
smartmeter: True
utility_meter:
# calculate daily energy consumed from grid (input must be in kWh)
grid_consumed_energy_day:
source: sensor.fronius_smartmeter_energy_ac_consumed
cycle: daily
# calculate daily energy sold to grid (input must be in kWh)
grid_sold_energy_day:
source: sensor.fronius_smartmeter_energy_ac_sold
cycle: daily
energy_solar_production_daily:
name: "PV Generation (Daily)"
source: sensor.energy_solar_production
cycle: daily
energy_grid_consumption_daily:
name: "Grid Consumption (Daily)"
source: sensor.energy_grid_consumption
cycle: daily
energy_grid_feedin_daily:
name: "Grid Export (Daily)"
source: sensor.energy_grid_feedin
cycle: daily
## Not used in Energy Dashboard
energy_house_consumption_daily:
name: "Total Consumption (Daily)"
source: sensor.energy_total_consumption
cycle: daily
sensor:
- platform: template
sensors:
power_total_consumption:
friendly_name: Total Consumption
unit_of_measurement: "W"
value_template: '{{ (states("sensor.fronius_house_load") | float * -1) | round | int }}'
- platform: template
sensors:
power_grid_consumption:
friendly_name: Grid Consumption
unit_of_measurement: "W"
value_template: >-
{% if states('sensor.fronius_grid_usage') | float > 0 %}
{{ states('sensor.fronius_grid_usage') | round | int }}
{% else %}
0
{% endif %}
- platform: integration
source: sensor.power_total_consumption
name: energy_total_consumption
unit_prefix: k
unit_time: h
round: 2
method: left
- platform: integration
source: sensor.fronius_panel_status
name: energy_solar_production
unit_prefix: k
unit_time: h
round: 2
method: left
- platform: integration
source: sensor.power_grid_consumption
name: energy_grid_consumption
unit_prefix: k
unit_time: h
round: 2
method: left
- platform: integration
source: sensor.power_grid_feedin
name: energy_grid_feedin
unit_prefix: k
unit_time: h
round: 2
method: left
- platform: template
sensors:
power_grid_feedin:
friendly_name: Grid Feed-in
unit_of_measurement: "W"
value_template: >-
{% if states('sensor.fronius_grid_usage') | float < 0 %}
{{ (states('sensor.fronius_grid_usage') | float * -1) | round | int }}
{% else %}
0
{% endif %}
- platform: template
sensors:
energy_consumption_cost_aud:
icon_template: mdi:currency-usd
value_template: >
{{(states('input_number.grid_consumption_energy_cost')|float / 100)|round(4, 'ceil')}}
unit_of_measurement: 'EUR/kWh'
energy_generation_cost_aud:
icon_template: mdi:currency-usd
value_template: >
{{(states('input_number.grid_generation_energy_cost')|float / 100)|round(4, 'ceil')}}
unit_of_measurement: 'EUR/kWh'
input_number:
# Grid Consumption Energy Cost (EUR/kWh)
grid_consumption_energy_cost:
name: 'Grid Consumption Energy Cost'
mode: box
min: 0
max: 1000
step: 0.001
unit_of_measurement: "EUR (cents)/kWh"
icon: mdi:currency-usd
# Grid Generation Energy Cost (EUR/kWh)
grid_generation_energy_cost:
name: 'Grid Generation Energy Cost'
mode: box
min: 0
max: 1000
step: 0.001
unit_of_measurement: "EUR (cents)/kWh"
icon: mdi:currency-usd
First of all thanks for sharing this! I have some issues with the total and yearly sensor. The first image is the integration installed via HACS. The second my old one where I use the API directly. I have tried to change the units but it does not report correct.
My total production is 10.39 MWh when I look in Solar webb.
This how the api call looks like.
The new version of home assistant need modification of manifest.json . Without this modification , plugin will be disabled.
Can you help to repare this ??
Using the same config on both 0.8.3 and 0.8.7
some of the sensors arnt being created,
Im missing
sensor.fronius_ac_current
sensor.fronius_ac_frequency
sensor.fronius_ac_power
sensor.fronius_ac_voltage
sensor.fronius_panel_status
Config im using, (i havent changed anything between the 2 versions, was i meant to?)
Sorry to bother you with this again,
Thanks for your help,
Ben,
P.S in the home assistant HACS addon, the dropdown with the versions, all other versions have a
v in front, eg v0.8.3, except 0.8.7, causing it to show at bottom of dropdown, not an issue but thought ill let you know,
sensor:
Still possible to use if the configuration and the folder is renamed to something other than fronius.
I tried to add this integration, but I get no data. It works fine with the native integration.
- platform: fronius_inverter
ip_address: 192.168.1.176
name: fronius
- platform: fronius
resource: http://192.168.1.176
monitored_conditions:
- sensor_type: inverter
The log tells me:
Failed to update: invalid response received
Thanks for your great work! I have integrated my Fronius and have no issues, just one thing I would like to know. Since the latest HA update 2021.9 they also offer to read data from Solar Battery. Do you think you could provide integration for the Fronius Solar Battery as well? That would be really great to read data stored in the battery and consumed from the battery.
Thanks
For some reason after the update to fix the manifest I do not get power usage data when the panels are not powered overnight.
Hello Richard,
Many thanks for all your work on the plugin, its great, and thanks for allowing the flowmeter to monitor after sunset, works great now, iv sent you some beer money, have 1 or 2 on me, enjoy!!
Do you have any plans to make a custom card view (like the fronius app) or do you know if theres a way to use the power wheel card https://community.home-assistant.io/t/lovelace-power-wheel-card/82374
Iv tried to use it before but could never work it out properly,
All im missing now is the view!!
Many thanks again for all your hard work, sorry to open an issue but dont know how to contact you otherwise??
Ben (Cathelest)
I just installed 0.9.7,
Just a few questions.
It seems for
Grid consumption: smartmeter_energy_ac_consumed
Grid feed-in: smartmeter_energy_ac_sold
which are required for the energy dashboard, you need to specify
smartmeter: True
Please add those to sensors to the list on the github, as i was stumped for a few mins when they were not showing up, and as
it wasnt in the list on github i presumed they were default entities, (Thankfully i do have a smart meter) but if you dont
doesnt that mean you cant get those sensors, may need to mention that smartmeter is required under energy dashboard section.
Once the entities are created, it seems HA core-2021.9.2 (Current)
Wants the sensors to have a state class of state_class: total_increasing for all 3 sensors,
easy fix using the customize.yaml, or could do via the gui,
sensor.fronius_total_energy:
state_class: total_increasing
last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"
sensor.fronius_smartmeter_energy_ac_consumed:
state_class: total_increasing
last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"
sensor.fronius_smartmeter_energy_ac_sold:
state_class: total_increasing
last_reset: "homeassistant.util.dt.utc_from_timestamp(0)"
The last_reset
When i pull up the entity's in Developer Tools > States > Search for sensor.fronius_smartmeter_energy_ac_consumed
Under attributes (for all three customized entities)
state_class: total_increasing
attribution: Fronius Inverter Data
unit_of_measurement: kWh
friendly_name: Fronius SmartMeter Energy AC Consumed
icon: mdi:solar-power
device_class: energy
last_reset: homeassistant.util.dt.utc_from_timestamp(0)
Should the last_reset not be a date, eg 2021-01-01T00:00:01
Is that "homeassistant.util.dt.utc_from_timestamp(0)" line correct or hasnt been brought in properly??
Error
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()
Basically, I have two Symo Inverters with two different IPs
As long as I enter one IP or the other, everything is fine.... for one inverter at a time
I must do something wrong with the scope... should I enter both IP with a special syntax ?
The Fronius software merge the data from the two inverters, I supposed that the scope: System would do the same or am I wrong ??
Thanks
Using the default config sample presented on the first page I don't get the Energy view:
title: Solar Power
production_is_positive: false
solar_power_entity: sensor.fronius_panel_status
grid_power_entity: sensor.fronius_grid_usage
home_energy_entity: sensor.fronius_house_load
Although in power-wheel-card documentation it states that specifying home_energy_entity
should be enough to see the Energy view.
Any idea on how to configure power-wheel-card with this integration in order to see the Energy view too?
Hello,
Sorry to be a pain,
Just noticed that something breaks my setup since 0.8.4 >
My config
sensor:
0.8.3 Seems to work great,
Screenshot
0.8.4 > (Tested 0.8.4, 0.8.5, 0.8.6)
Thanks again for taking time develop this,
Ben
Yet another change in home assistant (pertaining to energy dashboard), energy sensor cost has been updated with:
STATE_CLASS_MEASUREMENT
resulting in a warning:
Entity sensor.fronius_smartmeter_energy_ac_sold_compensation (<class 'homeassistant.components.energy.sensor.EnergyCostSensor'>) with state_class measurement has set last_reset. Setting last_reset is deprecated and will be unsupported from Home Assistant Core 2021.11. Please update your configuration if state_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+energy%22
See here for details: home-assistant/core#55962
Hi, really nice work
I have a Fronius inverter GEN 24 PLUS
with a Smart Meter TS 100A-1
i have added this config file to HA
- platform: fronius_inverter
ip_address: myip
powerflow: True
power_units: kW
smartmeter: True
smartmeter_device_id: 0
as u see, many sensor, report UNKNOW status
this is the result from api
http://myip/solar_api/v1/GetMeterRealtimeData.cgi?Scope=Device&DeviceId=0
{
"Body" : {
"Data" : {
"ACBRIDGE_CURRENT_ACTIVE_MEAN_01_F32" : -5.7779999999999996,
"ACBRIDGE_CURRENT_AC_SUM_NOW_F64" : -5.7779999999999996,
"COMPONENTS_MODE_ENABLE_U16" : 1.0,
"COMPONENTS_MODE_VISIBLE_U16" : 1.0,
"COMPONENTS_TIME_STAMP_U64" : 1623686508.0,
"Details" : {
"Manufacturer" : "Fronius",
"Model" : "Smart Meter TS 100A-1",
"Serial" : "2651324894"
},
"GRID_FREQUENCY_MEAN_F32" : 50.0,
"SMARTMETER_ENERGYACTIVE_ABSOLUT_MINUS_F64" : 355124.0,
"SMARTMETER_ENERGYACTIVE_ABSOLUT_PLUS_F64" : 577337.0,
"SMARTMETER_ENERGYACTIVE_CONSUMED_SUM_F64" : 577337.0,
"SMARTMETER_ENERGYACTIVE_PRODUCED_SUM_F64" : 355124.0,
"SMARTMETER_ENERGYREACTIVE_CONSUMED_SUM_F64" : 221.0,
"SMARTMETER_ENERGYREACTIVE_PRODUCED_SUM_F64" : 576646.0,
"SMARTMETER_FACTOR_POWER_01_F64" : -0.98599999999999999,
"SMARTMETER_FACTOR_POWER_SUM_F64" : -0.98599999999999999,
"SMARTMETER_POWERACTIVE_01_F64" : -1333.9000000000001,
"SMARTMETER_POWERACTIVE_MEAN_01_F64" : -1425.8602006688966,
"SMARTMETER_POWERACTIVE_MEAN_SUM_F64" : -1333.9000000000001,
"SMARTMETER_POWERAPPARENT_01_F64" : 1352.0999999999999,
"SMARTMETER_POWERAPPARENT_MEAN_01_F64" : 1441.9705685618733,
"SMARTMETER_POWERAPPARENT_MEAN_SUM_F64" : 1352.0999999999999,
"SMARTMETER_POWERREACTIVE_01_F64" : -221.19999999999999,
"SMARTMETER_POWERREACTIVE_MEAN_SUM_F64" : -221.19999999999999,
"SMARTMETER_VALUE_LOCATION_U16" : 0.0,
"SMARTMETER_VOLTAGE_01_F64" : 241.80000000000001,
"SMARTMETER_VOLTAGE_MEAN_01_F64" : 241.78963210702304
}
},
"Head" : {
"RequestArguments" : {
"DeviceClass" : "Meter",
"DeviceId" : "0",
"Scope" : "Device"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2021-06-14T16:01:49+00:00"
}
}
http://myip/solar_api/v1/GetPowerFlowRealtimeData.fcgi
{
"Body" : {
"Data" : {
"Inverters" : {
"1" : {
"DT" : 1,
"P" : 1655
}
},
"Site" : {
"BatteryStandby" : false,
"E_Day" : null,
"E_Total" : null,
"E_Year" : null,
"Meter_Location" : "grid",
"Mode" : "meter",
"P_Akku" : null,
"P_Grid" : -1054.5999999999999,
"P_Load" : -600.47312011718759,
"P_PV" : 1707.7088012695312,
"rel_Autonomy" : 100.0,
"rel_SelfConsumption" : 36.280760820686339
},
"Version" : "12"
}
},
"Head" : {
"RequestArguments" : {},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2021-06-14T16:12:05+00:00"
}
}
Thank you very much for the development but the truth is that it was not easy for me to configure the application.
My inverter is a Fronius Primo 5:
I would recommend putting a configuration example with the following with smartmeter, since the units come in MWh:
sensor
In "utility meters" the solar production sensor is missing, also the application did not recognize nee sensors if I did not modify them as "device_class": energy and its "units" in kWh, (attention: Kwh is not worth it for de W without capital letters). I had to modify the sensors manually in developer tools
utility_meter
#Energy (safepay)
#Calculate dayly energy consumed from grid
grid_consumed_energy_day:
source: sensor.fronius_smartmeter_energy_ac_consumed
cycle: daily
#calculate daily energy sold to grid
grid_sold_energy_day:
source: sensor.fronius_smartmeter_energy_ac_sold
cycle: daily
#calculate daily energy produced from solar panels
solar_produced_energy_day:
source: sensor.fronius_total_energy
cycle: daily
I am running version Home Assistant 0.102.2, on a Synology Docker, and I keep getting this error, when trying to install this components.
Platform error: sensor - Integration 'fronius_inverter' not found.
I even tried it on a Ubuntu 18.4, and get the same error.
I have followed the Read.me, and everything seems to be set up correctly.
What am I doing wrong?
Regards,
Per
From time to time I get null values for various parameters. I suspect this must be because during each poll the inverter is stressed three times: inverter_data, powerflow_data and smartmeter_data are pulled immediately after each other, which may cause the small webserver embedded in the unit to lock up for a while.
This is the graph of Fronius DC Current, for example. The gaps don't appear when using Home Assistant native fronius integration (which is disabled now).
I suggest to add a 5-second sleep between the consecutive data pulls somewhere around lines 107 and 115.
I'd do it but I've zero experience with proper python programming.
Using a Fronius Symo 3.7-3-M and a Smart Meter 63A.
Logger: homeassistant.loader
Source: loader.py:786
First occurred: 9:40:27 AM (2 occurrences)
Last logged: 9:40:28 AM
No 'version' key in the manifest file for custom integration 'fronius_inverter'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'fronius_inverter'
No 'version' key in the manifest file for custom integration 'midea_ac'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'midea_ac'
Love your work!
But you've set a hard minium scan_interval in your code
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=300)
not sure if this was on purpose but users trying to set scan_interval
manually below this level are unable
After recent upgrade of Home Assistant Core to 0.109.6 from 0.109.4 I have notices processor use increase from typical 1% to appr. 4% and the following logs
Source: util/async_.py:120
First occurred: May 14, 2020, 4:23:32 PM (1846 occurrences)
Last logged: 8:16:30 AM
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()
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 356: result = requests.get(self._build_url(), timeout=10).json()
On the full log this error is reported 1-2 time every minute.
What can I do to fix it ?
Hi,
Thanks for your great add on. It was working flawlessly so far. With the recent to 0.8.7, i could see many error messages in the logs when the inverter goes offline after sunset.
Following error message fills up the log every minute until the Inverter is back up in the morning
UnboundLocalError: local variable 'state' referenced before assignment
2019-11-23 04:50:09 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.fronius_ac_power fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 270, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 448, in async_device_update
await self.async_update()
File "/config/custom_components/fronius_inverter/sensor.py", line 207, in async_update
self._state = round(state, 2)
There is an issue with the integration which does not stop the integration working at all but it continues to raise the same errors and warning for a while now over all of releases I have tested since 0.107.7.
I am now testing in 0.110.1 and these are the errors and warnings which persist:
Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:436
Integration: Sensor (documentation, issues)
First occurred: 10:58:15 PM (9 occurrences)
Last logged: 10:58:15 PM
Entity id already exists - ignoring: sensor.fronius_ac_current. Platform fronius_inverter does not generate unique IDs
Entity id already exists - ignoring: sensor.fronius_ac_voltage. Platform fronius_inverter does not generate unique IDs
Entity id already exists - ignoring: sensor.fronius_ac_frequency. Platform fronius_inverter does not generate unique IDs
Entity id already exists - ignoring: sensor.fronius_dc_current. Platform fronius_inverter does not generate unique IDs
Entity id already exists - ignoring: sensor.fronius_dc_voltage. Platform fronius_inverter does not generate unique IDs
I am using this environment:
arch | x86_64
-- | --
dev | false
docker | true
hassio | false
installation_type | Home Assistant Core on Docker
os_name | Linux
os_version | 4.2.8
python_version | 3.7.7
timezone | Australia/Brisbane
version | 0.110.1
virtualenv | false
Cheers for building such a fantastic integration!
From the new update I have MWh in fronius day energy. It should be kWh. Even if I change to kWh in customize.yaml Istill have MWh count. Before new update I had kWh and it was fine to me.
If I change the scan_interval in HA sensor.yaml config to 10 seconds it wont work.
if i go to the sensor.py in custom_components\fronius_inverter and change to the following:
MIN_TIME_BETWEEN_UPDATES = timedelta(seconds=10)
It works and changes the interval to 10 seconds.
It does end up eventually changing back however to 60 seconds, i think on next restart.
Hi thanks for a great sensor in Home Assistant. Its working well for me, could you add this feature if possible?
Here is the code below for the API call.
// API URL - Fronius
$inverterDataURL = "http://".$dataManagerIP."/solar_api/v1/GetArchiveData.cgi?Scope=System&StartDate=".$date."&EndDate=".$date."&Channel=Voltage_DC_String_1&Channel=Current_DC_String_1&Channel=Voltage_DC_String_2&Channel=Current_DC_String_2&Channel=Temperature_Powerstage";
More info here, sorry im not a programmer so limited on explaining.
https://github.com/grann0s/_pushPVStringData.php/blob/master/_pushPVStringData.php
Bob
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.