Esempio n. 1
0
    def from_json(self, js):
        super().from_json(js)
        c = get_functional_channel("DEVICE_INCORRECT_POSITIONED", js)
        if c:
            self.unreach = c["unreach"]
            self.lowBat = c["lowBat"]
            self.routerModuleSupported = c["routerModuleSupported"]
            self.routerModuleEnabled = c["routerModuleEnabled"]
            self.rssiDeviceValue = c["rssiDeviceValue"]
            self.rssiPeerValue = c["rssiPeerValue"]
            self.dutyCycle = c["dutyCycle"]
            self.configPending = c["configPending"]
            self.incorrectPositioned = c["incorrectPositioned"]

        c = get_functional_channel("WATER_SENSOR_CHANNEL", js)
        if c:
            self.acousticAlarmSignal = AcousticAlarmSignal.from_str(
                c["acousticAlarmSignal"])
            self.acousticAlarmTiming = AcousticAlarmTiming.from_str(
                c["acousticAlarmTiming"])
            self.acousticWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["acousticWaterAlarmTrigger"])
            self.inAppWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["inAppWaterAlarmTrigger"])
            self.moistureDetected = c["moistureDetected"]
            self.sirenWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["sirenWaterAlarmTrigger"])
            self.waterlevelDetected = c["waterlevelDetected"]
    def from_json(self, js):
        super().from_json(js)
        c = get_functional_channel("DEVICE_GLOBAL_PUMP_CONTROL", js)
        if c:
            self.globalPumpControl = c["globalPumpControl"]
            self.heatingValveType = HeatingValveType.from_str(
                c["heatingValveType"])
            self.heatingLoadType = HeatingLoadType.from_str(
                c["heatingLoadType"])
            self.coolingEmergencyValue = c["coolingEmergencyValue"]

            self.frostProtectionTemperature = c["frostProtectionTemperature"]
            self.heatingEmergencyValue = c["heatingEmergencyValue"]
            self.valveProtectionDuration = c["valveProtectionDuration"]
            self.valveProtectionSwitchingInterval = c[
                "valveProtectionSwitchingInterval"]

        c = get_functional_channel("FLOOR_TERMINAL_BLOCK_LOCAL_PUMP_CHANNEL",
                                   js)
        if c:
            self.pumpFollowUpTime = c["pumpFollowUpTime"]
            self.pumpLeadTime = c["pumpLeadTime"]
            self.pumpProtectionDuration = c["pumpProtectionDuration"]
            self.pumpProtectionSwitchingInterval = c[
                "pumpProtectionSwitchingInterval"]
Esempio n. 3
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("WALL_MOUNTED_THERMOSTAT_WITHOUT_DISPLAY_CHANNEL", js)
     if c:
         self.temperatureOffset = c["temperatureOffset"]
         self.actualTemperature = c["actualTemperature"]
         self.humidity = c["humidity"]
Esempio n. 4
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("DEVICE_GLOBAL_PUMP_CONTROL", js)
     if c:
         self.unreach = c["unreach"]
         self.globalPumpControl = c["globalPumpControl"]
         self.heatingValveType = c["heatingValveType"]
Esempio n. 5
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SWITCH_CHANNEL", js)
     if c:
         self.on = c["on"]
         self.profileMode = c["profileMode"]
         self.userDesiredProfileMode = c["userDesiredProfileMode"]
