tinytuya | Python API for Tuya WiFi smart devices using a direct local area network (LAN) connection or the clo
kandi X-RAY | tinytuya Summary
kandi X-RAY | tinytuya Summary
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). This is a compatible replacement for the pytuya PyPi module. Tuya devices are designed to communicate with the TuyaCloud but most also expose a local area network API, allowing us to directly control the devices without using the cloud. This python module provides a way to poll status and issue commands to these devices. Starting with v1.3.0, TinyTuya can also connect to the Tuya Cloud to poll status and issue commands to Tuya devices. NOTE: This module requires the devices to have already been activated by Smart Life App.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Run TinyTiny wizard
- Get OAuth token from Cloud Platform
- Builds a TensorBoard URL
- Filter a list of devices
- List all available devices
- Remove connection from server
- Get my ip address
- Handles GET requests
- Generate payload
- Prints a list of TensorBoard devices
- List available devices
- Send request to device
- Close the socket
- Set colour temperature
- Set bulb mode
- Return a list of devices
- Get scene transitions
- Turns the brightness
- Set the brightness of the bulb
- Set timer
- Set white
- Set bulb type
- Print a snapshot of all devices
- Generate a payload
- Start the Tuybal thread
- Receive a button
- Return a list of polling devices
- Set colour
tinytuya Key Features
tinytuya Examples and Code Snippets
Community Discussions
Trending Discussions on Internet of Things (IoT)
QUESTION
I have js files Dashboard and Adverts. I managed to get Dashboard to list the information in one json file (advertisers), but when clicking on an advertiser I want it to navigate to a separate page that will display some data (Say title and text) from the second json file (productadverts). I can't get it to work. Below is the code for the Dashboard and next for Adverts. Then the json files
...ANSWER
Answered 2020-May-17 at 23:55The new object to get params in React Navigation 5 is:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install tinytuya
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. Follow the steps below:.
PAIR - Download the Smart Life App or Tuya Smart App, available for iPhone or Android. Pair all of your Tuya devices (this is important as you cannot access a device that has not been paired).
SCAN - Run the TinyTuya scan to get a list of Tuya devices on your network. It will show device Address, Device ID and Version number (3.1 or 3.3): python -m tinytuya scan NOTE: You will need to use one of the displayed Device IDs for step 4.
TUYA ACCOUNT - Set up a Tuya Account: Create a Tuya Developer account on iot.tuya.com and log in. NOTE: Tuya makes changes to their portal and this process frequently so details may vary. Please create an issue or pull request with screenshots if we need to update these instructions. Click on "Cloud" icon -> "Create Cloud Project" Remember the "Data Center" you select. This will be used by TinyTuya Wizard (screenshot). Skip the configuration wizard but remember the Authorization Key: API ID and Secret for below (screenshot). Click on "Cloud" icon -> Select your project -> Devices -> Link Tuya App Account (see screenshot) Click Add App Account (screenshot) and it will display a QR code. 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. When you scan the QR code, it will link all of the devices registered in your Smart Life app into your Tuya IoT project. 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. (screenshot). The data center may not be the most logical. As an example, some in the UK have reported needing to select "Central Europe" instead of "Western Europe". SERVICE API: Under "Service API" ensure these APIs are listed: IoT Core, Authorization and Smart Home Scene Linkage. To be sure, click subscribe again on every service. Very important: disable popup blockers otherwise subscribing won't work without providing any indication of a failure. Make sure you authorize your Project to use those APIs: Click "Service API" tab Click "Go to Authorize" button Select the API Groups from the dropdown and click Subscribe (screenshot)
WIZARD - Run Setup Wizard: Tuya has changed their data center regions. Make sure you are using the latest version of TinyTuya (v1.2.10 or newer). From your Linux/Mac/Win PC run the TinyTuya Setup Wizard to fetch the Local_Keys for all of your registered devices: python -m tinytuya wizard # use -nocolor for non-ANSI-color terminals e.g. Windows cmd The Wizard will prompt you for the API ID key, API Secret, API Region (cn, us, us-e, eu, eu-w, or in) from your Tuya IoT project as set in Step 3 above. To find those again, go to iot.tuya.com, choose your project and click Overview API Key: Access ID/Client ID API Secret: Access Secret/Client Secret It will also ask for a sample Device ID. Use one from step 2 above or found in the Device List on your Tuya IoT project. The Wizard will poll the Tuya IoT Cloud Platform and print a JSON list of all your registered devices with the "name", "id" and "key" of your registered device(s). The "key"s in this list are the Devices' Local_Key you will use to access your device. In addition to displaying the list of devices, Wizard will create a local file devices.json that TinyTuya will use to provide additional details for scan results from tinytuya.deviceScan() or when running python -m tinytuya scan. The wizard also creates a local file tuya-raw.json that contains the entire payload from Tuya Cloud. The Wizard will ask if you want to poll all the devices. If you do, it will display the status of all devices on record and create a snapshot.json file with these results.
If you ever reset or re-pair your smart devices, the Local_Key will be reset and you will need to repeat the steps above.
The TinyTuya Wizard was inspired by the TuyAPI CLI which is an alternative way to fetch the Local_Keys: npm i @tuyapi/cli -g and run tuya-cli wizard
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page