0.2.1 • Published 7 months ago

@jliuhtonen/nightvision v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Nightvision

Nightvision CI

Lenbrook Service Discovery Protocol implementation for Node.js. See specification.

This library provides you with a client and server implementation for the protocol that allows you to send and receive messages to discover supported devices and their capabilities.

Currently, it cannot be used to advertise services as only queries can be sent. Contributions are welcome.

Example

import { createConnection } from "nightvision"
const conn = await createConnection()

conn.onData((err, result) => {
  if (err) {
    console.error(err)
    return
  }
  console.log(JSON.stringify(result, null, 2))
})

await conn.sendMessage({
  type: "query",
  messageType: "standard",
  classIds: ["0001"],
})

As mentioned in the specification, the guideline is to send startup messages 7 times within certain time interval and delays. This is considered out of scope for this library.

0.2.1

7 months ago

0.2.0

7 months ago

0.1.0

8 months ago