hap-server
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

hap-server

Re-exports bridge and standalone mode from HAP-NodeJS for easier consumability by end users.

Installation

npm i hap-server

Bridge example

import { Bridge } from "hap-server";
 
import myAccessory from "./…";
 
accessories = [
  myAccessory,
  …
]
 
Bridge(accessories);

You can pass a 2nd argument to Bridge to customize the bridge settings.

Bridge(accessories, {
  publishInfo: {
    pincode: "031-45-154",
  },
});

Standalone Example

In standalone mode, every accessory will be published on the network separately and each will get a port assigned, starting with 51826.

import { Standalone } from "hap-server";
 
import myAccessory from "./…";
import my2ndAccessory from "./…";
 
accessories = [
  myAccessory,
  my2ndAccessory,
  …
]
 
Standalone(accessories);

Package Sidebar

Install

npm i hap-server

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

13.6 kB

Total Files

14

Last publish

Collaborators

  • patrikholcak