diff --git a/haos-addon/config.yaml b/haos-addon/config.yaml index 1884596..88ef316 100644 --- a/haos-addon/config.yaml +++ b/haos-addon/config.yaml @@ -1,5 +1,5 @@ name: ShineBridge -version: "1.8.26" +version: "1.8.27" slug: shinebridge description: Growatt Wechselrichter lokal in Home Assistant — Modbus TCP via ShineLAN-X, MQTT Discovery, Web UI url: https://gitea.bitfire.work/retr0/shinebridge diff --git a/haos-addon/src/inverters.py b/haos-addon/src/inverters.py index f6c4581..61e649b 100644 --- a/haos-addon/src/inverters.py +++ b/haos-addon/src/inverters.py @@ -247,8 +247,9 @@ INVERTERS = { name="Kathrein Wallbox", manufacturer="Kathrein", sensors=_kathrein_sensors(), - # Meter-Block + EVSE-Status + EMS-Setpoint - read_ranges=[(0x0030, 48), (0x0060, 10), (0x00A2, 1)], + # Meter-Block 0x0030-0x005F + charging_state 0x0060 (solo, 0x0061-0x0064 existieren nicht) + # + EVSE-Status 0x0065-0x006A + EMS-Setpoint 0x00A2 + read_ranges=[(0x0030, 48), (0x0060, 1), (0x0065, 6), (0x00A2, 1)], protocol="kathrein", goodwe_family="", ), diff --git a/haos-addon/src/main.py b/haos-addon/src/main.py index d906a0f..6d8581f 100644 --- a/haos-addon/src/main.py +++ b/haos-addon/src/main.py @@ -345,7 +345,7 @@ def _poll_loop(inv_cfg: Dict[str, Any], stop: threading.Event): # EMS: PV-Überschuss aus anderen Geräten holen und Ladestrom regeln if ems is not None and values is not None and inv_cfg.get("ems_enabled", True): pv_surplus = _get_pv_surplus() - # 0x0060 gibt IllegalAddress zurück wenn kein Auto angesteckt → State 0 (Idle) + # charging_state aus 0x0060 (solo-Read); fehlt bei kein Fahrzeug → 0 (Idle) charging_state = int(values.get("charging_state", 0)) wallbox_power = values.get("total_power", 0.0) ems_status = ems.update(reader, pv_surplus, charging_state, wallbox_power) diff --git a/haos-addon/src/web/index.html b/haos-addon/src/web/index.html index dd3538f..d67d01a 100644 --- a/haos-addon/src/web/index.html +++ b/haos-addon/src/web/index.html @@ -1693,7 +1693,7 @@ async function wizardStep2Next() { if (!name || !ip) { showToast("Name und IP sind Pflichtfelder", "err"); return; } const model = document.getElementById("wz-inv-model").value; const id = Math.random().toString(36).slice(2, 10); - const body = [{ + const newInv = { id, name, inverter_model: model, @@ -1702,7 +1702,9 @@ async function wizardStep2Next() { modbus_address: parseInt(document.getElementById("wz-inv-addr").value) || 1, mqtt_topic_prefix: `growatt/${name.toLowerCase().replace(/\s+/g, "_")}`, update_interval: 30, - }]; + }; + // Bestehende Geräte behalten — Wizard darf nicht die komplette Liste überschreiben + const body = [...invertersList, newInv]; try { await fetchJSON(api("api/inverters-config"), { method: "POST", headers: {"Content-Type": "application/json"},