UNPKG

@constructorfleet/ultimate-govee

Version:

Library for interacting with Govee devices written in Typescript.

22 lines 983 B
import { IoTData } from '../api'; import { IoTClient } from './iot.client'; import { IoTHandler } from './iot.handler'; import { GoveeDeviceStatus } from '../govee-device'; export type OnIoTMessageCallback = (message: GoveeDeviceStatus) => void; export declare class IoTService implements IoTHandler { private readonly client; private readonly logger; private messageCallback; constructor(client: IoTClient); onMessage(topic: string, payload: ArrayBuffer, dup: boolean): void; connect(iotData: IoTData, callback: OnIoTMessageCallback): Promise<void>; disconnect(): Promise<void>; send(topic: string, payload: string): Promise<void>; subscribe(topic: string): Promise<void>; private static parseIoTMessage; static recordMessage(deviceId: string, message: GoveeDeviceStatus): GoveeDeviceStatus & { timestamp: number; }; static recordRawMessage(deviceId: string, message: any): any; } //# sourceMappingURL=iot.service.d.ts.map