Feature: Kathrein Wallbox + EMS-Controller (v1.5.0)

- wallbox_client.py: WallboxReader FC03, EMS enable/set_current
- ems_controller.py: PV-Überschussladen + 4h-Timeout Zwangsladen bis 06:00
- inverters.py: KATHREIN_WALLBOX mit 18 Sensoren (Meter + EVSE + EMS)
- main.py: kathrein-Protokollzweig, _get_pv_surplus() aus laufenden Geräten

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
retr0
2026-04-28 12:02:59 +02:00
parent 8b65666e80
commit ac965dcfa6
5 changed files with 315 additions and 1 deletions
+37
View File
@@ -169,6 +169,33 @@ def _sdm630_sensors() -> List[Sensor]:
]
def _kathrein_sensors() -> List[Sensor]:
f = "float32"
return [
# Meter (Float32, FC03 Holding Registers ab 0x0030)
Sensor("voltage_l1", "Spannung L1", 0x0030, 2, 1.0, "V", "voltage", "measurement", "mdi:flash", f),
Sensor("voltage_l2", "Spannung L2", 0x0032, 2, 1.0, "V", "voltage", "measurement", "mdi:flash", f),
Sensor("voltage_l3", "Spannung L3", 0x0034, 2, 1.0, "V", "voltage", "measurement", "mdi:flash", f),
Sensor("current_l1", "Strom L1", 0x0036, 2, 1.0, "A", "current", "measurement", "mdi:flash", f),
Sensor("current_l2", "Strom L2", 0x0038, 2, 1.0, "A", "current", "measurement", "mdi:flash", f),
Sensor("current_l3", "Strom L3", 0x003A, 2, 1.0, "A", "current", "measurement", "mdi:flash", f),
Sensor("power_l1", "Ladeleistung L1", 0x003C, 2, 1.0, "W", "power", "measurement", "mdi:ev-station", f),
Sensor("power_l2", "Ladeleistung L2", 0x003E, 2, 1.0, "W", "power", "measurement", "mdi:ev-station", f),
Sensor("power_l3", "Ladeleistung L3", 0x0040, 2, 1.0, "W", "power", "measurement", "mdi:ev-station", f),
Sensor("total_power", "Ladeleistung Gesamt", 0x0054, 2, 1.0, "W", "power", "measurement", "mdi:ev-station", f),
Sensor("session_energy", "Energie Session", 0x0069, 2, 1.0, "Wh", "energy", "total_increasing", "mdi:battery-charging", "uint32"),
Sensor("total_energy", "Energie Gesamt", 0x005C, 2, 1.0, "Wh", "energy", "total_increasing", "mdi:counter", f),
Sensor("frequency", "Frequenz", 0x005E, 2, 1.0, "Hz", "frequency", "measurement", "mdi:sine-wave", f),
# EVSE Status (UINT16)
Sensor("charging_state", "Ladezustand", 0x0060, 1, 1.0, "", None, "measurement", "mdi:ev-plug-type2"),
Sensor("granted_current", "Gewährter Strom", 0x0065, 1, 1.0, "mA", "current", "measurement", "mdi:current-ac"),
Sensor("granted_power", "Gewährte Leistung", 0x0066, 1, 1.0, "W", "power", "measurement", "mdi:ev-station"),
Sensor("charging_duration","Ladedauer", 0x0067, 2, 1.0, "s", "duration", "measurement", "mdi:timer", "uint32"),
# EMS (wird vom Controller geschrieben, hier zum Monitoring)
Sensor("ems_current_sp", "EMS Stromsollwert", 0x00A2, 1, 1.0, "mA", "current", "measurement", "mdi:tune"),
]
INVERTERS = {
"MIC_1500_TL_X": Inverter(
id="MIC_1500_TL_X",
@@ -214,4 +241,14 @@ INVERTERS = {
protocol="goodwe_udp",
goodwe_family="ET",
),
"KATHREIN_WALLBOX": Inverter(
id="KATHREIN_WALLBOX",
name="Kathrein Wallbox",
manufacturer="Kathrein",
sensors=_kathrein_sensors(),
# Meter-Block + EVSE-Status + EMS-Setpoint
read_ranges=[(0x0030, 48), (0x0060, 10), (0x00A2, 1)],
protocol="kathrein",
goodwe_family="",
),
}