UNPKG

homebridge-dmxlight-plugin

Version:
59 lines (58 loc) 2.67 kB
import { PlatformAccessory, CharacteristicValue } from 'homebridge'; import { DMXLightHomebridgePlatform } from './platform'; /** * Platform Accessory * An instance of this class is created for each accessory your platform registers * Each accessory may expose multiple services of different service types. */ export declare class DMXLightPlatformAccessory { private readonly platform; private readonly accessory; private service; private dmxController; private driverName; private startChannel; private universeNumber; private channelCount; private colorOrder; private transitionEffect; private transitionDuration; private ipAddress; private serialPortName; /** * These are just used to create a working example * You should implement your own code to track the state of your accessory */ private accessoryState; constructor(platform: DMXLightHomebridgePlatform, accessory: PlatformAccessory, startChannel: number, universeNumber: number, channelCount: number, driverName: string, colorOrder: string, transitionEffect: string, transitionDuration: number, ipAddress: string, serialPortName: string); /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory, for example, turning on a Light bulb. */ setOn(value: CharacteristicValue): Promise<void>; /** * Handle the "GET" requests from HomeKit * These are sent when HomeKit wants to know the current state of the accessory, for example, checking if a Light bulb is on. * * GET requests should return as fast as possbile. A long delay here will result in * HomeKit being unresponsive and a bad user experience in general. * * If your device takes time to respond you should update the status of your device * asynchronously instead using the `updateCharacteristic` method instead. * @example * this.service.updateCharacteristic(this.platform.Characteristic.On, true) */ getOn(): Promise<CharacteristicValue>; getBrightness(): Promise<CharacteristicValue>; getHue(): Promise<CharacteristicValue>; getSaturation(): Promise<CharacteristicValue>; /** * Handle "SET" requests from HomeKit * These are sent when the user changes the state of an accessory, for example, changing the Brightness */ setBrightness(value: CharacteristicValue): Promise<void>; setHue(value: CharacteristicValue): Promise<void>; setSaturation(value: CharacteristicValue): Promise<void>; getRandomArbitrary(min: any, max: any): any; } //# sourceMappingURL=platformAccessory.d.ts.map