Esempio n. 6
0
    def from_json(self, js):
        self.id = js["id"]
        self.homeId = js["homeId"]
        self.label = js["label"]
        time = js["lastStatusUpdate"]
        if time > 0:
            self.lastStatusUpdate = datetime.fromtimestamp(time / 1000.0)
        else:
            self.lastStatusUpdate = None

        self.deviceType = js["type"]
        self.updateState = js["updateState"]
        self.firmwareVersion = js["firmwareVersion"]
        self.availableFirmwareVersion = js["availableFirmwareVersion"]
        self.modelType = js['modelType']
        self.modelId = js['modelId']
        self.oem = js['oem']
        self.manufacturerCode = js['manufacturerCode']
        self.serializedGlobalTradeItemNumber = js['serializedGlobalTradeItemNumber']

        c = get_functional_channel("DEVICE_BASE", js)
        if c:
            self.unreach = c["unreach"]
            self.lowBat = c["lowBat"]
            self.routerModuleSupported = c["routerModuleSupported"]
            self.routerModuleEnabled = c["routerModuleEnabled"]
            self.rssiDeviceValue = c["rssiDeviceValue"]
            self.rssiPeerValue = c["rssiPeerValue"]
            self.dutyCycle = c["dutyCycle"]
            self.configPending = c["configPending"]
Esempio n. 7
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SHUTTER_CHANNEL", js)
     if c:
         self.shutterLevel = c["shutterLevel"]
         self.bottomToTopReferenceTime = c["bottomToTopReferenceTime"]
         self.topToBottomReferenceTime = c["topToBottomReferenceTime"]
Esempio n. 8
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("DIMMER_CHANNEL", js)
     if c:
         self.dimLevel = c["dimLevel"]
         self.profileMode = c["profileMode"]
         self.userDesiredProfileMode = c["userDesiredProfileMode"]
    def from_json(self, js):
        super().from_json(js)
        self.id = js["id"]
        self.homeId = js["homeId"]
        self.label = js["label"]

        self.lastStatusUpdate = self.fromtimestamp(js["lastStatusUpdate"])

        self.deviceType = js["type"]
        self.updateState = DeviceUpdateState.from_str(js["updateState"])
        self.firmwareVersion = js["firmwareVersion"]
        self.firmwareVersionInteger = js["firmwareVersionInteger"]
        self.availableFirmwareVersion = js["availableFirmwareVersion"]
        self.modelType = js['modelType']
        self.modelId = js['modelId']
        self.oem = js['oem']
        self.manufacturerCode = js['manufacturerCode']
        self.serializedGlobalTradeItemNumber = js[
            'serializedGlobalTradeItemNumber']
        self.permanentlyReachable = js["permanentlyReachable"]
        self.liveUpdateState = LiveUpdateState.from_str(js["liveUpdateState"])

        c = get_functional_channel(self._baseChannel, js)
        if c:
            self.unreach = c["unreach"]
            self.lowBat = c["lowBat"]
            self.routerModuleSupported = c["routerModuleSupported"]
            self.routerModuleEnabled = c["routerModuleEnabled"]
            self.rssiDeviceValue = c["rssiDeviceValue"]
            self.rssiPeerValue = c["rssiPeerValue"]
            self.dutyCycle = c["dutyCycle"]
            self.configPending = c["configPending"]
Esempio n. 10
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("HEATING_THERMOSTAT_CHANNEL", js)
     if c:
         self.temperatureOffset = c["temperatureOffset"]
         self.valvePosition = c["valvePosition"]
         self.valveState = c["valveState"]
Esempio n. 11
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SWITCH_MEASURING_CHANNEL", js)
     if c:
         self.on = c["on"]
         self.energyCounter = c["energyCounter"]
         self.currentPowerConsumption = c["currentPowerConsumption"]
Esempio n. 12
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("LIGHT_SENSOR_CHANNEL", js)
     if c:
         self.averageIllumination = c["averageIllumination"]
         self.currentIllumination = c["currentIllumination"]
         self.highestIllumination = c["highestIllumination"]
         self.lowestIllumination = c["lowestIllumination"]
Esempio n. 13
0
 def from_json(self, js):
     super().from_json(js)
     automaticValveAdaptionNeeded = js["automaticValveAdaptionNeeded"]
     c = get_functional_channel("HEATING_THERMOSTAT_CHANNEL", js)
     if c:
         self.temperatureOffset = c["temperatureOffset"]
         self.valvePosition = c["valvePosition"]
         self.valveState = ValveState.from_str(c["valveState"])
         self.setPointTemperature = c["setPointTemperature"]
