Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goktugcy/tuya-restapi-services
Tuya IoT rest api services with express
https://github.com/goktugcy/tuya-restapi-services
express tuya-api tuya-cloud tuya-iot tuya-smart tuyapi typescript
Last synced: 1 day ago
JSON representation
Tuya IoT rest api services with express
- Host: GitHub
- URL: https://github.com/goktugcy/tuya-restapi-services
- Owner: goktugcy
- Created: 2023-12-17T22:11:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-18T07:57:02.000Z (about 1 year ago)
- Last Synced: 2024-11-15T00:29:07.015Z (2 months ago)
- Topics: express, tuya-api, tuya-cloud, tuya-iot, tuya-smart, tuyapi, typescript
- Language: TypeScript
- Homepage:
- Size: 55.7 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Tuya Rest API Service
This project utilizes RESTful APIs to control your devices on the Tuya IoT platform.
## Installation
1. **Install Dependencies:**
```bash
npm install
```
2. **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.
```## API USAGE
#### Switch the Tuya lamb on/off
```
GET /power
```| Parameter | Type | Description |
| :-------- | :------- | :------------------------- |
| `CLIENT_ID` | `string` | **REQUIRED** |
| `CLIENT_SECRET` | `string` | **REQUIRED** |
| `DEVICE_ID` | `string` | **REQUIRED** |## Tuya IoT services
https://iot.tuya.com/