diff --git a/custom_components/helios_vallox_ventilation/configuration.yaml b/custom_components/helios_vallox_ventilation/configuration.yaml index 927ff74..3b1268d 100644 --- a/custom_components/helios_vallox_ventilation/configuration.yaml +++ b/custom_components/helios_vallox_ventilation/configuration.yaml @@ -34,25 +34,30 @@ default_value: 8 icon: "mdi:speedometer" - - name: "temperature_outside" + # now using the ISO names for temperatures + # DE: Außenlufttemperatur + - name: "temperature_outdoor_air" unit_of_measurement: "°C" device_class: "temperature" - state_class: "measurement" # this means "read-only" + state_class: "measurement" # ="read-only" icon: "mdi:thermometer" - - name: "temperature_inlet" + # DE: Zulufttemperatur + - name: "temperature_supply_air" unit_of_measurement: "°C" device_class: "temperature" state_class: "measurement" icon: "mdi:thermometer" - - name: "temperature_outlet" + # DE: Ablufttemperatur + - name: "temperature_extract_air" unit_of_measurement: "°C" device_class: "temperature" state_class: "measurement" icon: "mdi:thermometer" - - name: "temperature_exhaust" + # DE: Fortlufttemperatur + - name: "temperature_exhaust_air" unit_of_measurement: "°C" device_class: "temperature" state_class: "measurement" @@ -170,11 +175,11 @@ binary_sensors: - - name: "powerstate" # switch ???? --> wirft zZ Fehler + - name: "powerstate" # switch ???? --> throws errors on writing device_class: "power" icon: "mdi:power-settings" - - name: "post_heating_on" # Vallox only + - name: "post_heating_on" # Vallox only? device_class: "heat" icon: "mdi:heating-coil" diff --git a/custom_components/helios_vallox_ventilation/const.py b/custom_components/helios_vallox_ventilation/const.py index 5897aa8..682b6c8 100644 --- a/custom_components/helios_vallox_ventilation/const.py +++ b/custom_components/helios_vallox_ventilation/const.py @@ -49,12 +49,12 @@ # mapping error messages / faults COMPONENT_FAULTS = { - 5: 'Inlet air sensor fault', + 5: 'Supply air sensor fault', 6: 'CO2 Alarm', - 7: 'Outside air sensor fault', + 7: 'Outdoor air sensor fault', 8: 'Exhaust air sensor fault', 9: 'Water coil frost warning', - 10: 'Outlet air sensor fault' + 10: 'Extract air sensor fault' } # mapping for registers and coils @@ -66,13 +66,13 @@ # Maximum settable fanspeed "max_fanspeed" : {"varid" : 0xA5, 'type': 'fanspeed', 'bitposition': -1, 'read': True, 'write': True }, # NTC5K sensors: outside air temperature - "temperature_outside" : {"varid" : 0x32, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, + "temperature_outdoor_air" : {"varid" : 0x32, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, # NTC5K sensors: supply air temperature - "temperature_inlet" : {"varid" : 0x35, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, - # NTC5K sensors: extract / inside air temperature - "temperature_outlet" : {"varid" : 0x34, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, - # NTC5K sensors: exhaust air temperature - "temperature_exhaust" : {"varid" : 0x33, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, + "temperature_supply_air" : {"varid" : 0x35, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, + # NTC5K sensors: return air temperature + "temperature_extract_air" : {"varid" : 0x34, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, + # NTC5K sensors: discharge air temperature + "temperature_exhaust_air" : {"varid" : 0x33, 'type': 'temperature', 'bitposition': -1, 'read': True, 'write': False }, # various coils in register 0xA3 that are displayed on the remote controls (0..3 read/write, 4..7 readonly) # FB LED1: on/off Caution: Remotes will not be switched back on automatically; initial_fanspeed set if done manually. "powerstate" : {"varid" : 0xA3, 'type': 'bit', 'bitposition': 0, 'read': True, 'write': True }, diff --git a/custom_components/helios_vallox_ventilation/manifest.json b/custom_components/helios_vallox_ventilation/manifest.json index ee162b9..39c66c0 100644 --- a/custom_components/helios_vallox_ventilation/manifest.json +++ b/custom_components/helios_vallox_ventilation/manifest.json @@ -7,5 +7,5 @@ "iot_class": "local_polling", "issue_tracker": "https://github.com/Tom-Bom-badil/home-assistant_helios-vallox/issues", "requirements": [], - "version": "2024.12.8" + "version": "2024.12.9" } diff --git a/custom_components/helios_vallox_ventilation/ventcontrol.py b/custom_components/helios_vallox_ventilation/ventcontrol.py index 5cdccd3..4293b48 100644 --- a/custom_components/helios_vallox_ventilation/ventcontrol.py +++ b/custom_components/helios_vallox_ventilation/ventcontrol.py @@ -122,7 +122,7 @@ def _readTelegram(self, sender, receiver, datapoint): data = self._socket.recv(6) if len(data) == 6: buffer = data - if buffer[0] != 0x01: # lots of noise on the RS485 + if buffer[0] != 0x01: # sometimes lots of noise on the RS485 logger.debug(f"Ignoring jitter data: {' '.join(f'{byte:02X}' for byte in buffer)}") continue if (buffer[0] == 0x01 and @@ -332,10 +332,10 @@ def calculate_derived_values(self, measured_values): try: # get temperatures - temp_outside = measured_values.get("temperature_outside") - temp_inlet = measured_values.get("temperature_inlet") - temp_outlet = measured_values.get("temperature_outlet") - temp_exhaust = measured_values.get("temperature_exhaust") + temp_outside = measured_values.get("temperature_outdoor_air") + temp_inlet = measured_values.get("temperature_supply_air") + temp_outlet = measured_values.get("temperature_extract_air") + temp_exhaust = measured_values.get("temperature_exhaust_air") # calculate reduction / gain / (dis-)balance temperature_reduction = ( @@ -363,7 +363,7 @@ def calculate_derived_values(self, measured_values): ): delta_outside = temp_outlet - temp_outside if delta_outside == 0: - # temp_outlet == temp_outside would lead to div/0 + # temp_extract == temp_outdoor would lead to div/0 efficiency = 0 elif delta_outside > 0: efficiency = (temperature_gain / delta_outside) * 100 @@ -381,7 +381,7 @@ def calculate_derived_values(self, measured_values): } except Exception as e: - logger.error(f"Fehler bei der Berechnung der abgeleiteten Werte: {e}") + logger.error(f"Error in temperature/efficiency calculations: {e}") return { "temperature_reduction": None, "temperature_gain": None, @@ -417,14 +417,11 @@ def readAllValues(self, textoutput=True): if textoutput==True: print(f"{var_name}: {var_value}") -# neu - # store some values for later calculation - if var_name in ["temperature_outside", "temperature_inlet", "temperature_outlet", "temperature_exhaust"]: + if var_name in ["temperature_outdoor_air", "temperature_supply_air", "temperature_extract_air", "temperature_exhaust_air"]: measured_values[var_name] = var_value -# neu if var_name == "fault_number": - error_text = COMPONENT_FAULTS.get(var_value, "none") + error_text = COMPONENT_FAULTS.get(var_value, "") if textoutput==True: print(f"fault_text: {error_text}") self.GLOBAL_VALUES['fault_text'] = error_text @@ -433,8 +430,7 @@ def readAllValues(self, textoutput=True): print(f"{var_name}: Failed to resolve value") -# neu - if all(key in measured_values for key in ["temperature_outside", "temperature_inlet", "temperature_outlet", "temperature_exhaust"]): + if all(key in measured_values for key in ["temperature_outdoor_air", "temperature_supply_air", "temperature_extract_air", "temperature_exhaust_air"]): calculated_values = self.calculate_derived_values(measured_values) for calc_name, calc_value in calculated_values.items(): if calc_value is not None: @@ -442,7 +438,8 @@ def readAllValues(self, textoutput=True): logger.debug(f"{calc_name}: {calc_value}") if textoutput: print(f"{calc_name}: {calc_value}") -# neu + else: + logger.warning(f"Failed to calculate temperatures/efficiency - not all temps available.") else: logger.warning(f"Failed to read value for varid: {varid:02X}") diff --git a/readme.md b/readme.md index 6243599..f56c968 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,8 @@ [![Home Assistant](https://img.shields.io/badge/Home%20Assistant-%2341BDF5.svg)](https://www.home-assistant.io) [![Custom integration](https://img.shields.io/badge/custom%20integration-%2341BDF5.svg)](https://www.home-assistant.io/getting-started/concepts-terminology) [![HACS](https://img.shields.io/badge/HACS%20listed-not_yet-red.svg)](https://github.com/hacs) -[![HACS](https://img.shields.io/badge/HACS%20manual%20install-verified-green.svg)](https://github.com/hacs) -[![Version](https://img.shields.io/badge/Version-v2024.12.8-green.svg)](https://github.com/Tom-Bom-badil/home-assistant_helios-vallox/releases) +[![HACS](https://img.shields.io/badge/HACS%20install-verified-green.svg)](https://github.com/hacs) +[![Version](https://img.shields.io/badge/Version-v2024.12.9-green.svg)](https://github.com/Tom-Bom-badil/home-assistant_helios-vallox/releases) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/Tom-Bom-badil/home-assistant_helios-vallox/graphs/commit-activity) # Integration for Helios / Vallox central house ventilation systems with RS-485 bus (pre-EasyControls aka pre-2014 models)