Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3f82910
Initial TPAP Implementation
ZeliardM Oct 18, 2025
c7a3405
Clean up and coverage testing
ZeliardM Oct 19, 2025
3b15fdd
Try to fix CodeQL Security Warnings
ZeliardM Oct 19, 2025
4afa9eb
Change request headers and ssl context
ZeliardM Oct 19, 2025
65fe12b
Correct sessionId
ZeliardM Oct 21, 2025
6a1c037
Update ciphers
ZeliardM Oct 21, 2025
802b8a1
Merge branch 'python-kasa:master' into feature/tpap
ZeliardM Nov 4, 2025
be03dff
tpaptransport re-write and test coverage
ZeliardM Nov 5, 2025
4582ec1
Merge branch 'feature/tpap' of https://github.com/ZeliardM/python-kas…
ZeliardM Nov 5, 2025
5baddb0
TPAP Certificate handling changes and logging
ZeliardM Dec 8, 2025
43b779d
Fix NOC Authentication Flow
ZeliardM Dec 8, 2025
835c411
Fix test_tpaptransport.py tests
ZeliardM Dec 8, 2025
a2f0df6
Merge branch 'python-kasa:master' into feature/tpap
ZeliardM Dec 8, 2025
d6eeba9
Changes to TSLP Wrapper
ZeliardM Dec 8, 2025
f6837d7
TSLP Decode for Authentication
ZeliardM Dec 9, 2025
86a4ed3
Debug logging for tpaptransport.py
ZeliardM Dec 10, 2025
646ca65
Correct debug logging statements
ZeliardM Dec 10, 2025
8d19e6a
Revert to json for login
ZeliardM Dec 10, 2025
be146b2
Update test coverage
ZeliardM Dec 10, 2025
f4d81f2
Additional logging
ZeliardM Dec 10, 2025
99e0288
Raw response logging instead
ZeliardM Dec 10, 2025
78016e4
Correct noc session parameters
ZeliardM Dec 10, 2025
9005319
Update tpaptransport.py NOC encryption
ZeliardM Dec 10, 2025
21cda17
Test tpap parameter names
ZeliardM Dec 10, 2025
6bdad67
Return key values to correct format and add logging
ZeliardM Dec 11, 2025
ade20d7
Use base64 instead of hex for user_pk
ZeliardM Dec 11, 2025
f5d0da5
Updates and fixes for SPAKE2+ handling
ZeliardM Dec 12, 2025
79bcf3d
Update test coverage
ZeliardM Dec 12, 2025
022775a
Update test coverage
ZeliardM Dec 12, 2025
5f9fc5e
Cleaned up logging and test coverages
ZeliardM Dec 12, 2025
7e5fae8
Add http for TPAP
ZeliardM Dec 13, 2025
3a8eddd
Add correct http port handling for tpap
ZeliardM Dec 13, 2025
230b822
Update spake2+ handling
ZeliardM Dec 13, 2025
d15cbf9
Initial plan
Copilot Dec 13, 2025
c297f54
Add TPAP debug logs documentation file
Copilot Dec 13, 2025
9e1da3d
Add comprehensive debug logging to Spake2pAuthContext and remove mark…
Copilot Dec 13, 2025
a876e4f
Add comprehensive debug logging coverage for all Spake2pAuthContext s…
Copilot Dec 13, 2025
f331495
Merge pull request #1 from ZeliardM/copilot/add-tpap-debug-logs
ZeliardM Dec 13, 2025
31e337f
Initial plan
Copilot Dec 14, 2025
0f5a468
Fix line length violations in tpaptransport.py
Copilot Dec 14, 2025
c1f92ea
Fix final line length violation in tpaptransport.py
Copilot Dec 14, 2025
3a72145
Add coverage.xml to .gitignore and remove from tracking
Copilot Dec 14, 2025
547ead9
Merge pull request #2 from ZeliardM/copilot/check-ci-workflows
ZeliardM Dec 14, 2025
d51788b
Fix initial cipher_suites
ZeliardM Dec 14, 2025
7db0f2c
Update tpap test coverage
ZeliardM Dec 14, 2025
cf5abbd
Update test logging
ZeliardM Dec 14, 2025
6c27973
Fix encoding error
ZeliardM Dec 14, 2025
5ea34bb
Extra logging
ZeliardM Dec 15, 2025
faad4c7
Update hkdf_expand
ZeliardM Dec 15, 2025
f90f4a0
Additional logging
ZeliardM Dec 15, 2025
e8681b5
Fix hkdf expand
ZeliardM Dec 15, 2025
3b1b699
Update logging
ZeliardM Dec 15, 2025
67cc57f
Fix logging
ZeliardM Dec 15, 2025
f55868c
Fix confirmation keys length
ZeliardM Dec 16, 2025
ed8e57f
Starting cleanup from testing
ZeliardM Dec 16, 2025
b8d0387
Update test coverage
ZeliardM Dec 16, 2025
34c89f3
Merge branch 'python-kasa:master' into feature/tpap
ZeliardM Jan 27, 2026
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ __pycache__/

# Coverage
.coverage
coverage.xml

# Tox
.tox
Expand Down
6 changes: 5 additions & 1 deletion kasa/device_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
KlapTransportV2,
LinkieTransportV2,
SslTransport,
TpapTransport,
XorTransport,
)
from .transports.sslaestransport import SslAesTransport
Expand Down Expand Up @@ -233,8 +234,11 @@ def get_protocol(config: DeviceConfig, *, strict: bool = False) -> BaseProtocol
"SMART.KLAP": (SmartProtocol, KlapTransportV2),
"SMART.KLAP.HTTPS": (SmartProtocol, KlapTransportV2),
# H200 is device family SMART.TAPOHUB and uses SmartCamProtocol so use
# https to distuingish from SmartProtocol devices
# https to distinguish from SmartProtocol devices
"SMART.AES.HTTPS": (SmartCamProtocol, SslAesTransport),
# TPAP devices (SMART.* with encrypt_type TPAP and TPAP/HTTPS).
"SMART.TPAP": (SmartProtocol, TpapTransport),
"SMART.TPAP.HTTPS": (SmartProtocol, TpapTransport),
}
if not (prot_tran_cls := supported_device_protocols.get(protocol_transport_key)):
return None
Expand Down
1 change: 1 addition & 0 deletions kasa/deviceconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class DeviceEncryptionType(Enum):
Klap = "KLAP"
Aes = "AES"
Xor = "XOR"
Tpap = "TPAP"


class DeviceFamily(Enum):
Expand Down
10 changes: 6 additions & 4 deletions kasa/transports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
from .linkietransport import LinkieTransportV2
from .sslaestransport import SslAesTransport
from .ssltransport import SslTransport
from .tpaptransport import TpapTransport
from .xortransport import XorEncryption, XorTransport

__all__ = [
"AesTransport",
"AesEncyptionSession",
"SslTransport",
"SslAesTransport",
"AesTransport",
"BaseTransport",
"KlapTransport",
"KlapTransportV2",
"LinkieTransportV2",
"XorTransport",
"SslAesTransport",
"SslTransport",
"TpapTransport",
"XorEncryption",
"XorTransport",
]
Loading
Loading