Skip to content

Commit e7c2128

Browse files
committed
feat: update README and UI to support evcc optimization backend and display experimental mode banner
1 parent e56e1f5 commit e7c2128

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ Get up and running with EOS Connect in just a few steps!
159159
### 2. Install via Home Assistant Add-on
160160

161161
- Add the [ohAnd/ha_addons](https://github.com/ohAnd/ha_addons) repository to your Home Assistant add-on store.
162-
- [if needed] Add the [Duetting/ha_eos_addon](https://github.com/Duetting/ha_eos_addon) (or [thecem/ha_eos_addon](https://github.com/thecem/ha_eos_addon)) repository to your Home Assistant add-on store.
163-
- Install both the **EOS Add-on** and the **EOS Connect Add-on**.
162+
- select your preferred optimization backend:
163+
- [if needed] Add the [Duetting/ha_eos_addon](https://github.com/Duetting/ha_eos_addon) (or [thecem/ha_eos_addon](https://github.com/thecem/ha_eos_addon)) repository to your Home Assistant add-on store.
164+
- [if needed] Add [thecem/hassio-evopt](https://github.com/thecem/hassio-evopt) repository to your Home Assistant add-on store. ([found here](https://github.com/evcc-io/evcc/discussions/23213#3-optimizer-im-home-assistant-ha-addon-nutzen))
165+
- Install both the **EOS Add-on** (or **evcc opt**) and the **EOS Connect Add-on**.
164166
- Configure both add-ons via the Home Assistant UI.
165167
- Start both add-ons.
166168
The EOS Connect web dashboard will be available at [http://homeassistant.local:8081](http://homeassistant.local:8081) (or your HA IP).

src/eos_connect.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,9 @@ def get_controls():
13631363
"currency_minor_unit": currency_minor_unit,
13641364
},
13651365
"state": optimization_scheduler.get_current_state(),
1366+
"used_optimization_source": config_manager.config.get("eos", {}).get(
1367+
"source", "eos_server"
1368+
),
13661369
"eos_connect_version": __version__,
13671370
"timestamp": datetime.now(time_zone).isoformat(),
13681371
"api_version": "0.0.2",

src/web/index.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,25 @@
321321
</div>
322322
</div>
323323

324+
<div id="experimental-banner" style="
325+
position: fixed;
326+
bottom: 16px;
327+
left: 16px;
328+
background: rgba(241, 177, 0, 0.92);
329+
color: #222;
330+
padding: 8px 18px 8px 12px;
331+
border-radius: 6px;
332+
font-size: 0.95em;
333+
font-weight: bold;
334+
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
335+
z-index: 1001;
336+
display: none;
337+
align-items: center;
338+
gap: 8px;
339+
">
340+
<i class="fa-solid fa-flask" style="margin-right: 8px;"></i>
341+
Experimental Mode: evcc opt is in charge
342+
</div>
324343

325344
<!-- Load JavaScript modules in correct order -->
326345
<script src="js/constants.js"></script>

src/web/js/controls.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,12 @@ class ControlsManager {
427427

428428
// Update mode icon and click handler
429429
this.updateModeIcon(inverterModeNum, overrideActive, controlsData.battery.max_charge_power_dyn);
430+
431+
if (controlsData.used_optimization_source === "evcc_opt") {
432+
document.getElementById("experimental-banner").style.display = "flex";
433+
} else {
434+
document.getElementById("experimental-banner").style.display = "none";
435+
}
430436
}
431437

432438
/**
@@ -475,6 +481,7 @@ class ControlsManager {
475481
document.getElementById('control_discharge_allowed').innerText = states.current_discharge_allowed ? "Yes" : "No";
476482

477483
document.getElementById('current_controls_box').style.border = "";
484+
478485
}
479486

480487
/**

0 commit comments

Comments
 (0)