Skip to content
This repository has been archived by the owner on Feb 4, 2024. It is now read-only.

Commit

Permalink
0.1.66 (#298)
Browse files Browse the repository at this point in the history
* Bump version

* add HmIP-PMFS Power Outage Detector (#291)

while on power key=POWER_MAINS_FAILURE stays False, on power outage it changes to True.

* Add support for HmIP-DRSI4

* Add support for HmIP-WRCD (#293)

* FIx Attributeerrors (#294)

* Fix turning off homematic ip thermostats (#295)

The control mode has to be set to manual after setting the temperature to the off value.

* Update changelog

Co-authored-by: Klaus <[email protected]>
Co-authored-by: macrojames <[email protected]>
Co-authored-by: pg5 <[email protected]>
  • Loading branch information
4 people authored Apr 16, 2020
1 parent 526dc7d commit 91c91cb
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 4 deletions.
7 changes: 7 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Version 0.1.66 (2020-04-17)
- Add support for HmIP-DRSI4 @danielperna84
- Add support for HmIP-PMFS @k-laus
- Add support for HmIP-WRCD @macrojames
- Fix attribute errors @macrojames
- Fix HmIP Thermostats @pg5

Version 0.1.65 (2020-02-20)
- Add support for HmIP-DRBLI4 @danielperna84
- Add support for HmIP-WTH-B @srehlig
Expand Down
12 changes: 11 additions & 1 deletion pyhomematic/devicetypes/actors.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,16 @@ def ELEMENT(self):
return [3]


class IPKeyBlind(KeyBlind):
class IPKeyBlind(IPBlind, HelperActionPress):
"""
Blind switch that raises and lowers homematic ip roller shutters or window blinds.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)

# init metadata
self.EVENTNODE.update({"PRESS_SHORT": [1, 2],
"PRESS_LONG": [1, 2]})

@property
def ELEMENT(self):
Expand Down Expand Up @@ -389,6 +395,8 @@ def ELEMENT(self):
return [2]
elif "HmIP-MOD-OC8" in self.TYPE:
return [10, 14, 18, 22, 26, 30, 34, 38]
elif "HmIP-DRSI4" in self.TYPE:
return [6, 10, 14, 18]
else:
return [3]

Expand Down Expand Up @@ -873,7 +881,9 @@ def set_color_temp(self, color_temp: float, channel=None):
"HmIP-PS-UK": IPSwitch,
"HmIP-PCBS": IPSwitch,
"HmIP-PCBS-BAT": IPSwitch,
"HmIP-PMFS": IPSwitch,
"HmIP-MOD-OC8": IPSwitch,
"HmIP-DRSI4": IPSwitch,
"HmIP-BSL": IPKeySwitchLevel,
"HMIP-PSM": IPSwitchPowermeter,
"HmIP-PSM": IPSwitchPowermeter,
Expand Down
3 changes: 3 additions & 0 deletions pyhomematic/devicetypes/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ def ELEMENT(self):
return [1, 2, 3, 4]
if "HmIP-RC8" in self.TYPE:
return [1, 2, 3, 4, 5, 6, 7, 8]
if "HmIP-WRCD" in self.TYPE:
return [1, 2, 3]
return [1]


Expand Down Expand Up @@ -138,6 +140,7 @@ def ELEMENT(self):
"HmIP-WRC2": RemoteBatteryIP,
"HmIP-BRC2": Remote,
"HmIP-WRC6": RemoteBatteryIP,
"HmIP-WRCD": RemoteBatteryIP,
"HmIP-KRCA": Remote,
"HmIP-KRC4": Remote,
"HM-SwI-3-FM": RemotePress,
Expand Down
28 changes: 28 additions & 0 deletions pyhomematic/devicetypes/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ class SensorHmIPNoVoltage(HMSensor, HelperRssiDevice, HelperLowBatIP):
- low battery status (HelperLowBatIP)
- but no voltage of batteries"""

class SensorHmIPNoBattery(HMSensor, HelperRssiDevice):
"""Some Homematic IP sensors have
- strength of the signal received by the CCU (HelperRssiDevice).
Be aware that HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- strength of the signal received by the device (HelperRssiPeer).
Be aware that standard HMIP devices have a reversed understanding of PEER
and DEVICE compared to standard HM devices.
- low battery status (HelperLowBatIP)
- but no voltage of batteries"""


class ShutterContact(SensorHm, HelperBinaryState, HelperSabotage):
"""Door / Window contact that emits its open/closed state.
Expand Down Expand Up @@ -552,6 +563,23 @@ def get_humidity(self, channel=None):
return int(self.getSensorData("HUMIDITY", channel))


class IPAreaThermostatNoBattery(SensorHmIPNoBattery):
"""Wall mount thermostat without battery."""

def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)

# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1],
"HUMIDITY": [1]})

def get_temperature(self, channel=None):
return float(self.getSensorData("ACTUAL_TEMPERATURE", channel))

def get_humidity(self, channel=None):
return int(self.getSensorData("HUMIDITY", channel))


class TemperatureSensor(SensorHm):
"""Temperature Sensor."""

Expand Down
8 changes: 6 additions & 2 deletions pyhomematic/devicetypes/thermostats.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging
from pyhomematic.devicetypes.generic import HMDevice
from pyhomematic.devicetypes.sensors import AreaThermostat, IPAreaThermostat
from pyhomematic.devicetypes.sensors import AreaThermostat, IPAreaThermostat, IPAreaThermostatNoBattery
from pyhomematic.devicetypes.helper import HelperValveState, HelperBatteryState, HelperLowBat, HelperLowBatIP, HelperRssiPeer, HelperRssiDevice

LOG = logging.getLogger(__name__)
Expand Down Expand Up @@ -282,6 +282,7 @@ def MODE(self, setmode):
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)

class IPThermostatWall(HMThermostat, IPAreaThermostat, HelperRssiDevice, HelperLowBatIP):
"""
Expand Down Expand Up @@ -317,8 +318,9 @@ def set_temperature(self, target_temperature):
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)

class IPThermostatWall230V(HMThermostat, IPAreaThermostat, HelperRssiDevice):
class IPThermostatWall230V(HMThermostat, IPAreaThermostatNoBattery, HelperRssiDevice):
"""
HmIP-BWTH, HmIP-BWTH24
ClimateControl-Wall Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
Expand Down Expand Up @@ -371,6 +373,7 @@ def MODE(self, setmode):
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)

class IPThermostatWall2(HMThermostat, IPAreaThermostat, HelperRssiDevice, HelperLowBatIP):
"""
Expand Down Expand Up @@ -427,6 +430,7 @@ def MODE(self, setmode):
def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)
self.actionNodeData('CONTROL_MODE', self.MANU_MODE)


DEVICETYPES = {
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def readme():

PACKAGE_NAME = 'pyhomematic'
HERE = os.path.abspath(os.path.dirname(__file__))
VERSION = '0.1.65'
VERSION = '0.1.66'

PACKAGES = find_packages(exclude=['tests', 'tests.*', 'dist', 'build'])

Expand Down

0 comments on commit 91c91cb

Please sign in to comment.