UNPKG

homebridge-am43-blinds-bluez

Version:

A homebridge plugin to control AM43 based shade motors in HomeKit. These include the A OK and Zemismart bluetooth based motors. This plugin requires a Homebridge host that supports Bluetooth 4.0

28 lines (27 loc) 1.09 kB
/// <reference types="node" /> import { Device, GattServer } from "node-ble"; declare class BLE { private bluetooth; private destroy; private adapter; private uuidToDeviceAndGatt; private callbackToCharacteristic; constructor(); discover(wait?: number): Promise<string[]>; connectToDevice(uuid: string): Promise<{ device: Device; gattServer: GattServer; }>; getServiceAndCharacteristicUUIDs(uuid: string): Promise<{ serviceUUID: string; characteristicUUID: string; }>; disconnectDevice(uuid: string): Promise<void>; writeValue(uuid: string, primaryServiceUUID: string, characteristicUUID: string, value: Buffer): Promise<void>; readValue(uuid: string, primaryServiceUUID: string, characteristicUUID: string): Promise<Buffer>; subscribe(uuid: string, primaryServiceUUID: string, characteristicUUID: string, callback: (buffer: Buffer) => void): Promise<void>; unsubscribe(callback: (buffer: Buffer) => void): Promise<void>; destroyBluetooth(): void; } declare const ble: BLE; export { ble };