From c47ec58d1f448fa775c6d141b13d55f435f381bf Mon Sep 17 00:00:00 2001 From: TB-1993 <109213741+TB-1993@users.noreply.github.com> Date: Mon, 17 Feb 2025 13:01:40 +0000 Subject: [PATCH 1/3] Fix 149: Correct powerKasa to use is_on/is_off properties correctly --- framework/core/powerModules/kasaControl.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/framework/core/powerModules/kasaControl.py b/framework/core/powerModules/kasaControl.py index a1add16..3f474a7 100644 --- a/framework/core/powerModules/kasaControl.py +++ b/framework/core/powerModules/kasaControl.py @@ -83,8 +83,6 @@ def __init__( self, log:logModule, ip:str, args:str=None, options:str=None, **kw kwargs ([dict]): [any other args] """ super().__init__(log) - self.is_on = False - self.is_off = False self.slotIndex=0 self.ip = ip #config.get("ip") @@ -215,29 +213,24 @@ def __getstate__(self): self._log.debug(powerState) # Check if this strip is off if powerState[0] == "OFF": - self.is_on = False - self.is_off = True + self._is_on = False self._log.debug("Device state: OFF") return # Check if the this socket is off. if powerState[self.slotIndex+1] == "OFF": - self.is_on = False - self.is_off = True + self._is_on = False self._log.debug("Slot state: OFF") else: - self.is_on = True - self.is_off = False + self._is_on = True self._log.debug("Slot state: ON") else: result = self.performCommand("state") # | grep 'Device state' | cut -d ' ' -f 3 if "Device state: False" in result: - self.is_on = False - self.is_off = True + self._is_on = False self._log.debug("Device state: OFF") else: - self.is_on = True - self.is_off = False + self._is_on = True self._log.debug("Device state: ON") def reboot(self): From 60ac0d477c15912201514812ec1c249f5e47cf82 Mon Sep 17 00:00:00 2001 From: TB-1993 <109213741+TB-1993@users.noreply.github.com> Date: Wed, 19 Feb 2025 18:57:43 +0000 Subject: [PATCH 2/3] Fix #153: Added 30 timeout readUntil in olimex sendKey Increased the timeout in the readUntil in the sendKey method of the olimex remote control module to prevent timeout when key send is successful --- framework/core/remoteControllerModules/olimex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/core/remoteControllerModules/olimex.py b/framework/core/remoteControllerModules/olimex.py index 9bd5461..7458a0f 100644 --- a/framework/core/remoteControllerModules/olimex.py +++ b/framework/core/remoteControllerModules/olimex.py @@ -48,7 +48,7 @@ def command(self, cmd:str): self.telnet.read_very_eager() if False==self.telnet.write(cmd): return False - if not "(OK)" in self.telnet.read_until("(OK)"): + if not "(OK)" in self.telnet.read_until("(OK)", 20): return False self.telnet.disconnect() return True From 5a0b61f836038341df875ab9973bc8e256b41276 Mon Sep 17 00:00:00 2001 From: TB-1993 <109213741+TB-1993@users.noreply.github.com> Date: Mon, 3 Mar 2025 10:38:34 +0000 Subject: [PATCH 3/3] Bumped changelog --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae63b95..453b8a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,24 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [1.3.1](https://github.com/rdkcentral/python_raft/compare/1.3.0...1.3.1) + +- Fix #153: Added 30 timeout readUntil in olimex sendKey [`#154`](https://github.com/rdkcentral/python_raft/pull/154) +- Fix 149: Correct powerKasa to use is_on/is_off properties correctly [`#150`](https://github.com/rdkcentral/python_raft/pull/150) +- Release 1.3.0: master -> develop [`#145`](https://github.com/rdkcentral/python_raft/pull/145) +- Merge pull request #154 from rdkcentral/feature/gh153_bugfix_olimex_keysend_timeout [`#153`](https://github.com/rdkcentral/python_raft/issues/153) +- Fix #153: Added 30 timeout readUntil in olimex sendKey [`#153`](https://github.com/rdkcentral/python_raft/issues/153) + #### [1.3.0](https://github.com/rdkcentral/python_raft/compare/1.2.2...1.3.0) +> 30 January 2025 + +- Release 1.3.0: release -> master [`#144`](https://github.com/rdkcentral/python_raft/pull/144) - Update #132: Created abstract power module and added Tapo support [`#135`](https://github.com/rdkcentral/python_raft/pull/135) - Release 1.2.2: master -> develop [`#143`](https://github.com/rdkcentral/python_raft/pull/143) - Fix #132: Fixed typos [`#132`](https://github.com/rdkcentral/python_raft/issues/132) - Fix #132: Updated example_rack_config to show username password are [`#132`](https://github.com/rdkcentral/python_raft/issues/132) +- Bumped CHANGELOG [`6352b22`](https://github.com/rdkcentral/python_raft/commit/6352b22c25cdeacaa87618c06871012513c2c1dc) #### [1.2.2](https://github.com/rdkcentral/python_raft/compare/1.2.1...1.2.2)