homebridge-sonnenbatterie-v2
Version:
A Homebridge plugin for a SonnenBatterie with v2 firmware.
39 lines • 1.76 kB
TypeScript
import { API, DynamicPlatformPlugin, Logger, PlatformAccessory, PlatformConfig, Service, Characteristic } from "homebridge";
import { SonnenAPI } from "./sonnenApi";
import { SonnenAccessoryFactory } from "./sonnenAccessory";
import { SonnenMQTT } from "./garageclient";
/**
* 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.
*/
export declare class SonnenHomebridgePlatform implements DynamicPlatformPlugin {
readonly log: Logger;
readonly config: PlatformConfig;
readonly api: API;
readonly Service: typeof Service;
readonly Characteristic: typeof Characteristic;
readonly accessories: PlatformAccessory[];
readonly sonnenAPI: SonnenAPI;
readonly sonnenMqtt: SonnenMQTT;
private updatableAccessories;
constructor(log: Logger, config: PlatformConfig, api: API);
/**
* This function is invoked when homebridge restores cached accessories from disk at startup.
* It should be used to setup event handlers for characteristics and update respective values.
*/
configureAccessory(accessory: PlatformAccessory): void;
/**
* This method is used to register discovered accessories.
* Accessories must only be registered once, previously created accessories
* must not be registered again to prevent "duplicate UUID" errors.
*/
discoverDevices(): Promise<void>;
mqttConnect(): Promise<void>;
runloop(): void;
registerAccessories(): void;
registerAccessory(factory: SonnenAccessoryFactory, displayName: string): Promise<void>;
updateAccessories(): void;
fetchSonnenStatus(): Promise<void>;
}
//# sourceMappingURL=platform.d.ts.map