UNPKG

homebridge-logo-platform

Version:
153 lines 8.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SubAccessory = exports.Accessory = exports.LogoDefault = exports.LogoInterface = exports.LogoType = void 0; const switchPlatformAccessory_1 = require("./accessories/switchPlatformAccessory"); const lightbulbPlatformAccessory_1 = require("./accessories/lightbulbPlatformAccessory"); const blindPlatformAccessory_1 = require("./accessories/blindPlatformAccessory"); const windowPlatformAccessory_1 = require("./accessories/windowPlatformAccessory"); const garagedoorPlatformAccessory_1 = require("./accessories/garagedoorPlatformAccessory"); const thermostatPlatformAccessory_1 = require("./accessories/thermostatPlatformAccessory"); const irrigationSystemPlatformAccessory_1 = require("./accessories/irrigationSystemPlatformAccessory"); const valvePlatformAccessory_1 = require("./accessories/valvePlatformAccessory"); const fanPlatformAccessory_1 = require("./accessories/fanPlatformAccessory"); const filterMaintenancePlatformAccessory_1 = require("./accessories/filterMaintenancePlatformAccessory"); const outletPlatformAccessory_1 = require("./accessories/outletPlatformAccessory"); const otherPlatformAccessory_1 = require("./accessories/otherPlatformAccessory"); const lightSensorPlatformAccessory_1 = require("./sensors/lightSensorPlatformAccessory"); const motionSensorPlatformAccessory_1 = require("./sensors/motionSensorPlatformAccessory"); const contactSensorPlatformAccessory_1 = require("./sensors/contactSensorPlatformAccessory"); const smokeSensorPlatformAccessory_1 = require("./sensors/smokeSensorPlatformAccessory"); const temperatureSensorPlatformAccessory_1 = require("./sensors/temperatureSensorPlatformAccessory"); const humiditySensorPlatformAccessory_1 = require("./sensors/humiditySensorPlatformAccessory"); const carbonDioxideSensorPlatformAccessory_1 = require("./sensors/carbonDioxideSensorPlatformAccessory"); const airQualitySensorPlatformAccessory_1 = require("./sensors/airQualitySensorPlatformAccessory"); const leakSensorPlatformAccessory_1 = require("./sensors/leakSensorPlatformAccessory"); const watchdogPlatformAccessory_1 = require("./sensors/watchdogPlatformAccessory"); class LogoType { } exports.LogoType = LogoType; LogoType.T_0BA7 = "0BA7"; LogoType.T_0BA8 = "0BA8"; LogoType.T_0BA0 = "0BA0"; LogoType.T_0BA1 = "0BA1"; class LogoInterface { } exports.LogoInterface = LogoInterface; LogoInterface.Modbus = "modbus"; LogoInterface.Snap7 = "snap7"; class LogoDefault { } exports.LogoDefault = LogoDefault; LogoDefault.Port = 502; LogoDefault.LocalTSAP = 0x1200; LogoDefault.RemoteTSAP = 0x2200; LogoDefault.DebugMsgLog = 0; LogoDefault.RetryCount = 5; LogoDefault.QueueInterval = 100; LogoDefault.QueueSize = 100; LogoDefault.QueueMinSize = 0; class Accessory { } exports.Accessory = Accessory; Accessory.Switch = "switch"; Accessory.Lightbulb = "lightbulb"; Accessory.Blind = "blind"; Accessory.Window = "window"; Accessory.Garagedoor = "garagedoor"; Accessory.Thermostat = "thermostat"; Accessory.IrrigationSystem = "irrigationSystem"; Accessory.Valve = "valve"; Accessory.Fan = "fan"; Accessory.FilterMaintenance = "filterMaintenance"; Accessory.Outlet = "outlet"; Accessory.Other = "other"; Accessory.LightSensor = "lightSensor"; Accessory.MotionSensor = "motionSensor"; Accessory.ContactSensor = "contactSensor"; Accessory.SmokeSensor = "smokeSensor"; Accessory.TemperatureSensor = "temperatureSensor"; Accessory.HumiditySensor = "humiditySensor"; Accessory.CarbonDioxideSensor = "carbonDioxideSensor"; Accessory.AirQualitySensor = "airQualitySensor"; Accessory.LeakSensor = "leakSensor"; Accessory.Watchdog = "watchdog"; class SubAccessory { constructor(api, platform) { this.api = api; this.platform = platform; } getNewAccessory(device, parent) { switch (device.type) { case Accessory.Switch: return new switchPlatformAccessory_1.SwitchPlatformAccessory(this.api, this.platform, device, parent); break; case Accessory.Lightbulb: return new lightbulbPlatformAccessory_1.LightbulbPlatformAccessory(this.api, this.platform, device); break; case Accessory.Blind: return new blindPlatformAccessory_1.BlindPlatformAccessory(this.api, this.platform, device); break; case Accessory.Window: return new windowPlatformAccessory_1.WindowPlatformAccessory(this.api, this.platform, device); break; case Accessory.Garagedoor: return new garagedoorPlatformAccessory_1.GaragedoorPlatformAccessory(this.api, this.platform, device); break; case Accessory.Thermostat: return new thermostatPlatformAccessory_1.ThermostatPlatformAccessory(this.api, this.platform, device); break; case Accessory.IrrigationSystem: return new irrigationSystemPlatformAccessory_1.IrrigationSystemPlatformAccessory(this.api, this.platform, device); break; case Accessory.Valve: if (!(device.valveParentIrrigationSystem)) { return new valvePlatformAccessory_1.ValvePlatformAccessory(this.api, this.platform, device, parent); } break; case Accessory.Fan: return new fanPlatformAccessory_1.FanPlatformAccessory(this.api, this.platform, device); break; case Accessory.FilterMaintenance: return new filterMaintenancePlatformAccessory_1.FilterMaintenancePlatformAccessory(this.api, this.platform, device); break; case Accessory.Outlet: return new outletPlatformAccessory_1.OutletPlatformAccessory(this.api, this.platform, device); break; case Accessory.Other: return new otherPlatformAccessory_1.OtherPlatformAccessory(this.api, this.platform, device); break; case Accessory.LightSensor: return new lightSensorPlatformAccessory_1.LightSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.MotionSensor: return new motionSensorPlatformAccessory_1.MotionSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.ContactSensor: return new contactSensorPlatformAccessory_1.ContactSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.SmokeSensor: return new smokeSensorPlatformAccessory_1.SmokeSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.TemperatureSensor: return new temperatureSensorPlatformAccessory_1.TemperatureSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.HumiditySensor: return new humiditySensorPlatformAccessory_1.HumiditySensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.CarbonDioxideSensor: return new carbonDioxideSensorPlatformAccessory_1.CarbonDioxideSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.AirQualitySensor: return new airQualitySensorPlatformAccessory_1.AirQualitySensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.LeakSensor: return new leakSensorPlatformAccessory_1.LeakSensorPlatformAccessory(this.api, this.platform, device); break; case Accessory.Watchdog: return new watchdogPlatformAccessory_1.WatchdogPlatformAccessory(this.api, this.platform, device); break; } } } exports.SubAccessory = SubAccessory; //# sourceMappingURL=logo.js.map