Work in progress implementation of tapo protocol in python.
Writeup here: https://k4czp3r.xyz/reverse-engineering/tp-link/tapo/2020/10/15/reverse-engineering-tp-link-tapo.html
To do list
- Handshake
- Encrypt data
- Login request
- Decrypt data
- Change state
-
Make venv:
python3 -m venv venv
-
Activate venv:
- Linux:
source venv/bin/activate
- Windows:
./venv/Scripts/activate
- Linux:
-
Install requirements
pip install -r req.txt
usage: main.py [-h] TPLINK_EMAIL TPLINK_PASS ADDR STATE
Change plug state.
positional arguments:
TPLINK_EMAIL Your TPLink account email
TPLINK_PASS Your TPLink account password
ADDR Address of your plug (ex. 192.168.2.22)
STATE New state of the plug (on=1 off=0)
optional arguments:
-h, --help show this help message and exit
Example: python main.py [email protected] Password123 192.168.137.135 1