# easy-usp

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

Latest version **0.0.1** (published 2021-01-28) · GPL-2.0-only license · 0 weekly downloads

## Install

```sh
npm install easy-usp
pnpm add easy-usp
yarn add easy-usp
bun add easy-usp
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-01-28 |
| First published | 2021-01-28 |
| Weekly downloads | 0 |
| License | GPL-2.0-only |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 197.8 KB |
| Known vulnerabilities | 0 (+11 in 1 direct dependencies) |
| Install scripts | no |
| Author | Marin Karamihalev |
| Maintainers | iopsys |

## Links

- npm: https://www.npmjs.com/package/easy-usp
- npm.io page: https://npm.io/package/easy-usp

## Dependencies (4)

- [ws](https://npm.io/package/ws.md) ^7.3.0
- [async-mqtt](https://npm.io/package/async-mqtt.md) ^2.6.1
- [protobufjs](https://npm.io/package/protobufjs.md) ^6.10.1
- [isomorphic-ws](https://npm.io/package/isomorphic-ws.md) ^4.0.1

## Recent versions

- 0.0.1 (latest) — 2021-01-28

## README

# easy-usp

Helper library for easy usp communication using mqtt over tcp or ws.

[USP Reference](https://usp-data-models.broadband-forum.org/tr-181-2-13-0-usp.html)

# Usage

```javascript
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();
```

---
_Source: https://npm.io/package/easy-usp · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
