From 3f9b6dd5b90f0610fec33cc5b9bc1740ef25c1a7 Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Tue, 17 Nov 2026 22:27:56 +0100 Subject: [PATCH 1/6] set minimum charge current for Wallbox. Some cars like Renault Zoe needs mor as 6A --- AUTHORS | 3 ++- README.md | 1 + e3dc/_e3dc.py | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index fad5e7e..5c174f4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -11,4 +11,5 @@ * is00709 @is00709 * Gregor Wolf @gregorwolf * Max Dhom @mdhom -* Torben Nehmer @torbennehmer \ No newline at end of file +* Torben Nehmer @torbennehmer +* Kristian Lorbetzki @lorbetzki \ No newline at end of file diff --git a/README.md b/README.md index a7d2153..1da810c 100644 --- a/README.md +++ b/README.md @@ -153,6 +153,7 @@ Poll returns a dictionary like the following: - `set_power_limits()` - `set_powersave()` - `set_wallbox_max_charge_current()` +- `set_wallbox_min_charge_current()` - `set_wallbox_schuko()` - `set_wallbox_sunmode()` - `set_weather_regulated_charge()` diff --git a/e3dc/_e3dc.py b/e3dc/_e3dc.py index 2a891c0..78c4bb4 100644 --- a/e3dc/_e3dc.py +++ b/e3dc/_e3dc.py @@ -1160,7 +1160,29 @@ def set_wallbox_max_charge_current( wbIndex=wbIndex, keepAlive=keepAlive, ) + + def set_wallbox_min_charge_current( + self, min_charge_current: int, wbIndex: int = 0, keepAlive: bool = False + ) -> bool: + """Sets the minimum charge current of the wallbox via rscp protocol locally. + + Args: + min_charge_current (int): maximum allowed charge current in A + wbIndex (int | None): index of the requested wallbox, + keepAlive (bool | None): True to keep connection alive + Returns: + True if success (wallbox has understood the request, but might have clipped the value) + False if error + """ + return self.sendWallboxSetRequest( + dataIndex=2, + value=min_charge_current, + request=RscpTag.WB_REQ_SET_PARAM_1, + wbIndex=wbIndex, + keepAlive=keepAlive, + ) + def toggle_wallbox_charging( self, wbIndex: int = 0, keepAlive: bool = False ) -> bool: From 1879a5301e4513f9d7f41ce3fc04cee3256da136 Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Tue, 17 Nov 2026 22:47:36 +0100 Subject: [PATCH 2/6] rewrite set_wallbox_min_charge_current because we have a own TAG WB_REQ_SET_MIN_CHARGE_CURRENT --- e3dc/_e3dc.py | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/e3dc/_e3dc.py b/e3dc/_e3dc.py index 78c4bb4..7361ece 100644 --- a/e3dc/_e3dc.py +++ b/e3dc/_e3dc.py @@ -1167,21 +1167,34 @@ def set_wallbox_min_charge_current( """Sets the minimum charge current of the wallbox via rscp protocol locally. Args: - min_charge_current (int): maximum allowed charge current in A + min_charge_current (int): minimum allowed charge current in A wbIndex (int | None): index of the requested wallbox, keepAlive (bool | None): True to keep connection alive Returns: - True if success (wallbox has understood the request, but might have clipped the value) + True if success False if error """ - return self.sendWallboxSetRequest( - dataIndex=2, - value=min_charge_current, - request=RscpTag.WB_REQ_SET_PARAM_1, - wbIndex=wbIndex, + response = self.sendRequest( + ( + RscpTag.WB_REQ_DATA, + RscpType.Container, + [ + (RscpTag.WB_INDEX, RscpType.UChar8, wbIndex), + ( + RscpTag.WB_REQ_SET_MIN_CHARGE_CURRENT, + RscpType.UChar8, + min_charge_current, + ), + ], + ), keepAlive=keepAlive, ) + + if response[0] != RscpTag.WB_DATA.name: + return False + responseData = response[2][-1] + return responseData[1] != RscpType.Error.name def toggle_wallbox_charging( self, wbIndex: int = 0, keepAlive: bool = False From c27a4e4799203c01fd448afd75b266c3d09abe04 Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Tue, 17 Nov 2026 22:59:23 +0100 Subject: [PATCH 3/6] try RscpType int32 --- e3dc/_e3dc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e3dc/_e3dc.py b/e3dc/_e3dc.py index 7361ece..ed416f8 100644 --- a/e3dc/_e3dc.py +++ b/e3dc/_e3dc.py @@ -1183,7 +1183,7 @@ def set_wallbox_min_charge_current( (RscpTag.WB_INDEX, RscpType.UChar8, wbIndex), ( RscpTag.WB_REQ_SET_MIN_CHARGE_CURRENT, - RscpType.UChar8, + RscpType.Int32, min_charge_current, ), ], From f706cbbaf22770b1771598b2551d898548a7df7a Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Wed, 18 Nov 2026 20:18:08 +0100 Subject: [PATCH 4/6] Retrieve the current value using WB_REQ_MIN_CHARGE_CURRENT --- e3dc/_e3dc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/e3dc/_e3dc.py b/e3dc/_e3dc.py index ed416f8..cd43940 100644 --- a/e3dc/_e3dc.py +++ b/e3dc/_e3dc.py @@ -1047,6 +1047,7 @@ def get_wallbox_data(self, wbIndex: int = 0, keepAlive: bool = False): (RscpTag.WB_REQ_EXTERN_DATA_NET, RscpType.NoneType, None), (RscpTag.WB_REQ_APP_SOFTWARE, RscpType.NoneType, None), (RscpTag.WB_REQ_KEY_STATE, RscpType.NoneType, None), + (RscpTag.WB_REQ_MIN_CHARGE_CURRENT, RscpType.NoneType, None), ], ), keepAlive=True, From 7a4c52c6f2e63b429260de6817b8b855521ddc89 Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Wed, 18 Nov 2026 21:05:32 +0100 Subject: [PATCH 5/6] forget to change Dictionary --- e3dc/_e3dc.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/e3dc/_e3dc.py b/e3dc/_e3dc.py index cd43940..ed96ea2 100644 --- a/e3dc/_e3dc.py +++ b/e3dc/_e3dc.py @@ -1030,6 +1030,7 @@ def get_wallbox_data(self, wbIndex: int = 0, keepAlive: bool = False): "index": , "keyState": , "maxChargeCurrent": , + "minChargeCurrent": , "phases": , "schukoOn": , "soc": , @@ -1090,7 +1091,12 @@ def get_wallbox_data(self, wbIndex: int = 0, keepAlive: bool = False): key_state = rscpFindTag(req, RscpTag.WB_KEY_STATE) if key_state is not None: outObj["keyState"] = rscpFindTagIndex(key_state, RscpTag.WB_KEY_STATE) - + + min_charge_current = rscpFindTag(req, RscpTag.WB_MIN_CHARGE_CURRENT) + if min_charge_current is not None and min_charge_current[1] != RscpType.Error.name: + outObj["minChargeCurrent"] = rscpFindTagIndex( + min_charge_current, RscpTag.WB_MIN_CHARGE_CURRENT + ) req = self.sendRequest( (RscpTag.EMS_REQ_BATTERY_TO_CAR_MODE, RscpType.NoneType, None), keepAlive=keepAlive, From ded7e7709443bf56f3c64ed5c71bdcd0ebcfd16b Mon Sep 17 00:00:00 2001 From: Kristian Lorbetzki Date: Wed, 18 Nov 2026 21:22:22 +0100 Subject: [PATCH 6/6] increase version for testing --- e3dc/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e3dc/__init__.py b/e3dc/__init__.py index c851c82..260e0ab 100644 --- a/e3dc/__init__.py +++ b/e3dc/__init__.py @@ -26,4 +26,4 @@ "RscpMessage", "set_rscp_debug", ] -__version__ = "0.10.0" +__version__ = "0.10.1"