Sorry if this isn’t in the right spot, but since upgrading to 2021.12 with the new UI update. My setups been out of whack. Let me explain, I’ve got 2 Symo inverters (connected as master & slave) & a Symo Hybrid. All firmwares are up to date & everything was working perfectly with 5 second intervals.
But since updating to any version of 2021.12, for some reason I’m getting missing data because multiple times an hour, a random inverter drops it’s connection to Home Assistant, (still visible fine in Solar.web & Fronius apps) for a random number of minutes.
Also for some reason the Hybrid inverter’s update interval is now 10 seconds, but the 2 Symo’s update interval is 60 seconds. Obviously this causes the data to be out too.
Am I missing something simple here? Is there a way to revert back to the old manual integration, until this is fixed, without reverting to the old 2021.11 core? Any help is appreciated.
Hi !
For a way to set scan_interval for modern HA integrations (you don’t anymore) see Fronius power meter (and inverter) - help with configuration - #35 by farmio
That said, 10 seconds is the minimum HA allows as far as I’m concerned.
What data would you need this frequently? The new integration has different update intervals for its endpoints and slows down after some unsuccessfull requests (see documentation.
There was a minor bugfix in 2021.12.4 did you use this, or a later version?
There is no standing connection between HA and your inverter. HA requests data, Datalogger answers, end of communication until the next request (previously scan interval). Solar.web (and the Fronius App which uses that as well) will show you cached data on their servers - if your device doesn’t have a connection for a few minutes (or even hours) it will not be visible in Solar.web.
Symo and Hybrid should just behave exactly the same. That said we don’t have any test data for Hybrid inverters. Maybe you can generate some?
Its really not obvious what’s “out”
The old integration uses the very same library to retrieve data from the inverters (pyfronius). You can always use a custom component - it would precedence over the core integrations.
Since you are the first one reporting such problems its very likely that the source of your problems lies in your specific setup.
- Are your inverters connected via their internal Wifi?
- Are there any log entries regarding the
fronius
integration? - What are the exact symptoms when you experience a “lost connection” (eg. entities states “unavailable”)
- How did you configure the old integration (yaml)?
- What exact firmware version do your Dataloggers run (you can see this in HA within the
SolarNet
devices page)?
Yes I found an error in the log:
Logger: homeassistant.components.fronius
Source: helpers/update_coordinator.py:219
Integration: Fronius (documentation, issues)
First occurred: January 1, 2022, 1:34:26 PM (72 occurrences)
Last logged: 5:56:52 PM
Error fetching fronius_inverter_2_http://192.168.1.8 data: Connection to Fronius device failed at http://192.168.1.8/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=2&DataCollection=CommonInverterData.
Error fetching fronius_inverter_1_http://192.168.1.8 data: Connection to Fronius device failed at http://192.168.1.8/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData.
Error fetching fronius_logger_http://192.168.1.8 data: Connection to Fronius device failed at http://192.168.1.8/solar_api/v1/GetLoggerInfo.cgi.
Error fetching fronius_power_flow_http://192.168.1.8 data: Connection to Fronius device failed at http://192.168.1.8/solar_api/v1/GetPowerFlowRealtimeData.fcgi.
Error fetching fronius_inverter_1_http://192.168.1.4 data: Connection to Fronius device failed at http://192.168.1.4/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData.
And the firmware on the Symos is reported as Firmware: 3.19.10-1 in HA. It’s all on WiFi & never seen any issues in the 6 months + prior to upgrade 2021.12. But I’ve been updating to all the current Cores hoping for a fix. Thanks again, I realise I have a unique larger set up.
You can yield more detailed logs by adding this to your configuration.yaml
:
logger:
default: info
logs:
homeassistant.components.fronius: debug
pyfronius: debug
See the output by pressing the button below on the logs page after the error occurred again.
Your setup is not too large or anything, it should work just fine. What surprises me is that it (seemingly) worked before - which brings me to my previous question again:
- How did you configure the old integration (yaml)?
That said, Fronius internal Wifi is known to be quite flaky - I’d recommend to use a cable instead if you can.
Ok, I’ll set that logger up soon, yes was setup in YAML from the beginning. Unfortunately they are setup separately around the property & WiFi is the only option atm. But yes everything was rock solid earlier. I believe it just displays as unavailable. But the place I notice it more is the template that totals all the inverters production, drastically drops off (because data is unavailable) & in turn the template that calculates household consumption drops too (including into negative consumption) at the same time.
The other main problem is all the data from the hybrid & regular Symos is not in sync, so any templates that reference both data is proportionately out when things change. As in the one set of data is at 10 seconds past the minute & then every 10 seconds & the other data comes in at 14 seconds past the minute & so on.
The question was: what exact yaml did you use before with the old integration?
Yes, just this without the #s:
# - platform: fronius
# scan_interval: 5
# resource: http://192.168.1.4
# monitored_conditions:
# - sensor_type: inverter
# device: 1
# - sensor_type: meter
# device: 0
# - sensor_type: storage
# device: 0
# - sensor_type: power_flow
# - platform: fronius
# scan_interval: 5
# resource: http://192.168.1.8
# monitored_conditions:
# - sensor_type: inverter
# device: 1
# - sensor_type: inverter
# device: 2
Also saw this one in the logs for the template issue:
Logger: homeassistant.helpers.template
Source: helpers/template.py:1291
First occurred: January 1, 2022, 1:11:11 PM (515 occurrences)
Last logged: 10:07:38 PM
Template warning: 'float' got invalid input 'unavailable' when rendering template '{{ ((states('sensor.energy_total_fronius_inverter_1_http_192_168_1_8')|float + states('sensor.energy_total_fronius_inverter_2_http_192_168_1_8')|float + states('sensor.energy_total_fronius_inverter_1_http_192_168_1_4')|float)) | round(0) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'float' got invalid input 'unavailable' when rendering template '{{ (states('sensor.power_photovoltaics_fronius_power_flow_0_http_192_168_1_4')|float + states('sensor.power_ac_fronius_inverter_1_http_192_168_1_8')|float + states('sensor.power_ac_fronius_inverter_2_http_192_168_1_8')|float) | round(0) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Template warning: 'float' got invalid input 'unavailable' when rendering template '{{ (((states('sensor.energy_day_fronius_inverter_1_http_192_168_1_8')|float + states('sensor.energy_day_fronius_inverter_2_http_192_168_1_8')|float + states('sensor.energy_day_fronius_inverter_1_http_192_168_1_4')|float)) / 1000) | round(1) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
Sorry for miss understanding your YAML question. I’m in Queensland Australia so probably a bit of a time gap too. I’m getting normal errors in HA ATM as its night time here & the regular Symos don’t report data at night. What do I need to look for tomorrow and is this the best way to get them to you? I appreciate all your help with this.
Don’t worry - I’m located in Austria so there is probably some language gap on my side too…
Fronius seems to be quite popular at the other side of the earth - I’ve already had some conversations with Australians about it
The API endpoints you had configured in the old integration are exactly the same as used in the new one, except for the .8 inverters the power_flow
endpoint is queried every 10s too (and logger data once an hour). I can imagine the old integration did just not update / fail silently when one endpoint timed out / responded with an error, but I’m not totally sure.
For the templates you could check for available states / numbers and default eg. to 0 if that fits your needs. Every entity can go “unavailable” at some point. There is some new notation for default values, but I’m no template expert
Logs are written to <HA config directory>/home-assistant.log
. You can just take the whole file, zip it and DM me a link here (Nextcloud, Dropbox or such), or send it directly via Discord or email if you like (dm me for address).
The integration doesn’t query in parallel (per IP) - it waits until one request is done and then starts the next. Since power_flow is the only one every 10s this should only collide with the other 2/3 (meter, storage, inverter) once every minute. But its still a bad sign that it takes ~1second per request then - it should be about 0.2… so all 4 requests done in 1 sec timeframe.
Here are some excerpts of Fronius' API documentation just for reference why this is done that way: > Up to 2 realtime requests are allowed to be performed in parallel with keeping a timeout of 4 seconds between two consecutive calls.
Since HA might not be the only thing requesting these no parallel requests are made.
GetPowerFlowRealtimeData (…) The values replied represent the current state. Because data has multiple asynchronous origins it is a matter of fact that the sum of all powers (grid, load and generate) will differ from zero.
Imho relying on this data for critical applications is not a good idea. Let alone that ~1 % of all requests to the inverter device endpoint just fail randomly. see Silently retry Fronius inverter endpoint 2 times by farmio · Pull Request #61826 · home-assistant/core · GitHub
If you really want higher frequent requests, I have heard some users having good success using the Modbus
integration. But never tried it myself.
Do you now if more then one device can use the MODBUS connection? Also I can’t seam to find a way to DM you on your profile. Can you DM with email address for the file?
No, I don’t know, but a look at the documentation will provide answers Modbus - Home Assistant. You have a DM.
Hello, I have 3 pcs Fronius Symo inverters connected to one Datamanager (modbus) card.
I set everything up as instructed by Fronius.
Unfortunately, the variable sensor.solarnet_power_photovoltaics shows the PV production from the master device.
However, in the application on the phone and on the solarweb website, it shows the total PV production ok.
I do not find the correct PV production quantity in any other entity.
What can I get misaligned?
Perhaps in the Datamenager configuration itself?
Hello, I found a solution, I had to add a second datamanger card for integration and now it counts PV production correctly.
Hi @farmio.
I have 2 Fronius Symo inverters connected to one Datamanager card. One that has the card inserted is set up as master (Symo 3.0.3-S), the second (Symo 5.0.3-M) as slave.
All configured well, it shows all values correctly in SolarWeb.
Unfortunately, 3 devices are detected in HA (SolarNet, Symo 3.0.3-S(1) and S0 Meter at inverter 1), Symo 5.0.3-M is not detected.
Also, the variable sensor.solarnet_power_photovoltaics shows the PV production from the master device, the Symo 3.0.3-S.
How can I add a slave inverter to the configuration? Is the problem that inverters with DeviceID > 1 are not detected?
Hi !
Your screenshot says the second device is “offline”. It should be detected as soon as the sun shines.
In this field, it always shows as offline - in the sense that an update is only possible offline. The inverter is visible in the SolarWeb all the time (does not go to sleep at night)
You can see what the datalogger reports by using
curl "http://$FRONIUS_IP/solar_api/v1/GetInverterInfo.cgi"
or just doing a diagnostic download in HA at the integration page.
[core-ssh ~]$ curl "http://192.168.1.21/solar_api/v1/GetInverterInfo.cgi"
{
"Body" : {
"Data" : {
"1" : {
"CustomName" : "Symo 3.0-3-S (1)",
"DT" : 247,
"ErrorCode" : 0,
"PVPower" : 3300,
"Show" : 1,
"StatusCode" : 7,
"UniqueID" : "1348837"
}
}
},
"Head" : {
"RequestArguments" : {},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2024-08-08T08:57:01+02:00"
}
}
[core-ssh ~]$ curl "http://192.168.1.21/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=1&DataCollection=CommonInverterData"
{
"Body" : {
"Data" : {
"DAY_ENERGY" : {
"Unit" : "Wh",
"Value" : 1285.0999999999999
},
"DeviceStatus" : {
"ErrorCode" : 0,
"LEDColor" : 2,
"LEDState" : 0,
"MgmtTimerRemainingTime" : -1,
"StateToReset" : false,
"StatusCode" : 7
},
"FAC" : {
"Unit" : "Hz",
"Value" : 49.979999999999997
},
"IAC" : {
"Unit" : "A",
"Value" : 2.4199999999999999
},
"IDC" : {
"Unit" : "A",
"Value" : 1.6599999999999999
},
"PAC" : {
"Unit" : "W",
"Value" : 578
},
"TOTAL_ENERGY" : {
"Unit" : "Wh",
"Value" : 15454930
},
"UAC" : {
"Unit" : "V",
"Value" : 236.80000000000001
},
"UDC" : {
"Unit" : "V",
"Value" : 386.5
},
"YEAR_ENERGY" : {
"Unit" : "Wh",
"Value" : 2882457.5
}
}
},
"Head" : {
"RequestArguments" : {
"DataCollection" : "CommonInverterData",
"DeviceClass" : "Inverter",
"DeviceId" : "1",
"Scope" : "Device"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2024-08-08T08:57:19+02:00"
}
}
[core-ssh ~]$ curl "http://192.168.1.21/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=2&DataCollection=CommonInverterData"
{
"Body" : {
"Data" : {
"DAY_ENERGY" : {
"Unit" : "Wh",
"Value" : 1151
},
"DeviceStatus" : {
"ErrorCode" : 0,
"LEDColor" : 2,
"LEDState" : 0,
"MgmtTimerRemainingTime" : -1,
"StateToReset" : false,
"StatusCode" : 7
},
"FAC" : {
"Unit" : "Hz",
"Value" : 49.979999999999997
},
"IAC" : {
"Unit" : "A",
"Value" : 2.1000000000000001
},
"IDC" : {
"Unit" : "A",
"Value" : 1.25
},
"PAC" : {
"Unit" : "W",
"Value" : 499
},
"TOTAL_ENERGY" : {
"Unit" : "Wh",
"Value" : 12318269
},
"UAC" : {
"Unit" : "V",
"Value" : 238.30000000000001
},
"UDC" : {
"Unit" : "V",
"Value" : 407.5
},
"YEAR_ENERGY" : {
"Unit" : "Wh",
"Value" : 24862.900000000001
}
}
},
"Head" : {
"RequestArguments" : {
"DataCollection" : "CommonInverterData",
"DeviceClass" : "Inverter",
"DeviceId" : "2",
"Scope" : "Device"
},
"Status" : {
"Code" : 0,
"Reason" : "",
"UserMessage" : ""
},
"Timestamp" : "2024-08-08T08:57:34+02:00"
}
}
[core-ssh ~]$ curl "http://192.168.1.21/solar_api/v1/GetInverterRealtimeData.cgi?Scope=Device&DeviceId=3&DataCollection=CommonInverterData"
{
"Body" : {
"Data" : {}
},
"Head" : {
"RequestArguments" : {
"DataCollection" : "CommonInverterData",
"DeviceClass" : "Inverter",
"DeviceId" : "3",
"Scope" : "Device"
},
"Status" : {
"Code" : 12,
"Reason" : "No inverter with this index found.",
"UserMessage" : ""
},
"Timestamp" : "2024-08-08T08:57:49+02:00"
}
}
[core-ssh ~]$
As you can see above, specifying a particular DeviceId results in a reading from inverter #1 and inverter #2, and an error (obvious) at inverter #3