Esempio n. 14
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("MULTI_MODE_INPUT_CHANNEL", js)
     if c:
         self.binaryBehaviorType = BinaryBehaviorType.from_str(
             c["binaryBehaviorType"])
         self.multiModeInputMode = MultiModeInputMode.from_str(
             c["multiModeInputMode"])
         self.windowState = WindowState.from_str(c["windowState"])
Esempio n. 15
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("DEVICE_SABOTAGE", js)
     if c:
         self.unreach = c["unreach"]
         self.lowBat = c["lowBat"]
         self.sabotage = c["sabotage"]
         self.rssiDeviceValue = c["rssiDeviceValue"]
         self.rssiPeerValue = c["rssiPeerValue"]
Esempio n. 16
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("DEVICE_OPERATIONLOCK", js)
     if c:
         self.unreach = c["unreach"]
         self.lowBat = c["lowBat"]
         self.operationLockActive = c["operationLockActive"]
         self.rssiDeviceValue = c["rssiDeviceValue"]
         self.rssiPeerValue = c["rssiPeerValue"]
Esempio n. 17
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("WALL_MOUNTED_THERMOSTAT_PRO_CHANNEL", js)
     if c:
         self.temperatureOffset = c["temperatureOffset"]
         self.display = c["display"]
         self.actualTemperature = c["actualTemperature"]
         self.humidity = c["humidity"]
         self.setPointTemperature = c["setPointTemperature"]
Esempio n. 18
0
    def from_json(self, js):
        super().from_json(js)
        c = get_functional_channel("DEVICE_INCORRECT_POSITIONED", js)
        if c:
            self.incorrectPositioned = c["incorrectPositioned"]

        c = get_functional_channel("WATER_SENSOR_CHANNEL", js)
        if c:
            self.acousticAlarmSignal = AcousticAlarmSignal.from_str(
                c["acousticAlarmSignal"])
            self.acousticAlarmTiming = AcousticAlarmTiming.from_str(
                c["acousticAlarmTiming"])
            self.acousticWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["acousticWaterAlarmTrigger"])
            self.inAppWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["inAppWaterAlarmTrigger"])
            self.moistureDetected = c["moistureDetected"]
            self.sirenWaterAlarmTrigger = WaterAlarmTrigger.from_str(
                c["sirenWaterAlarmTrigger"])
            self.waterlevelDetected = c["waterlevelDetected"]
Esempio n. 19
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("PRESENCE_DETECTION_CHANNEL", js)
     if c:
         self.presenceDetected = c["presenceDetected"]
         self.currentIllumination = c["currentIllumination"]
         self.illumination = c["illumination"]
         self.motionBufferActive = c["motionBufferActive"]
         self.motionDetectionSendInterval = MotionDetectionSendInterval.from_str(
             c["motionDetectionSendInterval"])
         self.numberOfBrightnessMeasurements = c[
             "numberOfBrightnessMeasurements"]
Esempio n. 20
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("PASSAGE_DETECTOR_CHANNEL", js)
     if c:
         self.leftCounter = c["leftCounter"]
         self.leftRightCounterDelta = c["leftRightCounterDelta"]
         self.passageBlindtime = c["passageBlindtime"]
         self.passageDirection = PassageDirection.from_str(
             c["passageDirection"])
         self.passageSensorSensitivity = c["passageSensorSensitivity"]
         self.passageTimeout = c["passageTimeout"]
         self.rightCounter = c["rightCounter"]
Esempio n. 21
0
    def from_json(self, js):
        super().from_json(js)

        c = get_functional_channel("WEATHER_SENSOR_CHANNEL", js)
        if c:
            self.actualTemperature = c["actualTemperature"]
            self.humidity = c["humidity"]
            self.illumination = c["illumination"]
            self.illuminationThresholdSunshine = c[
                "illuminationThresholdSunshine"]
            self.storm = c["storm"]
            self.sunshine = c["sunshine"]
            self.todaySunshineDuration = c["todaySunshineDuration"]
            self.totalSunshineDuration = c["totalSunshineDuration"]
            self.windSpeed = c["windSpeed"]
            self.windValueType = c["windValueType"]
            self.yesterdaySunshineDuration = c["yesterdaySunshineDuration"]
