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. |