node-vesync

1.0.3 • Public • Published

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

/node-vesync/

    Package Sidebar

    Install

    npm i node-vesync

    Weekly Downloads

    0

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    6.43 kB

    Total Files

    3

    Last publish

    Collaborators

    • jwdempsey