Skip to content
/ link Public

📡 Effortlessly connect devices to WiFi and the cloud. Documentation: https://tuyaapi.github.io/link.

License

Notifications You must be signed in to change notification settings

TuyaAPI/link

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tuyapi/link Build Status XO code style

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

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

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

About

📡 Effortlessly connect devices to WiFi and the cloud. Documentation: https://tuyaapi.github.io/link.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published