diff --git a/data/config/mosquitto/public/default-dynamic-security.json b/data/config/mosquitto/public/default-dynamic-security.json index 10ed378e2f..8ffe479682 100644 --- a/data/config/mosquitto/public/default-dynamic-security.json +++ b/data/config/mosquitto/public/default-dynamic-security.json @@ -601,6 +601,12 @@ "priority": 0, "allow": true }, + { + "acltype": "publishClientSend", + "topic": "openWB/set/general/legacy_smarthome_active", + "priority": 0, + "allow": true + }, { "acltype": "publishClientSend", "topic": "openWB/set/general/modbus_control", @@ -673,6 +679,12 @@ "priority": 0, "allow": true }, + { + "acltype": "publishClientReceive", + "topic": "openWB/general/legacy_smarthome_active", + "priority": 0, + "allow": true + }, { "acltype": "publishClientReceive", "topic": "openWB/general/modbus_control", diff --git a/packages/control/general.py b/packages/control/general.py index 80941ead81..3d49ed9a2c 100644 --- a/packages/control/general.py +++ b/packages/control/general.py @@ -103,6 +103,7 @@ class GeneralData: temporary_charge_templates_active: bool = False prices: Prices = field(default_factory=prices_factory) range_unit: str = "km" + legacy_smarthome_active: bool = field(default=True, metadata={"topic": "legacy_smarthome_active"}) class General: diff --git a/packages/helpermodules/setdata.py b/packages/helpermodules/setdata.py index 7c03072896..2a5a50b09e 100644 --- a/packages/helpermodules/setdata.py +++ b/packages/helpermodules/setdata.py @@ -756,6 +756,7 @@ def process_general_topic(self, msg: mqtt.MQTTMessage): elif ("openWB/set/general/http_api" in msg.topic or "openWB/set/general/modbus_control" in msg.topic or "openWB/set/general/extern" in msg.topic or + "openWB/set/general/legacy_smarthome_active" in msg.topic or "openWB/set/general/allow_unencrypted_access" in msg.topic): self._validate_value(msg, bool) elif "openWB/set/general/control_interval" in msg.topic: diff --git a/packages/helpermodules/update_config.py b/packages/helpermodules/update_config.py index c35ba3b974..515cd43ac2 100644 --- a/packages/helpermodules/update_config.py +++ b/packages/helpermodules/update_config.py @@ -225,6 +225,7 @@ class UpdateConfig: "^openWB/general/modbus_control$", "^openWB/general/grid_protection_timestamp$", "^openWB/general/grid_protection_random_stop$", + "^openWB/general/legacy_smarthome_active$", "^openWB/general/range_unit$", "^openWB/general/temporary_charge_templates_active$", "^openWB/general/chargemode_config/unbalanced_load_limit$", @@ -626,6 +627,7 @@ class UpdateConfig: ("openWB/general/extern_display_mode", "primary"), ("openWB/general/grid_protection_configured", True), ("openWB/general/http_api", False), + ("openWB/general/legacy_smarthome_active", True), ("openWB/general/modbus_control", False), ("openWB/general/prices/bat", Prices().bat), ("openWB/general/prices/grid", Prices().grid), diff --git a/packages/smarthome/smarthome.py b/packages/smarthome/smarthome.py index c07254231b..fb485249a2 100644 --- a/packages/smarthome/smarthome.py +++ b/packages/smarthome/smarthome.py @@ -26,6 +26,9 @@ def readmq() -> None: def smarthome_handler() -> None: + if not SubData.general_data.data.legacy_smarthome_active: + return + def handler() -> None: try: try: