0.0.1 • Published 3 years ago

easy-usp v0.0.1

Weekly downloads
3
License
GPL-2.0-only
Repository
-
Last release
3 years ago

easy-usp

Helper library for easy usp communication using mqtt over tcp or ws.

USP Reference

Usage

const connect = require("easy-usp");

const options = {
  host: "192.168.1.1",
  port: 9001,
  protocol: "mqtt",
  username: "admin",
  password: "admin",
};

const run = async () => {
  // Connect to device
  const device = await connect(options);

  // Get property
  await get("Device.WiFi.").then(console.log);

  // Disconnect
  await disconnect(session);
};

run();