1.0.3 • Published 2 years ago

node-vesync v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago