Esempio n. 1
0
 def __init__(self, devices):
     super().__init__(devices)
     
     self.devices.append(OnOffSwitch(devices, 'switch', 'state', ' (State)'))
     self.devices.append(TemperatureSensor(devices, 'temp', 'cpu_temperature', ' (CPU Temperature)'))
     self.devices.append(TemperatureSensor(devices, 'temp_e', 'external_temperature', ' (External Temperature)'))
     self.devices.append(VoltageSensor(devices, 'adc', 'adc_volt', ' (ADC Voltage)'))
    def __init__(self, devices):
        super().__init__(devices)

        mode_switch = SelectorSwitch(devices, 'mode', 'system_mode', ' (Mode)')
        mode_switch.add_level('Off', 'off')
        mode_switch.add_level('Auto', 'auto')
        mode_switch.add_level('Cool', 'cool')
        mode_switch.add_level('Heat', 'heat')
        mode_switch.add_level('Emergency Heating', 'emergency heating')
        mode_switch.add_level('Precooling', 'precooling')
        mode_switch.add_level('Fan only', 'fan only')
        mode_switch.add_level('Dry', 'dry')
        mode_switch.add_level('Sleep', 'sleep')
        mode_switch.set_selector_style(SelectorSwitch.SELECTOR_TYPE_MENU)
        mode_switch.set_icon(15)

        self.devices.append(
            TemperatureSensor(devices, 'temp', 'local_temperature',
                              ' (Temperature)'))
        self.devices.append(
            SetPoint(devices, 'sp1', 'occupied_heating_setpoint',
                     ' (Occupied Setpoint)'))
        self.devices.append(
            SetPoint(devices, 'sp2', 'unoccupied_heating_setpoint',
                     ' (Unoccupied Setpoint)'))
        self.devices.append(mode_switch)
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(MotionSensor(devices, 'motion', 'occupancy'))
     self.devices.append(LuxSensor(devices, 'lux', 'illuminance'))
     self.devices.append(LuxSensor(devices, 'lux2', 'illuminance_lux'))
     self.devices.append(
         TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
Esempio n. 4
0
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(TemperatureSensor(devices, 'temp', 'temperature', ' (Temperature)'))
     self.devices.append(HumiditySensor(devices, 'hum', 'humidity', ' (Humidity)'))
     self.devices.append(PressureSensor(devices, 'pres', 'pressure', ' (Pressure)'))
     self.devices.append(BarometerSensor(devices, 'bar', 'pressure', ' (Barometer)'))
     self.devices.append(TemperatureHumiditySensor(devices, 'th', 'combined', ' (Temperature + Humidity)'))
     self.devices.append(TemperatureHumidityBarometerSensor(devices, 'all', 'combined', ' (Temperature + Humidity + Barometer)'))
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(
         TemperatureSensor(devices, 'temp', 'local_temperature',
                           ' (Temperature)'))
     self.devices.append(
         SetPoint(devices, 'spoint', 'current_heating_setpoint',
                  ' (Setpoint)'))
    def __init__(self, devices):
        super().__init__(devices)

        self.devices.append(OnOffSwitch(devices, 'l1', 'state_l1'))
        self.devices.append(OnOffSwitch(devices, 'l2', 'state_l2'))
        values = ['power', 'consumption']
        self.devices.append(KwhSensor(devices, 'kwh', values))
        self.devices.append(TemperatureSensor(devices, 'temp', 'temperature'))
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(
         TemperatureSensor(devices, 'temp', 'temperature',
                           ' (Temperature)'))
     self.devices.append(
         HumiditySensor(devices, 'hum', 'humidity', ' (Humidity)'))
     self.devices.append(
         TemperatureHumiditySensor(devices, 'all', 'combined',
                                   ' (Temperature + Humidity)'))
Esempio n. 8
0
 def __init__(self):
     super().__init__()
     self.devices.append(
         TemperatureSensor('temp', 'temperature', ' (Temperature)'))
     self.devices.append(HumiditySensor('hum', 'humidity', ' (Humidity)'))
     self.devices.append(
         TemperatureHumiditySensor('all', 'combined',
                                   ' (Temperature + Humidity)'))
     self.devices.append(CO2Sensor('eco2', 'eco2', ' (CO2)'))
     self.devices.append(CustomSensor('voc', 'voc', ' (Vok)'))
Esempio n. 9
0
    def __init__(self):
        super().__init__()

        self.devices.append(
            VoltageSensor('cell', 'voltage', ' (Battery Voltage)'))
        self.devices.append(PercentageSensor('btperc', 'battery',
                                             ' (Battery)'))
        self.devices.append(
            TemperatureSensor('temp', 'local_temperature', ' (Temperature)'))
        self.devices.append(
            SetPoint('spoint', 'occupied_heating_setpoint', ' (SetPoint)'))
    def __init__(self, devices):
        super().__init__(devices)

        mode_switch = SelectorSwitch(devices, 'mode', 'system_mode', ' (Mode)')
        mode_switch.add_level('Off', 'off')
        mode_switch.add_level('Auto', 'auto')
        mode_switch.add_level('Manual', 'manual')
        mode_switch.add_level('Comfort', 'comfort')
        mode_switch.add_level('Eco', 'eco')
        mode_switch.add_level('Boost', 'boost')
        mode_switch.add_level('Complex', 'complex')
        mode_switch.set_selector_style(SelectorSwitch.SELECTOR_TYPE_MENU)
        mode_switch.set_icon(15)

        preset = SelectorSwitch(devices, 'preset', 'preset', ' (Preset)')
        preset.add_level('Away', 'away')
        preset.add_level('Schedule', 'schedule')
        preset.add_level('Manual', 'manual')
        preset.add_level('Comfort', 'comfort')
        preset.add_level('Eco', 'eco')
        preset.add_level('Boost', 'boost')
        preset.add_level('Complex', 'complex')
        preset.set_selector_style(SelectorSwitch.SELECTOR_TYPE_MENU)
        preset.set_icon(15)

        week_format = SelectorSwitch(devices, 'week', 'week', ' (Week Format)')
        week_format.add_level('5+2', '5+2')
        week_format.add_level('6+1', '6+1')
        week_format.add_level('7', '7')

        self.devices.append(mode_switch)
        self.devices.append(preset)
        self.devices.append(week_format)
        self.devices.append(
            SetPoint(devices, 'spoint', 'current_heating_setpoint',
                     ' (Setpoint)'))
        self.devices.append(
            SetPoint(devices, 'sp_eco', 'eco_temperature', ' (Eco Setpoint)'))
        self.devices.append(
            SetPoint(devices, 'sp_cmf', 'comfort_temperature',
                     ' (Comfort Setpoint)'))
        self.devices.append(
            TemperatureSensor(devices, 'temp', 'local_temperature',
                              ' (Temperature)'))
        self.devices.append(
            LevelSwitch(devices, 'level', 'position', ' (Valve position)'))
        self.devices.append(
            OnOffSwitch(devices, 'wnd', 'window_detection',
                        ' (Window Detection)'))
        self.devices.append(
            OnOffSwitch(devices, 'child', 'child_lock', ' (Child Lock)'))
    def __init__(self, devices):
        super().__init__(devices)
        self.devices.append(
            TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
        self.devices.append(
            HumiditySensor(devices, 'hum', 'humidity', ' (Humidity)'))
        self.devices.append(OnOffSwitch(devices, 'alarm', 'alarm', ' (Alarm)'))

        volume_switch = SelectorSwitch(devices, 'vol', 'volume', ' (Volume)')
        volume_switch.add_level('Low', 'low')
        volume_switch.add_level('Medium', 'medium')
        volume_switch.add_level('High', 'high')

        self.devices.append(volume_switch)
Esempio n. 12
0
    def __init__(self, devices):
        super().__init__(devices)

        kwh_consumed = KwhSensor(devices, 'cons', ['power', 'energyconsumed'], ' (Consumed)')
        kwh_consumed.energy_multiplier = 1

        kwh_produced = KwhSensor(devices, 'prod', ['power', 'energyproduced'], ' (Produced)')
        kwh_produced.energy_multiplier = 1

        self.devices.append(TemperatureSensor(devices, 'temp', 'temperature', ' (Temperature)'))
        self.devices.append(VoltageSensor(devices, 'volt', 'voltage', ' (Voltage)'))
        self.devices.append(CurrentSensor(devices, 'ampere', 'current', ' (Current)'))
        self.devices.append(kwh_consumed)
        self.devices.append(kwh_produced)
Esempio n. 13
0
    def __init__(self, devices):
        super().__init__(devices)

        temperature_sensor = TemperatureSensor(devices, 'temp', 'local_temperature',' (Temperature)')
        self.devices.append(temperature_sensor)

        setpoint = SetPoint(devices, 'sp1', 'occupied_heating_setpoint',' (Occupied Setpoint)')
        self.devices.append(setpoint)

        mode_switch = SelectorSwitch(devices, 'mode', 'system_mode', ' (Mode)')
        mode_switch.add_level('Off', 'idle')
        mode_switch.add_level('Heat', 'heat')
        mode_switch.set_selector_style(SelectorSwitch.SELECTOR_TYPE_MENU)
        mode_switch.set_icon(15)
        self.devices.append(mode_switch)
    def __init__(self):
        super().__init__()

        mode_switch = SelectorSwitch('mode', 'system_mode', ' (Mode)')
        mode_switch.add_level('Off', 'off')
        mode_switch.add_level('Auto', 'auto')
        mode_switch.add_level('Heat', 'heat')
        mode_switch.set_selector_style(SelectorSwitch.SELECTOR_TYPE_BUTTONS)
        mode_switch.set_icon(15)

        self.devices.append(
            TemperatureSensor('temp', 'local_temperature', ' (Temperature)'))
        self.devices.append(
            SetPoint('spoint', 'current_heating_setpoint', ' (Setpoint)'))
        self.devices.append(mode_switch)
Esempio n. 15
0
    def __init__(self, devices):
        super().__init__(devices)
        self.devices.append(
            TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
        self.devices.append(
            HumiditySensor(devices, 'hum', 'humidity', ' (Humidity)'))
        self.devices.append(SirenSwitch(devices, 'alarm', 'alarm', ' (Alarm)'))

        volume_switch = SelectorSwitch(devices, 'vol', 'volume', ' (Volume)')
        volume_switch.add_level('Low', 'low')
        volume_switch.add_level('Medium', 'medium')
        volume_switch.add_level('High', 'high')
        self.devices.append(volume_switch)

        melody_switch = SelectorSwitch(devices, 'mel', 'melody', ' (Melody)')
        for melody in range(1, 19):
            melody_switch.add_level(str(melody), melody)

        self.devices.append(melody_switch)
Esempio n. 16
0
    def register(self, features):
        devices = []

        temp = get_feature(features, 'temperature')
        humidity = get_feature(features, 'humidity')
        pressure = get_feature(features, 'pressure')

        if temp:
            alias = generate_alias(temp, 'temp')
            device = TemperatureSensor(alias, temp['property'],
                                       ' (Temperature)')
            device.feature = temp
            devices.append(device)

        if humidity:
            alias = generate_alias(humidity, 'hum')
            device = HumiditySensor(alias, humidity['property'], ' (Humidity)')
            device.feature = humidity
            devices.append(device)

        if pressure:
            alias = generate_alias(pressure, 'pres')
            device = PressureSensor(alias, pressure['property'], ' (Pressure)')
            device.feature = pressure
            devices.append(device)

        if temp and humidity:
            device = TemperatureHumiditySensor('all', 'temp+hum',
                                               ' (Temperature + Humidity)')
            device.set_temp_feature(temp)
            device.set_humidity_feature(humidity)
            device.feature = temp
            devices.append(device)

        if temp and humidity and pressure:
            device = TemperatureHumidityBarometerSensor(
                'thb', 'temp+hum+bar', ' (Temperature + Humidity + Barometer)')
            device.set_temp_feature(temp)
            device.set_humidity_feature(humidity)
            device.set_pressure_feature(pressure)
            device.feature = temp
            devices.append(device)

        return devices
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(DoorContactSensor(devices, 'sensor', 'contact'))
     self.devices.append(
         TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
Esempio n. 18
0
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(
         TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
Esempio n. 19
0
 def __init__(self):
     super().__init__()
     self.devices.append(
         TemperatureSensor('temp', 'temperature', ' (Temperature)'))
 def __init__(self, devices):
     super().__init__(devices)
     self.devices.append(MotionSensor(devices, 'motion', 'occupancy'))
     self.devices.append(TemperatureSensor(devices, 'temp', 'temperature', 'temperature'))
    def __init__(self, devices):
        super().__init__(devices)

        self.devices.append(KwhSensor(devices, 'kwh', ['power']))
        self.devices.append(VoltageSensor(devices, 'volt', 'voltage', ' (Voltage)'))
        self.devices.append(TemperatureSensor(devices, 'temp', 'temperature', ' (Temperature)'))