jasonacox / tinytuya

Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the cloud (TuyaCloud API).
MIT License
939 stars 167 forks source link

Adding device #121

Closed louis49 closed 2 years ago

louis49 commented 2 years ago

Hi, I don't succeeded to add a device to my account.

I have multiple problems.

python -m tinytuya scan give me :

TinyTuya (Tuya device scanner) [1.3.1]

Scanning on UDP ports 6666 and 6667 for devices (15 retries)...

Unknown v3.3 Device   Product ID = keyf9fsmuufeywsr  [Valid payload]:
    Address = 192.168.1.15,  Device ID = 43070440e868e7d2e4XX, Local Key = ,  Version = 3.3
    No Stats for 192.168.1.15: DEVICE KEY required to poll for status

then, with : python -m tinytuya wizard give me :

TinyTuya Setup Wizard [1.3.1]
    Enter API Key from tuya.com: dsnhem48bg8wtxgrXXXXX
    Enter API Secret from tuya.com: 234cbc617d0d450394dbba15317XXXXX
    Enter any Device ID currently registered in Tuya App (used to pull full list): 43070440e868e7d2e4XX

      Region List
        cn  China Data Center
        us  US - Western America Data Center
        us-e    US - Eastern America Data Center
        eu  Central Europe Data Center
        eu-w    Western Europe Data Center
        in  India Data Center

    Enter Your Region (Options: cn, us, us-e, eu, eu-w, or in): eu-w

>> Configuration Data Saved to tinytuya.json
{
    "apiKey": "dsnhem48bg8wtxgrXXXXX",
    "apiSecret": "234cbc617d0d450394dbba15317XXXXX",
    "apiRegion": "eu-w",
    "apiDeviceID": "43070440e868e7d2e4XX"
}

**Error from Tuya server: permission deny**

When I use the app "iOT Device Management" to add device to my account, I have a "Login failed - The specified username or password is incorrect. Planse try again" error : IMG_9301

When I use "Link Tuya App Account", I have a "CAPP_BINDED_USERID" error :

Capture d’écran 2022-03-29 à 08 43 53

Any help please ?

jasonacox commented 2 years ago

Hi @louis49, this is the most confusing part of the setup. Make sure you follow the steps as exact as possible ( see here ) If you have, I have some recommendations to consider:

louis49 commented 2 years ago

Thank you a lot, it's now working : I haven't added Smart Home Scene Linkage Service Api