Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuyaapi/link
π‘ Effortlessly connect devices to WiFi and the cloud. Documentation: https://tuyaapi.github.io/link.
https://github.com/tuyaapi/link
iot nodejs udp
Last synced: about 2 months ago
JSON representation
π‘ Effortlessly connect devices to WiFi and the cloud. Documentation: https://tuyaapi.github.io/link.
- Host: GitHub
- URL: https://github.com/tuyaapi/link
- Owner: TuyaAPI
- License: mit
- Created: 2018-05-22T19:35:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T05:13:08.000Z (about 1 year ago)
- Last Synced: 2024-03-15T07:23:07.854Z (10 months ago)
- Topics: iot, nodejs, udp
- Language: JavaScript
- Homepage:
- Size: 1.31 MB
- Stars: 14
- Watchers: 4
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
tuyapi/link [![Build Status](https://travis-ci.org/TuyaAPI/link.svg?branch=master)](https://travis-ci.org/TuyaAPI/link) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)
==============A package for connecting a Tuya device to WiFi and the cloud. This package is split up into two sub-modules:
- **`(@tuyapi/link).manual`**: a low-level interface for linking devices.
- **`(@tuyapi/link).wizard`**: a wrapper that combines `(@tuyapi/link).manual` and `@tuya/tuya-connector-nodejs`, making it super easy to link devices. It Just Worksβ’οΈ.## Installation
`npm i @tuyapi/link`## Usage
```javascript
const TuyaLink = require('@tuyapi/link');const register = new TuyaLink.wizard({apiKey: '01010101010101010101',
apiSecret: '01010101010101010101010101010101',
email: '[email protected]', password: 'example-password'});register.init().then(async () => {
let devices = await register.linkDevice({ssid: 'Example-SSID', wifiPassword: 'examplepassword'});
console.log(devices);
});
```[Documentation](https://tuyaapi.github.io/link/)
## Development
1. After cloning, run `npm i`.
2. Create a file called `dev.js` as a playground. Since `dev.js` is in `.gitignore`, it won't be committed.
3. To run tests, run `npm test`.
4. To build documentation, run `npm run document`.[![forthebadge](https://forthebadge.com/images/badges/made-with-javascript.svg)](https://forthebadge.com)