New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-vesync

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-vesync

An unofficial library to control Vesync devices

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

node-vesync

An unofficial node library used to communicate with Vesync devices.

Installation

npm i node-vesync

Usage

// Create an VesyncClient object
const client = new VesyncClient();

// Login with the same email and password you would use in the Vesync mobile app:
await client.login("email", "password");

// Get a list of all registered devices:
const devices = await client.getDevices();

// Get device information about a device named Living Room:
const device = await client.getDeviceDetails(
  devices.find((d) => d.deviceName === "Living Room")
);

// Power on Living Room:
await client.turnOn(device);

// Power off Living Room:
await client.turnOff(device);

// Set brightness level of Living Room:
await client.setBrightness(device, 50);

Credit

  • The fantastic python library pyvesync for how to structure API calls
  • The etekcity-smartplug library and homebridge-vesync plugin for ideas on how to handle additional devices

Keywords

vesync

FAQs

Package last updated on 17 Apr 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