Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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/