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

Commit

Permalink
Merge pull request #154 from danielperna84/devel
Browse files Browse the repository at this point in the history
0.1.47
  • Loading branch information
danielperna84 authored Aug 20, 2018
2 parents 649224c + 1756893 commit b5adc93
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 9 deletions.
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 0.1.47 (2018-08-20)
- Fix HmIP-BWTH (Issue #151) @danielperna84
- Added HmIP-KRCA @danielperna84
- Fix RSSI reporting (Issue #155) @klada

Version 0.1.46 (2018-07-21)
- Added PRESS event for HmIP-BSM @ToSa27
- Added Smartware Motion Detector @maxm87
Expand Down
2 changes: 1 addition & 1 deletion manual_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def cli(local, localport, remote, remoteport, address, channel, state, toggle,
print(" / Switch is on: %s" % str(device.is_on(channel)))

########### Attribute #########
print(" / RSSI_DEVICE: %i" % device.get_rssi())
print(" / RSSI_PEER: %i" % device.get_rssi())

if isinstance(device, HelperLowBat):
print(" / Low batter: %s" % str(device.low_batt()))
Expand Down
4 changes: 2 additions & 2 deletions pyhomematic/devicetypes/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False):
# - 0...n / getValue from channel (fix)
self._SENSORNODE = {}
self._BINARYNODE = {}
self._ATTRIBUTENODE = {"RSSI_DEVICE": [0]}
self._ATTRIBUTENODE = {"RSSI_PEER": [0]}
self._WRITENODE = {}
self._EVENTNODE = {}
self._ACTIONNODE = {}
Expand Down Expand Up @@ -334,7 +334,7 @@ def _setNodeData(self, name, metadata, data, channel=None):
return False

def get_rssi(self, channel=0):
return self.getAttributeData("RSSI_DEVICE", channel)
return self.getAttributeData("RSSI_PEER", channel)

@property
def ELEMENT(self):
Expand Down
4 changes: 2 additions & 2 deletions pyhomematic/devicetypes/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ def __init__(self, device_description, proxy, resolveparamsets=False):
"PRESS_LONG_RELEASE": self.ELEMENT})

class HelperWired(HMDevice):
"""Remove the RSSI_DEVICE attribute"""
"""Remove the RSSI_PEER attribute"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)

self.ATTRIBUTENODE.pop("RSSI_DEVICE", None)
self.ATTRIBUTENODE.pop("RSSI_PEER", None)
3 changes: 2 additions & 1 deletion pyhomematic/devicetypes/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def ELEMENT(self):
return [1, 2, 3, 4]
if "HM-PBI-4-FM" in self.TYPE or "ZEL STG RM FST UP4" in self.TYPE or "263 145" in self.TYPE or "HM-PBI-X" in self.TYPE:
return [1, 2, 3, 4]
if "Sec4" in self.TYPE or "Key4" in self.TYPE:
if "Sec4" in self.TYPE or "Key4" in self.TYPE or "KRCA" in self.TYPE:
return [1, 2, 3, 4]
if "PB-6" in self.TYPE or "WRC6" in self.TYPE:
return [1, 2, 3, 4, 5, 6]
Expand Down Expand Up @@ -122,6 +122,7 @@ def ELEMENT(self):
"HMIP-WRC2": Remote,
"HmIP-WRC2": Remote,
"HmIP-WRC6": Remote,
"HmIP-KRCA": Remote,
"HM-SwI-3-FM": RemotePress,
"ZEL STG RM FSS UP3": RemotePress,
"263 144": RemotePress,
Expand Down
2 changes: 1 addition & 1 deletion pyhomematic/devicetypes/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ def __init__(self, device_description, proxy, resolveparamsets=False):
self.BINARYNODE.update({"PASSAGE_COUNTER_OVERFLOW": self.ELEMENT,
"LAST_PASSAGE_DIRECTION": [2],
"CURRENT_PASSAGE_DIRECTION": [2]})
self.ATTRIBUTENODE.update({"RSSI_DEVICE": [0]})
self.ATTRIBUTENODE.update({"RSSI_PEER": [0]})

@property
def ELEMENT(self):
Expand Down
33 changes: 32 additions & 1 deletion pyhomematic/devicetypes/thermostats.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,37 @@ def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)

class IPThermostatWall230V(HMThermostat):
"""
HmIP-BWTH
ClimateControl-Wall Thermostat that measures temperature and allows to set a target temperature or use some automatic mode.
"""
def __init__(self, device_description, proxy, resolveparamsets=False):
super().__init__(device_description, proxy, resolveparamsets)

# init metadata
self.SENSORNODE.update({"ACTUAL_TEMPERATURE": [1],
"HUMIDITY": [1]})
self.WRITENODE.update({"SET_POINT_TEMPERATURE": [1]})
self.ACTIONNODE.update({"BOOST_MODE": [1]})
self.ATTRIBUTENODE.update({"SET_POINT_MODE": [1]})

def get_set_temperature(self):
""" Returns the current target temperature. """
return self.getWriteData("SET_POINT_TEMPERATURE")

def set_temperature(self, target_temperature):
""" Set the target temperature. """
try:
target_temperature = float(target_temperature)
except Exception as err:
LOG.debug("Thermostat.set_temperature: Exception %s" % (err,))
return False
self.writeNodeData("SET_POINT_TEMPERATURE", target_temperature)

def turnoff(self):
""" Turn off Thermostat. """
self.writeNodeData("SET_POINT_TEMPERATURE", self.OFF_VALUE)

DEVICETYPES = {
"HM-CC-VG-1": ThermostatGroup,
Expand All @@ -324,6 +355,6 @@ def turnoff(self):
"HmIP-WTH-2": IPThermostatWall,
"HMIP-WTH": IPThermostatWall,
"HmIP-WTH": IPThermostatWall,
"HmIP-BWTH": IPThermostatWall,
"HmIP-BWTH": IPThermostatWall230V,
"HmIP-HEATING": IPThermostat,
}
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.46'
VERSION = '0.1.47'

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

Expand Down

0 comments on commit b5adc93

Please sign in to comment.