This project utilizes RESTful APIs to control your devices on the Tuya IoT platform.
-
Install Dependencies:
npm install
-
Set Environment Variables:
Set the following environment variables to run the project:
CLIENT_ID: Client ID obtained from the Tuya platform.
CLIENT_SECRET: Client secret obtained from the Tuya platform.
DEVICE_ID: Identifiers of the Tuya devices you want to control (comma-separated list).
SWITCH_COMMAND: Command code used for switching in your Tuya devices.
GET /power
Parameter | Type | Description |
---|---|---|
CLIENT_ID |
string |
REQUIRED |
CLIENT_SECRET |
string |
REQUIRED |
DEVICE_ID |
string |
REQUIRED |