A Python sdk for Tuya Open API, which provides IoT capabilities, maintained by Tuya official
Project description
[WIP] tuya-iot-py-sdk
A Python sdk for Tuya Open API, which provides basic IoT capabilities like device management, asset management and industry capabilities, helping you create IoT solutions. With diversified devices and industries, Tuya Cloud Development Platform opens basic IoT capabilities like device management, AI scenarios, and data analytics services, as well as industry capabilities, helping you create IoT solutions.
Features
- OpenAPI
- Get the device list
- Get the device details
- Get device status
- Control devices
- Modify the device name
- Query the device log
- Remove devices
- ...
- Open IoT Hub (Not released yet)
- Get device status change
Possible scenarios
- HomeAssistant Tuya Plugin
- ...
Before use
Part 1. Tuya IoT Platform
- Register a Tuya Developer account in Tuya IoT Platform.
- Go to Tuya IoT Platform > Cloud > Projects, and Click Create. Select Industry Solutions in the Project Type field, and select Smart Home in the Industry field.
- Go to Projects > My Project, and click the created project to view details. Click Applications > Cloud to get your AccessID and AccessSecret.
- Click Users > Add User to create a user.
- Click Assets > New Asset to create an asset.
- To manage your asset, click Manage in the Action column. Click Authorized Users > Add Authorization, and add the user created in Step 4.
- Go to Projects > API Products > All Products, click Industry Project, and subscribe to your desired API products.
- Go to Projects > API Products > Subscribed Products. Click one of your subscribed products, and click Project > New Authorization to authorize your project to use this API.
- Add the AccessID, AccessSecret, username, password, and asset ID in your code.
Part 2. Device configuration
- Open the IoT Config app (not available for WeChat Mini Programs, iOS apps, and Android apps).
- Log in to Tuya IoT Platform.
- Choose the asset created in Part 1.
- Configure your device into the asset.
Usage
Installation
pip3 install tuya-iot-py-sdk
Sample code
Tuya Open API reference
Tuya opens up a variety of APIs covering business scenarios such as device pairing, smart home management, device control, and scene automation. You can call APIs according to API integration documents to implement applications.
For more information, see the documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for tuya_iot_py_sdk-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c64b9daae6911f165e25d742280796885535b6d394d8d9f8c3053cb091f4f6b |
|
MD5 | 5c5b921a8013c748e8f405c4bfa2e6c9 |
|
BLAKE2b-256 | 67c37626937ca9e80ea9af14333e130e4627ac6990304f38086c351d7fc2e6da |