/** * The Shelly `DeviceSource` (design.md D3, D22; tasks 6.7, 6.7b). * * Preserves the transport split already established for the HomeKit-facing * Shelly source: an MQTT-transport device is push-backed from its * `NotifyStatus` and `online` (LWT) topics and excluded from polling; an * HTTP-transport device is refreshed on a configurable interval. Devices * registered after the source has started are picked up without a restart. * * Shelly publishes no capability schema, so each device's description comes * from `shellyCapabilitiesFor()` — an authored, per-type description that * satisfies the rich descriptor requirement in full. */ import type { Logger } from "pino"; import type { MqttService } from "../mqtt/mqtt-service.js"; import type { ShellyService } from "../services/shelly-service.js"; import type { DeviceChangeListener, DeviceCommandOutcome, DeviceDescriptor, DeviceSource } from "./device-source.js"; export declare const SHELLY_SOURCE_ID = "shelly"; /** Default poll interval for HTTP-transport Shelly devices, in milliseconds. */ export declare const DEFAULT_SHELLY_SOURCE_POLL_MS = 10000; export declare class ShellyDeviceSource implements DeviceSource { private readonly shelly; private readonly mqtt; private readonly logger; private readonly pollIntervalMs; readonly id = "shelly"; private readonly listeners; private readonly tracked; private readonly mqttSubscriptions; private onRegisteredCb; private pollTimer; constructor(shelly: ShellyService | null, mqtt: MqttService, logger: Logger, pollIntervalMs?: number); get available(): boolean; start(): void; stop(): void; list(): DeviceDescriptor[]; get(deviceId: string): DeviceDescriptor | undefined; command(deviceId: string, properties: Record): Promise; subscribe(listener: DeviceChangeListener): () => void; private addDevice; private addMqttSubscriptions; private removeMqttSubscriptions; private handleNotifyStatus; private handleOnline; /** * One poll tick: iterate the *live* list of HTTP-transport devices only — * MQTT-transport devices are bridged via push status/presence instead — * fetch each device's status, normalize it, and notify. Per-device errors * are caught, logged, and marked unreachable so one unreachable device * cannot abort the tick or block the others. */ private poll; private normalize; private updateTracked; private notify; private toDescriptor; } //# sourceMappingURL=shelly-source.d.ts.map