Extract "Current Controls" values to Homeassistant entities
Hi,
thank you for this nice project!
Is it possible to extract the values of the "Current Controls" Tab to Homeassistant entities via API or MQTT? That would make it possible to control other PV / Batteries via automations in homeassistant based on your controls.
This would also help me a lot, especially the distribution via MQTT. Background: I would like to display the current battery mode in the PV dashboard “Solectrus” which mainly operates via MQTT … Thank you and best regards!
Should be possible ... but needs some time due to some other topics on my side. I will mark this as a feature request/ enhancement.
Maybe you (@all) can collect here some more details which values should be exposed and maybe also in which clustering.
... additonally I'm a fan of MQTT Autodiscovery (by Homeassistant) so I would combine this...
It would be good if we could export all the values under "Current Controls":
Overall State AC Charge DC Charge Discharge Allowed
This would allow us to control our batteries / inverters based on these values.
Also an export of the "Dynamic Max Charge Power" and "Planned Time" for next charge would be nice to have.
Hi @PRiekenberg ,
just fyi ... in the mean time (until mqtt will be integrated) you can already use .../json/current_controls.json to get the current "demands" of EOS for your config.
{
"current_states": {
"current_ac_charge_demand": 0.0,
"current_dc_charge_demand": 5000.0,
"current_discharge_allowed": false,
"inverter_mode": "MODE_AVOID_DISCHARGE",
"evcc_charging_state": false
},
"battery_soc": 39.1,
"battery_max_charge_power_dyn": 5000,
"timestamp": "2025-04-15T18:41:54.943938+02:00",
"state": {
"request_state": "response received",
"last_request_timestamp": "2025-04-15T18:40:34.226026+02:00",
"last_response_timestamp": "2025-04-15T18:41:54.384392+02:00",
"next_run": "2025-04-15T18:44:54+02:00"
}
}
Currently used for the dashbaord, but getting instantly the latest values of EOS/ Battery and EVCC
[small edit] you can deactivate the inverter/ battery control in the config
inverter:
type: fronius_gen24 # default or fronius_gen24 - default disables the controlling
see also https://github.com/ohAnd/EOS_connect/blob/main/src/CONFIG_README.md
Where can I find the json/current_controls.json file? I am using EOS Connect as an Add-on to home assistant. Do you know where the add on files are located?
Hi @PRiekenberg ,
sorry you're right, it is not documented yet...
After starting of EOS-connect, a webserver will be serving the dashboard. This dashboard exchanges data via a small api. The dashboard is reachable at http://<your_eos_instance_ip>:8081 or if you running EOS-connect via HA addon http://homeassistant:8081.
API description:
- GET /json/optimize_request.json
- Description: Retrieves the last optimization request.
- Response: JSON object containing the last optimization request.
- GET /json/optimize_response.json
- Description: Retrieves the last optimization response.
- Response: JSON object containing the last optimization response.
- GET /json/current_controls.json
- Description: Provides the current system states, including:
- AC/DC charge demands
- Discharge allowance
- Battery state of charge (SOC)
- Inverter mode
- EVCC charging state and mode
- Dynamic max charge power
- Current optimization state
- EOS-connect version and timestamp
- Response: JSON object with detailed system states.
- Description: Provides the current system states, including:
Example for controls: http://homeassistant:8081/json/current_controls.json
PS: controls content is grown over the last days ;-)
Hi, your commit from today doesn't seem to work correctly.
I get the following error when I try to start your addon after the update to 0.1.10:
Traceback (most recent call last):
File "/app/src/eos_connect.py", line 25, in
is already fixed ... forget the dependency for the dockerfile ... 0.1.11
and additionally - that is the first step of implementation ... means the published data to mqtt are ok and maybe not enough ;-), but the controls from outside (override) are only preparations for upcoming features
for further needs/ discussion please create a new issue