This project is find the most domain color on the screen and set it into smart RGB dimmer using Tuya IOT cloud. It's not so fast because of network delays (about 300 ms), but it can be helpful and it looks cool.
- Install golang
- Clone this repo
- Enter dir with project
- Setup varibles Host, ClientID, Secret, DeviceID. More about auth creadials described below. If you have several dimmers put all of them into array.
- run "go build" and then run compiled binary
- Enjoy!
- Log in to the Tuya IoT Platform.
- In the left navigation bar, click
Cloud
>Development
. - On the page that appears, click
Create Cloud Project
. - In the
Create Cloud Project
dialog box, configureProject Name
,Description
,Industry
, andData Center
. For theDevelopment Method
field, selectSmart Home
from the dropdown list. For theData Center
field, select the zone you are located in. Refer to the country/data center mapping list here to choose the right data center for the country you are in. - Click
Create
to continue with the project configuration. - In Configuration Wizard, make sure you add
Device Status Notification
API. The list of API should look like this: - Click
Authorize
.
- Navigate to the
Devices
tab. - Click
Link Tuya App Account
>Add App Account
. - Scan the QR code that appears using the
Tuya Smart
app orSmart Life
app. - Click
Confirm
in the app. - To confirm that everything worked, navigate to the
All Devices
tab. Here you should be able to find the devices from the app. - If zero devices are imported, try changing the DataCenter and check the account used is the “Home Owner”. You can change DataCenter by clicking the Cloud icon on the left menu, then clicking the Edit link in the Operation column for your newly created project. You can change DataCenter in the popup window.
Click the created project to enter the Project Overview
page and get the Authorization Key
. You will need these for setting up the integration. in the next step.