![]() ![]() NO DEVICES? If no devices show up after scanning the QR code, you will need to select a different data center and edit your project (or create a new one) until you see your paired devices from the Smart Life App show up.When you scan the QR code, it will link all of the devices registered in your Smart Life app into your Tuya IoT project. Scan the QR code with the Smart Life app on your Phone (see step 1 above) by going to the "Me" tab in the Smart Life app and clicking on the QR code button in the upper right hand corner of the app. Click Add App Account ( screenshot) and it will display a QR code.Click on "Cloud" icon -> Select your project -> Devices -> Link Tuya App Account ( see screenshot). ![]() Skip the configuration wizard but remember the Authorization Key: API ID and Secret for below ( screenshot).This will be used by TinyTuya Wizard ( screenshot). Remember the "Data Center" you select.Click on "Cloud" icon -> "Create Cloud Project".When it asks for the "Account Type", select "Skip this step." (see screenshot). Please open an issue with screenshots if we need to update these instructions. NOTE: Tuya often changes their portal and services.TUYA ACCOUNT - Set up a Tuya Account (see PDF Instructions): NOTE: You will need to use one of the displayed Device IDs for step 4. It will show device Address, Device ID and Version number (3.x): python -m tinytuya scan SCAN (Optional) - Run the TinyTuya scan to get a list of Tuya devices on your network. Pair all of your Tuya devices (this is important as you cannot access a device that has not been paired). PAIR - Download the Smart Life App or Tuya Smart App, available for iPhone or Android. TinyTuya has a built-in setup Wizard that uses the Tuya IoT Cloud Platform to generate a JSON list (devices.json) of all your registered devices, including secret Local_Key and Name of your devices. Your LAN and firewall will need to allow UDP (6666, 66) and TCP (6668) traffic. It will show Address, Device ID and Version for each device. TinyTuya has a built in network scanner that can be used to find Tuya Devices on your local network. Local_Key - Security key needed to access the Tuya device.Device ID - Unique identifier for the Tuya device.Address - Network address (IPv4) of the device e.g.Tuya Device PreparationĬontrolling and monitoring Tuya devices on your network requires the following: Pip will attempt to install pycryptodome, requests and colorama if not already installed. TinyTuya supports python versions 2.7 and 3.x (recommended). ![]() NOTE: Devices need to be activated by Smart Life App. status () print ( 'Device status: %r ' % data ) OutletDevice ( 'DEVICE_ID_HERE', 'IP_ADDRESS_HERE', 'LOCAL_KEY_HERE' ) d. # Example Usage of TinyTuya import tinytuya d = tinytuya. TinyTuya can also connect to the Tuya Cloud to poll status and issue commands to Tuya devices. This python module provides a way to poll status and issue commands to these devices. This allows us to directly control the devices without using the cloud. Tuya devices are designed to communicate with the TuyaCloud but most also expose a local area network API. This is a compatible replacement for the pytuya PyPI module and currently supports Tuya Protocols 3.1, 3.2, 3.3, 3.4 and 3.5. This python module controls and reads state of Tuya compatible WiFi Smart Devices (Plugs, Switches, Lights, Window Covers, etc.) using the local area network (LAN) or the cloud (TuyaCloud API). Python module to interface with Tuya WiFi smart devices Description ![]()
0 Comments
Leave a Reply. |