From 2e214b1e7197f949d90517c4aafe61cfdcf05e60 Mon Sep 17 00:00:00 2001 From: Stefan Allius Date: Mon, 13 May 2024 22:46:23 +0200 Subject: [PATCH] avoid sending responses to TSUN for local at commands --- app/src/gen3plus/solarman_v5.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/app/src/gen3plus/solarman_v5.py b/app/src/gen3plus/solarman_v5.py index cd1e5d7..91d2bd0 100644 --- a/app/src/gen3plus/solarman_v5.py +++ b/app/src/gen3plus/solarman_v5.py @@ -61,6 +61,7 @@ class SolarmanV5(Message): self.db = InfosG3P() self.time_ofs = 0 self.forward_modbus_resp = False + self.forward_at_cmd_resp = False self.switch = { 0x4210: self.msg_data_ind, # real time data @@ -318,6 +319,7 @@ class SolarmanV5(Message): async def send_at_cmd(self, AT_cmd: str) -> None: if self.state != self.STATE_UP: return + self.forward_at_cmd_resp = False self.__build_header(0x4510) self._send_buffer += struct.pack(f'