Skip to content

Using the TuyaSmart url request to create an API with Flask and Python3 to turn on/off you own switch

License

Notifications You must be signed in to change notification settings

Neorichi/tuyaAPIFlask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TuyaAPIFlask

Using the TuyaSmart url request to create an API with Flask and Python3 to turn on/off you own switch

Steps

  1. Buy WiFi TECKIN 16A 3300W
  2. Download Tuya Smart APP in your mobile
  3. Pair device with your mobile APP
  4. Change with your credentials
data={
      "userName": "[email protected]", # change with your email Tuya Smart APP
      "password": "xxxxxxxxxx", # change with your password Tuya Smart APP
      "countryCode": "1",
      "bizType": "tuya",
      "from": "tuya",
}
  1. Get you ID device
    5.1 Edit you device
    5.2 Device information
    5.3 Copy ID Virtual and paste into switchId value
switchId = "xxxxxxxxxxx"

Usage

 pip3 install -r requirements.txt 

To switch on/off

 python3 main.py 

Results

License

MIT

About

Using the TuyaSmart url request to create an API with Flask and Python3 to turn on/off you own switch

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages