Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Fronius API #6

Open
jmtatsch opened this issue Mar 4, 2022 · 5 comments
Open

New Fronius API #6

jmtatsch opened this issue Mar 4, 2022 · 5 comments

Comments

@jmtatsch
Copy link
Contributor

jmtatsch commented Mar 4, 2022

As discovered here there seems to be a new api under http:///components/readable where the GEN24 web interface gets it data from which seems quite extensive, maybe all we ever dreamed of :)

For example it has very interesting lifetime stats for BYD battery storages:

                                        "BAT_CAPACITY_ESTIMATION_MAX_F64" : 21897.0,
					"BAT_CAPACITY_ESTIMATION_REMAINING_F64" : 16247.0,
					"BAT_CURRENT_DC_F64" : -4.9048422066971815,
					"BAT_CURRENT_DC_INTERNAL_F64" : -4.8977628097185475,
					"BAT_ENERGYACTIVE_LIFETIME_CHARGED_F64" : 2152417.0,
					"BAT_ENERGYACTIVE_LIFETIME_DISCHARGED_F64" : 1856524.0,
					"BAT_MODE_CELL_STATE_U16" : 3.0,
					"BAT_MODE_HYBRID_OPERATING_STATE_U16" : 1.0,
					"BAT_MODE_LAST_FAULT_PARAMETER_U16" : 0.0,
					"BAT_MODE_STATE_U16" : 64.0,
					"BAT_MODE_U16" : 2.0,
					"BAT_MODE_WAKE_ENABLE_STATUS_U16" : 1.0,
					"BAT_TEMPERATURE_CELL_F64" : 8.5,
					"BAT_TEMPERATURE_CELL_MAX_F64" : 9.0,
					"BAT_TEMPERATURE_CELL_MIN_F64" : 8.0,
					"BAT_VALUE_STATE_OF_CHARGE_RELATIVE_U16" : 74.200000000000003,
					"BAT_VALUE_STATE_OF_HEALTH_RELATIVE_U16" : 99.0,
					"BAT_VALUE_WARNING_CODE_U16" : 46.0,
					"BAT_VOLTAGE_DC_INTERNAL_F64" : 415.69999999999999,
					"COMPONENTS_MODE_ENABLE_U16" : 1.0,
					"COMPONENTS_MODE_VISIBLE_U16" : 1.0,
					"COMPONENTS_TIME_STAMP_U64" : 1646425005.0,
					"DCLINK_POWERACTIVE_LIMIT_DISCHARGE_F64" : 16628.0,
					"DCLINK_POWERACTIVE_MAX_F32" : 16748.0,
					"DCLINK_VOLTAGE_MEAN_F32" : 415.10000000000002,
					"DEVICE_TEMPERATURE_AMBIENTEMEAN_F32" : 10.0

@farmio How could this treasure of data best be integrated in pyfronius and then home assistant?

@jmtatsch
Copy link
Contributor Author

jmtatsch commented Mar 4, 2022

It even has the long missing lifetime energy produced counter
PV_ENERGYACTIVE_ACTIVE_SUM_01_U64 measured in watt seconds

@farmio
Copy link
Collaborator

farmio commented Mar 5, 2022

Well,

"Note" : "this internal API may be changed any time",

doesn't look that promising to me. Given the inconsistency of the previous models in SolarAPI I guess this would need some major code-housekeeping when new firmware versions are released.
I guess they could add these values to specified API endpoints as well in a future update.

As far as I know, Gen24 inverters already expose a lifetime energy counter in SolarAPI since 1.13 or 1.14 https://github.com/home-assistant/core/blob/c5f7e7d1b07d3a017eff521986f8bfa4fac8e151/tests/components/fronius/fixtures/gen24/GetInverterRealtimeData_Device_1.json#L41

@jmtatsch
Copy link
Contributor Author

jmtatsch commented Mar 5, 2022

True that it's an internal api that might change.
However, if you know how lost the Fronius dev team is to even fix their major bugs in the firmware I highly doubt that they will break a lot of the api they use for their working web frontend which they would need to rewrite then.
I also doubt that this stuff will make it in the official apis soon with that speed of development.
Other third parties such as Hardy Barth Wallboxes seem to already use that private api.
I will try to do a pull request for using this alternative api when I find the time.

@farmio
Copy link
Collaborator

farmio commented Mar 6, 2022

Ah nice, my "Fronius Symo 5.0-3-M" (Datalogger 3.20.6) provides this endpoint too. But I have no battery, so not really anything interesting there I couldn't get from the official API.

@jmtatsch
Copy link
Contributor Author

jmtatsch commented Mar 7, 2022

Well, there is only one solution to it then, you need a battery 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants