UNPKG

homebridge-plugin-waveshare-relay

Version:

Homebridge plugin exposing Waveshare Raspberry Pi Relay Board as a series of switches

39 lines 1.58 kB
import { ILogger, IPlatformConfig, IAPI, IDynamicPlatformPlugin, IService, ICharacteristic, IPlatformAccessory } from './homebridge-types'; import { IWaveshareRelay, WaveshareRelayApi } from './services/waveshare-relay-api'; /** * HomebridgePlatform * This class is the main constructor for your plugin, this is where you should * parse the user config and discover/register accessories with Homebridge. * @implements {IDynamicPlatformPlugin} */ export declare class WaveshareRelayHomebridgePlatform implements IDynamicPlatformPlugin { log: ILogger; config: IPlatformConfig; api: IAPI; Service: IService; Characteristic: ICharacteristic; name: string; accessories: IPlatformAccessory[]; waveshareRelayApis: WaveshareRelayApi[]; /** * * @param log * @param config * @param api */ constructor(log: ILogger, config: IPlatformConfig, api: IAPI); /** * Invoked when homebridge restores cached accessories from disk at startup. * It should be used to setup event handlers for characteristics and update respective values. * @param accessory */ configureAccessory: (accessory: IPlatformAccessory) => void; /** * Discover and register Waveshare relays. * Accessories must only be registered once, so previously created accessories * are not registered again to prevent "duplicate UUID" errors. */ discoverDevices: () => Promise<void>; updateOrRegisterRelay: (relay: IWaveshareRelay) => void; } //# sourceMappingURL=waveshare-relay-homebridge-platform.d.ts.map