Exemplo 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"]
Exemplo n.º 2
0
    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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo n.º 9
0
    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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"])
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]
Exemplo 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"]