Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More →
Socket
Book a DemoSign in
Socket

@tuyapi/link

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tuyapi/link

📡 Effortlessly connect devices to WiFi and the cloud

latest
Source
npmnpm
Version
0.5.0
Version published
Weekly downloads
345
-21.23%
Maintainers
2
Weekly downloads
 
Created
Source

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: 'example@example.com', password: 'example-password'});

register.init().then(async () => {
  let devices = await register.linkDevice({ssid: 'Example-SSID', wifiPassword: 'examplepassword'});
  console.log(devices);
});

Documentation

Development

  • After cloning, run npm i.
  • Create a file called dev.js as a playground. Since dev.js is in .gitignore, it won't be committed.
  • To run tests, run npm test.
  • To build documentation, run npm run document.

forthebadge

Keywords

iot

FAQs

Package last updated on 01 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts