Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
17 changes: 5 additions & 12 deletions framework/core/powerModules/kasaControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion framework/core/remoteControllerModules/olimex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down