@homebridge-plugins/homebridge-smarthq
Version:
The SmartHQ plugin allows you to interact with SmartHQ Devices in HomeKit and with Siri.
42 lines • 2.17 kB
JavaScript
import { deviceBase } from '../../devices/device.js';
import { OpalProgressSvcManager, OpalPowerSvcManager, OpalMonitorManager, OpalMetadataSvcManager, OpalFilterMaintenanceSvcManager, OpalNightlightSvcManager, OpalDescaleSvcManager, OpalSchedulingManager } from './Managers/index.js';
import { OpalStatusSvcManager } from './Managers/StatusManagers/index.js';
export class SmartHQIceMaker extends deviceBase {
platform;
device;
powerManager;
nightlightService;
statusManager;
monitorManager;
progressManager;
metadataManager;
filterMaintenanceManager;
descaleManager;
schedulingManager;
constructor(platform, accessory, device) {
super(platform, accessory, device);
this.platform = platform;
this.device = device;
this.platform.debugSuccessLog(`Opal IceMaker Features: ${JSON.stringify(accessory.context.device.features)}`);
/* Services- The order matters! */
this.powerManager = new OpalPowerSvcManager(platform, accessory, device);
this.filterMaintenanceManager = new OpalFilterMaintenanceSvcManager(platform, accessory, device);
this.descaleManager = new OpalDescaleSvcManager(platform, accessory, device);
this.progressManager = new OpalProgressSvcManager(platform, accessory, device);
this.nightlightService = new OpalNightlightSvcManager(platform, accessory, device);
this.statusManager = new OpalStatusSvcManager(this, platform, accessory, device);
/* ------- -------- */
this.schedulingManager = new OpalSchedulingManager(this, platform, accessory, device);
this.monitorManager = new OpalMonitorManager(this, platform, accessory, device);
this.metadataManager = new OpalMetadataSvcManager(this, platform, accessory, device);
this.monitorManager.startServicesMonitoring();
this.monitorManager.startSchedulerMonitoring();
this.monitorManager.startStatusMonitoring();
}
shutdown() {
// Clean up subscriptions
this.monitorManager.stopServicesMonitoring();
this.monitorManager.stopSchedulerMonitoring();
}
}
//# sourceMappingURL=index.js.map