Esempio n. 22
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SHUTTER_CHANNEL", js)
     if c:
         self.shutterLevel = c["shutterLevel"]
         self.changeOverDelay = c["changeOverDelay"]
         self.delayCompensationValue = c["delayCompensationValue"]
         self.bottomToTopReferenceTime = c["bottomToTopReferenceTime"]
         self.topToBottomReferenceTime = c["topToBottomReferenceTime"]
         self.endpositionAutoDetectionEnabled = c[
             "endpositionAutoDetectionEnabled"]
         self.previousShutterLevel = c["previousShutterLevel"]
         self.processing = c["processing"]
         self.profileMode = c["profileMode"]
         self.selfCalibrationInProgress = c["selfCalibrationInProgress"]
         self.supportingDelayCompensation = c["supportingDelayCompensation"]
         self.supportingEndpositionAutoDetection = c[
             "supportingEndpositionAutoDetection"]
         self.supportingSelfCalibration = c["supportingSelfCalibration"]
         self.userDesiredProfileMode = c["userDesiredProfileMode"]
Esempio n. 23
0
    def from_json(self, js):
        super().from_json(js)

        c = get_functional_channel("WEATHER_SENSOR_PRO_CHANNEL")
        if c:
            self.humidity = c["humidity"]
            self.illumination = c["illumination"]
            self.illuminationThresholdSunshine = c["illuminationThresholdSunshine"]
            self.raining = c["raining"]
            self.storm = c["storm"]
            self.sunshine = c["sunshine"]
            self.todayRainCounter = c["todayRainCounter"]
            self.todaySunshineDuration = c["todaySunshineDuration"]
            self.totalRainCounter = c["totalRainCounter"]
            self.totalSunshineDuration = c["totalSunshineDuration"]
            self.weathervaneAlignmentNeeded = c["weathervaneAlignmentNeeded"]
            self.windDirection = c["windDirection"]
            self.windDirectionVariation = c["windDirectionVariation"]
            self.windSpeed = c["windSpeed"]
            self.windValueType = c["windValueType"]
            self.yesterdayRainCounter = c["yesterdayRainCounter"]
            self.yesterdaySunshineDuration = c["yesterdaySunshineDuration"]
Esempio n. 24
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("DEVICE_BASE", js)
     if c:
         self.unreach = c["unreach"]
         self.lowBat = c["lowBat"]
Esempio n. 25
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("PRESENCE_DETECTION_CHANNEL", js)
     if c:
         self.presenceDetected = c["presenceDetected"]
         self.illumination = c["illumination"]
Esempio n. 26
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("MOTION_DETECTION_CHANNEL", js)
     if c:
         self.motionDetected = c["motionDetected"]
         self.illumination = c["illumination"]
Esempio n. 27
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("ROTARY_HANDLE_CHANNEL", js)
     if c:
         self.windowState = WindowState.from_str(c["windowState"])
         self.eventDelay = c["eventDelay"]
Esempio n. 28
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SMOKE_DETECTOR_CHANNEL", js)
     if c:
         self.smokeDetectorAlarmType = c["smokeDetectorAlarmType"]
Esempio n. 29
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("CLIMATE_SENSOR_CHANNEL", js)
     if c:
         self.actualTemperature = c["actualTemperature"]
         self.humidity = c["humidity"]
Esempio n. 30
0
 def from_json(self, js):
     super().from_json(js)
     c = get_functional_channel("SHUTTER_CONTACT_CHANNEL", js)
     if c:
         self.windowState = c["windowState"]
         self.eventDelay = c["eventDelay"]