ThomasHoussin / com.thomashoussin.fronius

Adds support for Fronius inverter in Homey
GNU General Public License v3.0
0 stars 0 forks source link

Missing some information from the app #56

Closed BrianBrinkmann closed 8 months ago

BrianBrinkmann commented 9 months ago

Hello Thomas

I recently installed Homey Pro and you Fronius app. My PV system is 6 years old and is Fronius Symo and BYD batteries. I have been looking a lot on the data and the API interface and was happy to find your app.

some of the data retrieved from the app is labelled a bit wrong.

this is what is returned from my system doing a http://fronius-ip/solar_api/v1/GetPowerFlowRealtimeData.fcgi

{ "Body" : { "Data" : { "Inverters" : { "1" : { "Battery_Mode" : "normal", "DT" : 99, "E_Day" : 3202.5, "E_Total" : 28499302, "E_Year" : 7028143.5, "P" : -1030, "SOC" : 44.799999237060547 } }, "Site" : { "BatteryStandby" : false, "E_Day" : 3202.5, "E_Total" : 28499302.600000001, "E_Year" : 7028143.6000000006, "Meter_Location" : "grid", "Mode" : "bidirectional", "P_Akku" : -994.80000000000007, "P_Grid" : 1658.5599999999999, "P_Load" : -628.55999999999995, "P_PV" : 1.2869999999999999, "rel_Autonomy" : 0, "rel_SelfConsumption" : 100 }, "Version" : "12" } }, "Head" : { "RequestArguments" : {}, "Status" : { "Code" : 0, "Reason" : "", "UserMessage" : "" }, "Timestamp" : "2023-11-17T16:36:01+01:00" } }

it seems to me that you use the E_day, year and total as PV production numbers. This is not absolutely correct. Numbers are Energy passed thru the inverter - today my production is below 2kw. But I can live with that, as I don’t use those I Homey yet.

The numbers I would like to see in the app is:

P_AKKU - current power from/to the battery P_Grid - current power from grid P_Load - current household load P_PV - current solar panel produktion

Battery_mode would also be usefull - sometimes I see calibration starting at the worse possible time and would like to postpone is via the Fronius web interface.

all Numbers are in watts These numbers corresponds to the numbers showed in Solar.web I am pulled numbers from Inverter, Smart Meter and Battery in the app.

I hope you will be able to help. Thanks for a nice app.

regards Brian

ThomasHoussin commented 9 months ago

Hi

it seems to me that you use the E_day, year and total as PV production numbers. This is not absolutely correct.

It depends of what you use in the Fronius app : the inverter app use data from GetInverterRealtimeData.cgi API ; for example in this case I use the DAY_ENERGY field, which is defined by Fronius as AC Energy generated on current day (with some limitation / imprecision)

For the field you're looking for, you should have a look at the Powerflow device in Fronius app. It reports P_AKKU, P_Grid, P_Load and P_PV as reported in the GetPowerFlowRealtimeData.fcgi web request.

Not sure what you mean by battery mode (I do not have one) but I use the JSON API to report the values ; AFAIK it can only read values ; controling battery would require using TCP modbus for example (see issue #39 ), it's not supported at the moment (and it's a bit tedious to work on it for me as I do not own the hardware...)

BrianBrinkmann commented 9 months ago

Hi Thomas Thanks for a very quick reply. The powerflow device did the trick and I got the data, that I like.

For battery_mode I was just looking for the status that was reported in my output example (see top of Body). I know that status cannot be controlled vi Homey - I have to login to the inverter locally to change anything

I see your point on DAY ENERGY - I charge my battery a bit at night and in the afternoon to avoid using grid power when the power transmission prices are high. That messes with the energy/PV numbers - Fronius is aware of it…

thanks for responding

ThomasHoussin commented 9 months ago

Hi

OK if it's reading the battery information you can have a look at the Storage device. If your battery is supported it should give you

"meter_power": {
  "title": { "en": "Current maximum capacity" }
},
"measure_current": {
  "title": { "en": "Battery output current" }
},
"measure_voltage": {
  "title": { "en": "Battery output voltage" }
},
"measure_temperature": {
  "title": { "en": "Temperature" }
},
"measure_battery": {
  "title": { "en": "Relative charged capacity" }
},
"measure_power": {
  "approximated": true
}

Have a look at the GEN24-storage too, I think the battery_mode is reported (I'll have a look to add it in the powerflow device in the future)

BrianBrinkmann commented 9 months ago

Excellent- many thanks

BrianBrinkmann commented 8 months ago

Thanks