Skip to content

Commit

Permalink
Merge pull request #198 from Padanian/main
Browse files Browse the repository at this point in the history
Added Cooling surface and cooling fan coil registers, HK3 water temperatures registers
  • Loading branch information
pail23 authored Feb 13, 2024
2 parents aa3729c + 2c97b67 commit ed53ad7
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 3 deletions.
7 changes: 7 additions & 0 deletions custom_components/stiebel_eltron_isg/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
TARGET_TEMPERATURE_HK1 = "target_temperature_hk1"
ACTUAL_TEMPERATURE_HK2 = "actual_temperature_hk2"
TARGET_TEMPERATURE_HK2 = "target_temperature_hk2"
ACTUAL_TEMPERATURE_HK3 = "actual_temperature_hk3"
TARGET_TEMPERATURE_HK3 = "target_temperature_hk3"
ACTUAL_ROOM_TEMPERATURE_HK1 = "actual_room_temperature_hk1"
TARGET_ROOM_TEMPERATURE_HK1 = "target_room_temperature_hk1"
ACTUAL_ROOM_TEMPERATURE_HK2 = "actual_room_temperature_hk2"
Expand All @@ -63,6 +65,11 @@
SG_READY_ACTIVE = "sg_ready_active"
SG_READY_INPUT_1 = "sg_ready_input_1"
SG_READY_INPUT_2 = "sg_ready_input_2"
ACTUAL_TEMPERATURE_COOLING_FANCOIL = "actual_temperature_cooling_fancoil"
TARGET_TEMPERATURE_COOLING_FANCOIL = "target_temperature_cooling_fancoil"
ACTUAL_TEMPERATURE_COOLING_SURFACE = "actual_temperature_cooling_surface"
TARGET_TEMPERATURE_COOLING_SURFACE = "target_temperature_cooling_surface"


HOT_GAS_TEMPERATURE = "hot_gas_temperature"
HIGH_PRESSURE = "high_pressure"
Expand Down
24 changes: 24 additions & 0 deletions custom_components/stiebel_eltron_isg/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
TARGET_TEMPERATURE_HK1,
ACTUAL_TEMPERATURE_HK2,
TARGET_TEMPERATURE_HK2,
ACTUAL_TEMPERATURE_HK3,
TARGET_TEMPERATURE_HK3,
FLOW_TEMPERATURE,
FLOW_TEMPERATURE_NHZ,
RETURN_TEMPERATURE,
Expand Down Expand Up @@ -89,6 +91,10 @@
EXTRACT_AIR_ACTUAL_FAN_SPEED,
EXTRACT_AIR_TARGET_FLOW_RATE,
EXTRACT_AIR_HUMIDITY,
ACTUAL_TEMPERATURE_COOLING_FANCOIL,
TARGET_TEMPERATURE_COOLING_FANCOIL,
ACTUAL_TEMPERATURE_COOLING_SURFACE,
TARGET_TEMPERATURE_COOLING_SURFACE,
)
from .entity import StiebelEltronISGEntity

Expand Down Expand Up @@ -208,6 +214,24 @@ def create_volume_stream_entity_description(name, key):
create_temperature_entity_description(
"Target Temperature HK 2", TARGET_TEMPERATURE_HK2
),
create_temperature_entity_description(
"Actual Temperature HK 3", ACTUAL_TEMPERATURE_HK3
),
create_temperature_entity_description(
"Target Temperature HK 3", TARGET_TEMPERATURE_HK3
),
create_temperature_entity_description(
"Actual Temperature Cooling Fancoil", ACTUAL_TEMPERATURE_COOLING_FANCOIL
),
create_temperature_entity_description(
"Target Temperature Cooling Fancoil", TARGET_TEMPERATURE_COOLING_FANCOIL
),
create_temperature_entity_description(
"Actual Temperature Cooling Surface", ACTUAL_TEMPERATURE_COOLING_SURFACE
),
create_temperature_entity_description(
"Target Temperature Cooling Surface", TARGET_TEMPERATURE_COOLING_SURFACE
),
create_temperature_entity_description(
"Actual Room Temperature HK 1", ACTUAL_ROOM_TEMPERATURE_HK1
),
Expand Down
40 changes: 37 additions & 3 deletions custom_components/stiebel_eltron_isg/wpm_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
TARGET_TEMPERATURE_HK1,
ACTUAL_TEMPERATURE_HK2,
TARGET_TEMPERATURE_HK2,
ACTUAL_TEMPERATURE_HK3,
TARGET_TEMPERATURE_HK3,
FLOW_TEMPERATURE,
FLOW_TEMPERATURE_NHZ,
RETURN_TEMPERATURE,
Expand Down Expand Up @@ -103,6 +105,10 @@
FAN_COOLING_TARGET_FLOW_TEMPERATURE,
ACTIVE_ERROR,
ERROR_STATUS,
ACTUAL_TEMPERATURE_COOLING_FANCOIL,
TARGET_TEMPERATURE_COOLING_FANCOIL,
ACTUAL_TEMPERATURE_COOLING_SURFACE,
TARGET_TEMPERATURE_COOLING_SURFACE,
)

_LOGGER: logging.Logger = logging.getLogger(__package__)
Expand Down Expand Up @@ -160,7 +166,7 @@ def read_modbus_system_state(self) -> dict:
def read_modbus_system_values(self) -> dict:
"""Read the system related values from the ISG."""
result = {}
inverter_data = self.read_input_registers(slave=1, address=500, count=96)
inverter_data = self.read_input_registers(slave=1, address=500, count=111)
if not inverter_data.isError():
decoder = BinaryPayloadDecoder.fromRegisters(
inverter_data.registers, byteorder=Endian.BIG
Expand Down Expand Up @@ -248,8 +254,24 @@ def read_modbus_system_values(self) -> dict:
result[TARGET_TEMPERATURE_WATER] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 524-535
decoder.skip_bytes(24)
# 524 Cooling Fancoil
result[ACTUAL_TEMPERATURE_COOLING_FANCOIL] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 525 Cooling Fancoil
result[TARGET_TEMPERATURE_COOLING_FANCOIL] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 526 Cooling Surface
result[ACTUAL_TEMPERATURE_COOLING_SURFACE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 527 Cooling Surface
result[TARGET_TEMPERATURE_COOLING_SURFACE] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 528-535
decoder.skip_bytes(16)
# 536
result[SOURCE_TEMPERATURE] = get_isg_scaled_value(
decoder.decode_16bit_int()
Expand Down Expand Up @@ -370,6 +392,18 @@ def read_modbus_system_values(self) -> dict:
result[DEWPOINT_TEMPERATURE_HK3] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 596-599 TEMPERATURE_HK4
# 600-603 TEMPERATURE_HK5
# 604-608 COOLING CIRCUIT TEMPERATURE_HK1 to HK5
decoder.skip_bytes(26)
# 609
result[ACTUAL_TEMPERATURE_HK3] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
# 610
result[TARGET_TEMPERATURE_HK3] = get_isg_scaled_value(
decoder.decode_16bit_int()
)
result["system_values"] = list(inverter_data.registers)
return result

Expand Down

0 comments on commit ed53ad7

Please sign in to comment.