From 1f4b22d75f6c22aea2c71f49335da08111217a9e Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 21:39:05 +0200 Subject: [PATCH 1/7] typedDict add airquality (for Mypy) --- src/ramses_tx/parsers.py | 62 ++++++++++++++++++++----------- src/ramses_tx/typed_dicts.py | 24 ++++++++++-- tests/tests/parsers/code_31da.log | 31 ++++++++++++++++ 3 files changed, 92 insertions(+), 25 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 081b9fe1..291304da 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -40,6 +40,7 @@ SZ_DEVICE_ID, SZ_DEVICE_ROLE, SZ_DEVICES, + SZ_DEWPOINT_TEMP, SZ_DHW_FLOW_RATE, SZ_DOMAIN_ID, SZ_DOMAIN_IDX, @@ -2153,27 +2154,46 @@ def parser_31d9(payload: str, msg: Message) -> dict[str, Any]: # ventilation state (extended), HVAC def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: # see: https://github.com/python/typing/issues/1445 - return { # type: ignore[typeddict-unknown-key] - **parse_exhaust_fan_speed(payload[38:40]), # maybe 31D9[4:6] for some? - **parse_fan_info(payload[36:38]), # 22F3-ish - # - **parse_air_quality(payload[2:6]), # 12C8[2:6] - **parse_co2_level(payload[6:10]), # 1298[2:6] - **parse_indoor_humidity(payload[10:12]), # 12A0? - **parse_outdoor_humidity(payload[12:14]), - **parse_exhaust_temp(payload[14:18]), # to outside - **parse_supply_temp(payload[18:22]), # to home - **parse_indoor_temp(payload[22:26]), # in home - **parse_outdoor_temp(payload[26:30]), # 1290? - **parse_capabilities(payload[30:34]), - **parse_bypass_position(payload[34:36]), # 22F7-ish - **parse_supply_fan_speed(payload[40:42]), - **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] - **parse_post_heater(payload[46:48]), - **parse_pre_heater(payload[48:50]), - **parse_supply_flow(payload[50:54]), # NOTE: is supply, not exhaust - **parse_exhaust_flow(payload[54:58]), # NOTE: order switched from others - } + if msg.len == 30 and payload[30:38] == "BE09001F": # ClimaRad VenturaV1x 2021 + assert payload[12:14] == "EF", f"Ventura 31DA 12: {payload[12:14]}" + assert payload[18:22] == "7FFF", f"Ventura 31DA 18: {payload[18:22]}" + assert payload[38:40] == payload[40:42], f"Ventura 31DA twin {payload[40:42]}" + assert payload[42:60] == "000000008500850000" + return { + "zone": f"0x{payload[0:2]}", # zone + **parse_air_quality( + payload[2:6] + ), # N/A in VenturaV1x (reports CO2 in 12A0) but must include for Mypy?? + SZ_DEWPOINT_TEMP: hex_to_temp(payload[6:10]), # confirmed + "_unknown_1": f"0x{payload[10:12]}", # 0x00|08|3E|52|7F|9A|AF|D3 = ? + **parse_indoor_temp(payload[22:26]), + **parse_exhaust_temp(payload[26:30]), + **parse_bypass_position(payload[38:40]), # 0x00|14 TODO confirm in summer + } # type: ignore[return-value] + else: + return { + **parse_exhaust_fan_speed( + payload[38:40] + ), # indeed in 31D9[4:6] for some, like Vasco D60 + **parse_fan_info(payload[36:38]), # 22F3-ish + # + **parse_air_quality(payload[2:6]), # 12C8[2:6] + **parse_co2_level(payload[6:10]), # 1298[2:6] + **parse_indoor_humidity(payload[10:12]), # 12A0? + **parse_outdoor_humidity(payload[12:14]), + **parse_exhaust_temp(payload[14:18]), # to outside + **parse_supply_temp(payload[18:22]), # to home + **parse_indoor_temp(payload[22:26]), # in home + **parse_outdoor_temp(payload[26:30]), # 1290? + **parse_capabilities(payload[30:34]), + **parse_bypass_position(payload[34:36]), # 22F7-ish + **parse_supply_fan_speed(payload[40:42]), + **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] + **parse_post_heater(payload[46:48]), + **parse_pre_heater(payload[48:50]), + **parse_supply_flow(payload[50:54]), # NOTE: is supply, not exhaust + **parse_exhaust_flow(payload[54:58]), # NOTE: order switched from others + } # type: ignore[return-value] # From an Orcon 15RF Display # 1 Software version diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index a06380b5..843552ba 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -200,6 +200,22 @@ class _313f(TypedDict): _unknown_0: str +class AirQuality(TypedDict): + air_quality: float | None + air_quality_basis: NotRequired[str] + + +class _31da_v(TypedDict): # v for ClimaRad Ventura + zone: str | None + air_quality: AirQuality + air_quality_basis: NotRequired[str] + SZ_DEWPOINT_TEMP: float | None + _unknown_1: str | None + SZ_INDOOR_TEMP: float | None + SZ_EXHAUST_TEMP: float | None + SZ_BYPASS_POSITION: float | None + + class _3220(TypedDict): msg_id: int # OtDataId msg_type: str # OtMsgType @@ -282,9 +298,9 @@ class FaultLogEntry(TypedDict): # NOTE: not identical to _0418 # These are from 31DA... -class AirQuality(TypedDict): - air_quality: float | None - air_quality_basis: NotRequired[str] +# class AirQuality(TypedDict): # moved before 31DA +# air_quality: float | None +# air_quality_basis: NotRequired[str] class Co2Level(TypedDict): @@ -427,7 +443,7 @@ class PayDictT: _2E04: TypeAlias = _2e04 _3110: TypeAlias = _3110 _313F: TypeAlias = _313f - _31DA: TypeAlias = _VentilationState + _31DA: TypeAlias = _VentilationState | _31da_v _3200: TypeAlias = _Temperature _3210: TypeAlias = _Temperature _3B00: TypeAlias = _3b00 diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index af543c54..75dbc9b9 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -300,3 +300,34 @@ # Siber DF EVO 2 2024-06-21T04:47:19.545913 ... I --- 32:137185 --:------ 32:137185 31DA 030 00EF007FFFEFEF080607D809480737F002AA02344000005CEF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.26, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 20.54, 'supply_temp': 20.08, 'indoor_temp': 23.76, 'outdoor_temp': 18.47, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'post_heater'], 'bypass_position': 0.85, 'supply_fan_speed': 0.32, 'remaining_mins': 0, 'post_heat': 0.46, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} 2024-06-21T04:49:59.398298 ... I --- 32:137185 --:------ 32:137185 31DA 030 00EF007FFFEFEF086C07CC09380730F002A0023440000068EF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.26, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 21.56, 'supply_temp': 19.96, 'indoor_temp': 23.60, 'outdoor_temp': 18.40, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'post_heater'], 'bypass_position': 0.80, 'supply_fan_speed': 0.32, 'remaining_mins': 0, 'post_heat': 0.52, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} + +# Vasco D60 HRU +2024-10-15T12:46:03.623447 082 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF058506EE0773051FA800EF0232320000EF00051902EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 14.13, 'supply_temp': 17.74, 'indoor_temp': 19.07, 'outdoor_temp': 13.11, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.05, 'exhaust_flow': 7.5} +2024-10-15T13:53:09.930437 083 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF05F8075207B705B1A800EF0232320000EF000263018400 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 15.28, 'supply_temp': 18.74, 'indoor_temp': 19.75, 'outdoor_temp': 14.57, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 6.11, 'exhaust_flow': 3.88} +2024-10-15T13:21:16.306823 084 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF05CC07220795057AA800EF0232320000EF0003CC026300 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 14.84, 'supply_temp': 18.26, 'indoor_temp': 19.41, 'outdoor_temp': 14.02, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 9.72, 'exhaust_flow': 6.11} +2024-10-15T15:45:21.214426 086 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF062C7FFF7FFF05AAA800EF0128280000EF007FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.2, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 15.8, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': 14.5, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.2, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': None, 'exhaust_flow': None} +2024-10-15T22:54:16.347179 085 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF04D0070507A30443A800EF011E1E0000EF0002EE020F00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.15, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 12.32, 'supply_temp': 17.97, 'indoor_temp': 19.55, 'outdoor_temp': 10.91, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.15, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 7.5, 'exhaust_flow': 5.27} + +# ClimaRad Ventura +# .I + 31DA 030 00 EF 00 029C 00 EF 070D 7FFF 0833 07A8 BE09001F 0000 000000008500850000 (auto) +# .I + 31DA 030 00 EF 00 02C8 00 EF 07AA 7FFF 07CB 05F0 BE09001F 0808 000000008500850000 (speed 1) +# .I + 31DA 030 00 EF 00 023B 00 EF 0751 7FFF 0732 055A BE09001F 1414 000000008500850000 (speed 2) +# .I + 31DA 030 00 EF 00 019F 00 EF 067A 7FFF 0807 074E BE09001F 0000 000000008500850000 (auto) +# .I + 31DA 030 00 EF 00 0195 F7 EF 0621 7FFF 0846 0773 BE09001F 0000 000000008500850000 (wake up button press, no changes) +# .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 +# airQ? | | | | | no ascii |—|———| +# Deduction: | | | | | |___0502-07F7_| << 0-255 = speed% ? +# hexStr4 temp___| | | | |___055A-0813=hexStr4 temp +# 00|08|52|9A|D3_| | |___(00|08|14){2} +# | |___0300-D7CA_ << 0-255 = ? +# temp1 temp2 temp3 temp4 +# Previous parser raises invalid_fan_info +# New parser: +2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 5.79, '_unknown_1': '0x00', 'indoor_temp': 20.73, 'exhaust_temp': 19.09, 'bypass_position': 0.0} + +2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 6.68, '_unknown_1': '0x00', 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'bypass_position': 0.0} # auto +2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 7.12, '_unknown_1': '0x00', 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'bypass_position': 0.04} # speed 1 +2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 5.71, '_unknown_1': '0x00', 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'bypass_position': 0.1} # speed 2 +2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.15, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'bypass_position': 0.0} # auto +2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.05, '_unknown_1': '0xF7', 'indoor_temp': 21.18, 'exhaust_temp': 19.07, 'bypass_position': 0.0} # 1st button press = no changes +2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.27, '_unknown_1': '0x3E', 'indoor_temp': 19.8, 'exhaust_temp': 17.7, 'bypass_position': 0.0} # From fd6d764a7ae3fdc45bab531f70a1ce2013655ad1 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 21:45:03 +0200 Subject: [PATCH 2/7] clean up log diagram --- tests/tests/parsers/code_31da.log | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index 75dbc9b9..9c4d0e1c 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -308,21 +308,20 @@ 2024-10-15T15:45:21.214426 086 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF062C7FFF7FFF05AAA800EF0128280000EF007FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.2, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 15.8, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': 14.5, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.2, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': None, 'exhaust_flow': None} 2024-10-15T22:54:16.347179 085 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF04D0070507A30443A800EF011E1E0000EF0002EE020F00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.15, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 12.32, 'supply_temp': 17.97, 'indoor_temp': 19.55, 'outdoor_temp': 10.91, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.15, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 7.5, 'exhaust_flow': 5.27} -# ClimaRad Ventura +# ClimaRad VenturaV1x # .I + 31DA 030 00 EF 00 029C 00 EF 070D 7FFF 0833 07A8 BE09001F 0000 000000008500850000 (auto) # .I + 31DA 030 00 EF 00 02C8 00 EF 07AA 7FFF 07CB 05F0 BE09001F 0808 000000008500850000 (speed 1) # .I + 31DA 030 00 EF 00 023B 00 EF 0751 7FFF 0732 055A BE09001F 1414 000000008500850000 (speed 2) # .I + 31DA 030 00 EF 00 019F 00 EF 067A 7FFF 0807 074E BE09001F 0000 000000008500850000 (auto) # .I + 31DA 030 00 EF 00 0195 F7 EF 0621 7FFF 0846 0773 BE09001F 0000 000000008500850000 (wake up button press, no changes) # .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 -# airQ? | | | | | no ascii |—|———| -# Deduction: | | | | | |___0502-07F7_| << 0-255 = speed% ? -# hexStr4 temp___| | | | |___055A-0813=hexStr4 temp -# 00|08|52|9A|D3_| | |___(00|08|14){2} -# | |___0300-D7CA_ << 0-255 = ? -# temp1 temp2 temp3 temp4 -# Previous parser raises invalid_fan_info -# New parser: +# airQ? | | | | | no ascii |_|___(00|08|14){2} +# Deduction: | | | | |___0502-07F7 << 0-255 = speed% ? +# hexStr4 temp___| | | |___055A-0813=hexStr4 temp +# 00|08|52|9A|D3_| |___0300-D7CA_ << 0-255 = ? +# | | | | +# temp1 temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU +# Default parser raises invalid_fan_info. New parser reports: 2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 5.79, '_unknown_1': '0x00', 'indoor_temp': 20.73, 'exhaust_temp': 19.09, 'bypass_position': 0.0} 2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 6.68, '_unknown_1': '0x00', 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'bypass_position': 0.0} # auto From 60585a14e88960ef2f74b90acf4503b958de89d4 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 16:34:29 +0200 Subject: [PATCH 3/7] remove ventura asserts --- src/ramses_tx/parsers.py | 59 ++++++++++++++----------------- src/ramses_tx/typed_dicts.py | 1 - tests/tests/parsers/code_31da.log | 20 ++++++----- 3 files changed, 38 insertions(+), 42 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 3474f1a1..81fac51c 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -2167,46 +2167,41 @@ def parser_31d9(payload: str, msg: Message) -> dict[str, Any]: def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: # see: https://github.com/python/typing/issues/1445 if msg.len == 30 and payload[30:38] == "BE09001F": # ClimaRad VenturaV1x 2021 - assert payload[12:14] == "EF", f"Ventura 31DA 12: {payload[12:14]}" - assert payload[18:22] == "7FFF", f"Ventura 31DA 18: {payload[18:22]}" - assert payload[38:40] == payload[40:42], f"Ventura 31DA twin {payload[40:42]}" - assert payload[42:60] == "000000008500850000" return { - "zone": f"0x{payload[0:2]}", # zone - **parse_air_quality( - payload[2:6] - ), # N/A in VenturaV1x (reports CO2 in 12A0) but must include for Mypy?? + **parse_air_quality(payload[2:6]), SZ_DEWPOINT_TEMP: hex_to_temp(payload[6:10]), # confirmed "_unknown_1": f"0x{payload[10:12]}", # 0x00|08|3E|52|7F|9A|AF|D3 = ? **parse_indoor_temp(payload[22:26]), **parse_exhaust_temp(payload[26:30]), - **parse_bypass_position(payload[38:40]), # 0x00|14 TODO confirm in summer - } # type: ignore[return-value] - else: - return { - **parse_exhaust_fan_speed( + **parse_bypass_position( payload[38:40] - ), # indeed in 31D9[4:6] for some, like Vasco D60 - **parse_fan_info(payload[36:38]), # 22F3-ish - # - **parse_air_quality(payload[2:6]), # 12C8[2:6] - **parse_co2_level(payload[6:10]), # 1298[2:6] - **parse_indoor_humidity(payload[10:12]), # 12A0? - **parse_outdoor_humidity(payload[12:14]), - **parse_exhaust_temp(payload[14:18]), # to outside - **parse_supply_temp(payload[18:22]), # to home - **parse_indoor_temp(payload[22:26]), # in home - **parse_outdoor_temp(payload[26:30]), # 1290? - **parse_capabilities(payload[30:34]), - **parse_bypass_position(payload[34:36]), # 22F7-ish - **parse_supply_fan_speed(payload[40:42]), - **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] - **parse_post_heater(payload[46:48]), - **parse_pre_heater(payload[48:50]), - **parse_supply_flow(payload[50:54]), # NOTE: is supply, not exhaust - **parse_exhaust_flow(payload[54:58]), # NOTE: order switched from others + ), # 0x00|08|14 TODO confirm in summer } # type: ignore[return-value] + return { + **parse_exhaust_fan_speed( + payload[38:40] + ), # indeed in 31D9[4:6] for some, like Vasco D60 + **parse_fan_info(payload[36:38]), # 22F3-ish + # + **parse_air_quality(payload[2:6]), # 12C8[2:6] + **parse_co2_level(payload[6:10]), # 1298[2:6] + **parse_indoor_humidity(payload[10:12]), # 12A0? + **parse_outdoor_humidity(payload[12:14]), + **parse_exhaust_temp(payload[14:18]), # to outside + **parse_supply_temp(payload[18:22]), # to home + **parse_indoor_temp(payload[22:26]), # in home + **parse_outdoor_temp(payload[26:30]), # 1290? + **parse_capabilities(payload[30:34]), + **parse_bypass_position(payload[34:36]), # 22F7-ish + **parse_supply_fan_speed(payload[40:42]), + **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] + **parse_post_heater(payload[46:48]), + **parse_pre_heater(payload[48:50]), + **parse_supply_flow(payload[50:54]), # NOTE: is supply, not exhaust + **parse_exhaust_flow(payload[54:58]), # NOTE: order switched from others + } # type: ignore[return-value] + # From an Orcon 15RF Display # 1 Software version # 4 RH value in home (%) SZ_INDOOR_HUMIDITY diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index 95a5ce3b..e8580b30 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -348,7 +348,6 @@ class AirQuality(TypedDict): class _31da_v(TypedDict): # v for ClimaRad Ventura - zone: str | None air_quality: AirQuality air_quality_basis: NotRequired[str] SZ_DEWPOINT_TEMP: float | None diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index 9c4d0e1c..fe1ec69e 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -315,18 +315,20 @@ # .I + 31DA 030 00 EF 00 019F 00 EF 067A 7FFF 0807 074E BE09001F 0000 000000008500850000 (auto) # .I + 31DA 030 00 EF 00 0195 F7 EF 0621 7FFF 0846 0773 BE09001F 0000 000000008500850000 (wake up button press, no changes) # .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 -# airQ? | | | | | no ascii |_|___(00|08|14){2} +# airQ? | | | | | no ascii |_|___(00|08|14){2} # Deduction: | | | | |___0502-07F7 << 0-255 = speed% ? # hexStr4 temp___| | | |___055A-0813=hexStr4 temp # 00|08|52|9A|D3_| |___0300-D7CA_ << 0-255 = ? # | | | | # temp1 temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU # Default parser raises invalid_fan_info. New parser reports: -2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 5.79, '_unknown_1': '0x00', 'indoor_temp': 20.73, 'exhaust_temp': 19.09, 'bypass_position': 0.0} - -2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 6.68, '_unknown_1': '0x00', 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'bypass_position': 0.0} # auto -2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 7.12, '_unknown_1': '0x00', 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'bypass_position': 0.04} # speed 1 -2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 5.71, '_unknown_1': '0x00', 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'bypass_position': 0.1} # speed 2 -2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.15, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'bypass_position': 0.0} # auto -2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.05, '_unknown_1': '0xF7', 'indoor_temp': 21.18, 'exhaust_temp': 19.07, 'bypass_position': 0.0} # 1st button press = no changes -2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # {'hvac_id': '00', 'zone': '0x00', 'air_quality': None, 'dewpoint_temp': 4.27, '_unknown_1': '0x3E', 'indoor_temp': 19.8, 'exhaust_temp': 17.7, 'bypass_position': 0.0} # +2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.79, '_unknown_1': '0x00', 'indoor_temp': 20.73, 'exhaust_temp': 19.09, 'bypass_position': 0.0} + +2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 6.68, '_unknown_1': '0x00', 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'bypass_position': 0.0} # auto +2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 7.12, '_unknown_1': '0x00', 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'bypass_position': 0.04} # speed 1 +2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.71, '_unknown_1': '0x00', 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'bypass_position': 0.1} # speed 2 +2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.15, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'bypass_position': 0.0} # auto +2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.05, '_unknown_1': '0xF7', 'indoor_temp': 21.18, 'exhaust_temp': 19.07, 'bypass_position': 0.0} # 1st button press = no changes +2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.27, '_unknown_1': '0x3E', 'indoor_temp': 19.8, 'exhaust_temp': 17.7, 'bypass_position': 0.0} # +2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.56, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.95, 'bypass_position': 0.0} +# TODO compare with temps in 12A0: 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 From b54d49abd6a37308f177492244ad803b8857c2ac Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 21 Oct 2024 14:01:18 +0200 Subject: [PATCH 4/7] parse V1x temps compared to D60 --- src/ramses_tx/parsers.py | 21 +++++++------ src/ramses_tx/typed_dicts.py | 14 ++++----- tests/tests/parsers/code_31da.log | 50 ++++++++++++++++++++++--------- 3 files changed, 51 insertions(+), 34 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 81fac51c..70b59c84 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -40,7 +40,6 @@ SZ_DEVICE_ID, SZ_DEVICE_ROLE, SZ_DEVICES, - SZ_DEWPOINT_TEMP, SZ_DHW_FLOW_RATE, SZ_DOMAIN_ID, SZ_DOMAIN_IDX, @@ -2166,22 +2165,22 @@ def parser_31d9(payload: str, msg: Message) -> dict[str, Any]: # ventilation state (extended), HVAC def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: # see: https://github.com/python/typing/issues/1445 - if msg.len == 30 and payload[30:38] == "BE09001F": # ClimaRad VenturaV1x 2021 + if ( + msg.len == 30 and msg.src.type == "37" and payload[30:38] == "BE09001F" + ): # ClimaRad VenturaV1x 2021 return { - **parse_air_quality(payload[2:6]), - SZ_DEWPOINT_TEMP: hex_to_temp(payload[6:10]), # confirmed - "_unknown_1": f"0x{payload[10:12]}", # 0x00|08|3E|52|7F|9A|AF|D3 = ? + **parse_co2_level(payload[6:10]), # 1298[2:6] + "_unknown_1": payload[10:12], # 0x00|08|3E|52|7F|9A|AF|D3 = ? + **parse_outdoor_temp(payload[14:18]), + **parse_supply_temp(payload[18:22]), **parse_indoor_temp(payload[22:26]), **parse_exhaust_temp(payload[26:30]), - **parse_bypass_position( - payload[38:40] - ), # 0x00|08|14 TODO confirm in summer + # static [30:38] string + "_unknown_2": payload[38:40], # 0x00|08|14 and repeated in [40:42] } # type: ignore[return-value] return { - **parse_exhaust_fan_speed( - payload[38:40] - ), # indeed in 31D9[4:6] for some, like Vasco D60 + **parse_exhaust_fan_speed(payload[38:40]), **parse_fan_info(payload[36:38]), # 22F3-ish # **parse_air_quality(payload[2:6]), # 12C8[2:6] diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index e8580b30..d70fbb8e 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -342,19 +342,15 @@ class _313f(TypedDict): _unknown_0: str -class AirQuality(TypedDict): - air_quality: float | None - air_quality_basis: NotRequired[str] - - class _31da_v(TypedDict): # v for ClimaRad Ventura - air_quality: AirQuality - air_quality_basis: NotRequired[str] + co2_level: float | None SZ_DEWPOINT_TEMP: float | None _unknown_1: str | None - SZ_INDOOR_TEMP: float | None SZ_EXHAUST_TEMP: float | None - SZ_BYPASS_POSITION: float | None + SZ_SUPPLY_TEMP: float | None + SZ_INDOOR_TEMP: float | None + SZ_OUTDOOR_TEMP: float | None + _unknown_2: str | None class _3220(TypedDict): diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index fe1ec69e..ad05e3bf 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -302,11 +302,16 @@ 2024-06-21T04:49:59.398298 ... I --- 32:137185 --:------ 32:137185 31DA 030 00EF007FFFEFEF086C07CC09380730F002A0023440000068EF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.26, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 21.56, 'supply_temp': 19.96, 'indoor_temp': 23.60, 'outdoor_temp': 18.40, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'post_heater'], 'bypass_position': 0.80, 'supply_fan_speed': 0.32, 'remaining_mins': 0, 'post_heat': 0.52, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} # Vasco D60 HRU +# speed is actually in 31D9[4:6] 2024-10-15T12:46:03.623447 082 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF058506EE0773051FA800EF0232320000EF00051902EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 14.13, 'supply_temp': 17.74, 'indoor_temp': 19.07, 'outdoor_temp': 13.11, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.05, 'exhaust_flow': 7.5} 2024-10-15T13:53:09.930437 083 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF05F8075207B705B1A800EF0232320000EF000263018400 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 15.28, 'supply_temp': 18.74, 'indoor_temp': 19.75, 'outdoor_temp': 14.57, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 6.11, 'exhaust_flow': 3.88} 2024-10-15T13:21:16.306823 084 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF05CC07220795057AA800EF0232320000EF0003CC026300 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 14.84, 'supply_temp': 18.26, 'indoor_temp': 19.41, 'outdoor_temp': 14.02, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 9.72, 'exhaust_flow': 6.11} 2024-10-15T15:45:21.214426 086 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF062C7FFF7FFF05AAA800EF0128280000EF007FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.2, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 15.8, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': 14.5, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.2, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': None, 'exhaust_flow': None} 2024-10-15T22:54:16.347179 085 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF04D0070507A30443A800EF011E1E0000EF0002EE020F00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.15, 'fan_info': 'speed 1, low', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 12.32, 'supply_temp': 17.97, 'indoor_temp': 19.55, 'outdoor_temp': 10.91, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.15, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 7.5, 'exhaust_flow': 5.27} +# fan manual 2 +2024-10-18T13:37:05.811916 087 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF082C07F9081C082BA800EF0232320000EF00051902B600 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 20.92, 'supply_temp': 20.41, 'indoor_temp': 20.76, 'outdoor_temp': 20.91, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.05, 'exhaust_flow': 6.94} +# Rainy, speed 2 +2024-10-21T13:21:55.233373 094 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF06CA077307C00692A800EF0232320000EF00053502EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.33, 'exhaust_flow': 7.5} # ClimaRad VenturaV1x # .I + 31DA 030 00 EF 00 029C 00 EF 070D 7FFF 0833 07A8 BE09001F 0000 000000008500850000 (auto) @@ -317,18 +322,35 @@ # .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 # airQ? | | | | | no ascii |_|___(00|08|14){2} # Deduction: | | | | |___0502-07F7 << 0-255 = speed% ? -# hexStr4 temp___| | | |___055A-0813=hexStr4 temp -# 00|08|52|9A|D3_| |___0300-D7CA_ << 0-255 = ? -# | | | | -# temp1 temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU +# CO2___hexStr4 ___| | | |___055A-0813=hexStr4 +# 00|08|52|9A|D3___| |___0300-D7CA_ << 0-255 = ? +# | | | +# temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU # Default parser raises invalid_fan_info. New parser reports: -2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.79, '_unknown_1': '0x00', 'indoor_temp': 20.73, 'exhaust_temp': 19.09, 'bypass_position': 0.0} - -2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 6.68, '_unknown_1': '0x00', 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'bypass_position': 0.0} # auto -2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 7.12, '_unknown_1': '0x00', 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'bypass_position': 0.04} # speed 1 -2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.71, '_unknown_1': '0x00', 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'bypass_position': 0.1} # speed 2 -2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.15, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'bypass_position': 0.0} # auto -2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.05, '_unknown_1': '0xF7', 'indoor_temp': 21.18, 'exhaust_temp': 19.07, 'bypass_position': 0.0} # 1st button press = no changes -2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 4.27, '_unknown_1': '0x3E', 'indoor_temp': 19.8, 'exhaust_temp': 17.7, 'bypass_position': 0.0} # -2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'dewpoint_temp': 5.56, '_unknown_1': '0x00', 'indoor_temp': 20.55, 'exhaust_temp': 18.95, 'bypass_position': 0.0} -# TODO compare with temps in 12A0: 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 +2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 579, '_unknown_1': '00', 'outdoor_temp': 17.67, 'supply_temp': None, 'indoor_temp': 20.73, 'exhaust_temp': 19.09, '_unknown_2': '00'} + +2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 668, '_unknown_1': '00', 'outdoor_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'exhaust_temp': 19.6, '_unknown_2': '00'} # auto +2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'co2_level': 712, '_unknown_1': '00', 'outdoor_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'exhaust_temp': 15.2, '_unknown_2': '08'} # speed 1 +2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'co2_level': 571, '_unknown_1': '00', 'outdoor_temp': 18.73, 'supply_temp': None, 'indoor_temp': 18.42, 'exhaust_temp': 13.7, '_unknown_2': '14'} # speed 2 +2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 415, '_unknown_1': '00', 'outdoor_temp': 16.58, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.7, '_unknown_2': '00'} # auto +2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # 1st button press = no changes +2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # +2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 556, '_unknown_1': '00', 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, '_unknown_2': '00'} +# Compare 'indoor_temp': 20.55, 'exhaust_temp': 18.95 with temperatures in 12A0 at same time: +# 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 +# [{'hvac_idx': '00', 'indoor_humidity': 0.65, 'temperature': 19.33, 'dewpoint_temp': None}, +# {'hvac_idx': '01', 'rel_humidity': None}, +# {'hvac_idx': '02', 'outdoor_humidity': 0.71, 'temperature': 18.73, 'dewpoint_temp': 13.44}] +# Selector string: +# My VenturaV1x: BE09001F = BE 09 00 1F = d 190 9 0 31 +# Another HVC: F800EF18 = F8 00 EF 18 = d 248 0 NA 24 +# Different HVC (from the neighbours): +2024-10-21T00:03:43.334878 084 I --- 37:125482 --:------ 37:125482 31DA 030 00EF007FFF4BEF7FFF7FFF7FFF7FFFF800EF18C8000000EFEF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 1.0, 'fan_info': 'auto', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': 0.75, 'outdoor_humidity': None, 'exhaust_temp': None, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': None, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} +# Same, Rainy: +2024-10-21T13:25:18.172659 084 I --- 37:125482 --:------ 37:125482 31DA 030 00EF007FFF41EF7FFF7FFF7FFF7FFFF800EF183C000000EFEF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.3, 'fan_info': 'auto', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': 0.65, 'outdoor_humidity': None, 'exhaust_temp': None, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': None, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} +# D60 same moment: +2024-10-21T13:21:55.233373 094 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF06CA077307C00692A800EF0232320000EF00053502EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.33, 'exhaust_flow': 7.5} +# Ventura cont. Rainy cf. D60 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82 matching temps +2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 556, '_unknown_1': '00', 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, '_unknown_2': '00'} +# Manual speed 2, same temps, noete CO2 level dropping +2024-10-21T13:49:35.331599 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E17FFF08020766BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 414, '_unknown_1': '00', 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.5, 'exhaust_temp': 18.94, '_unknown_2': '00'} From d2c60d10fac000d71d7686bfea676623af111c52 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 21 Oct 2024 17:38:36 +0200 Subject: [PATCH 5/7] remove _v TypedDict + parser, add packets for known states --- src/ramses_tx/parsers.py | 24 +++++-------------- src/ramses_tx/typed_dicts.py | 13 +---------- tests/tests/parsers/code_31da.log | 38 +++++++++++++++++++------------ 3 files changed, 30 insertions(+), 45 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 70b59c84..8714e21b 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -2165,22 +2165,8 @@ def parser_31d9(payload: str, msg: Message) -> dict[str, Any]: # ventilation state (extended), HVAC def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: # see: https://github.com/python/typing/issues/1445 - if ( - msg.len == 30 and msg.src.type == "37" and payload[30:38] == "BE09001F" - ): # ClimaRad VenturaV1x 2021 - return { - **parse_co2_level(payload[6:10]), # 1298[2:6] - "_unknown_1": payload[10:12], # 0x00|08|3E|52|7F|9A|AF|D3 = ? - **parse_outdoor_temp(payload[14:18]), - **parse_supply_temp(payload[18:22]), - **parse_indoor_temp(payload[22:26]), - **parse_exhaust_temp(payload[26:30]), - # static [30:38] string - "_unknown_2": payload[38:40], # 0x00|08|14 and repeated in [40:42] - } # type: ignore[return-value] - - return { - **parse_exhaust_fan_speed(payload[38:40]), + return { # type: ignore[typeddict-unknown-key] + **parse_exhaust_fan_speed(payload[38:40]), # maybe 31D9[4:6] for some? **parse_fan_info(payload[36:38]), # 22F3-ish # **parse_air_quality(payload[2:6]), # 12C8[2:6] @@ -2193,13 +2179,15 @@ def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: **parse_outdoor_temp(payload[26:30]), # 1290? **parse_capabilities(payload[30:34]), **parse_bypass_position(payload[34:36]), # 22F7-ish - **parse_supply_fan_speed(payload[40:42]), + **parse_supply_fan_speed( + payload[40:42] + ), # VenturaV1x: 0x00|08|14|28|7E repeated in [40:42] **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] **parse_post_heater(payload[46:48]), **parse_pre_heater(payload[48:50]), **parse_supply_flow(payload[50:54]), # NOTE: is supply, not exhaust **parse_exhaust_flow(payload[54:58]), # NOTE: order switched from others - } # type: ignore[return-value] + } # From an Orcon 15RF Display # 1 Software version diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index d70fbb8e..2b2a2eba 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -342,17 +342,6 @@ class _313f(TypedDict): _unknown_0: str -class _31da_v(TypedDict): # v for ClimaRad Ventura - co2_level: float | None - SZ_DEWPOINT_TEMP: float | None - _unknown_1: str | None - SZ_EXHAUST_TEMP: float | None - SZ_SUPPLY_TEMP: float | None - SZ_INDOOR_TEMP: float | None - SZ_OUTDOOR_TEMP: float | None - _unknown_2: str | None - - class _3220(TypedDict): msg_id: int # OtDataId msg_type: str # OtMsgType @@ -451,7 +440,7 @@ class PayDictT: _2E04: TypeAlias = _2e04 _3110: TypeAlias = _3110 _313F: TypeAlias = _313f - _31DA: TypeAlias = _VentilationState | _31da_v + _31DA: TypeAlias = _VentilationState _3200: TypeAlias = _Temperature _3210: TypeAlias = _Temperature _3B00: TypeAlias = _3b00 diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index ad05e3bf..e6104267 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -322,35 +322,43 @@ # .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 # airQ? | | | | | no ascii |_|___(00|08|14){2} # Deduction: | | | | |___0502-07F7 << 0-255 = speed% ? -# CO2___hexStr4 ___| | | |___055A-0813=hexStr4 -# 00|08|52|9A|D3___| |___0300-D7CA_ << 0-255 = ? +# CO2?___hexStr4 ___| | | |___055A-0813=hexStr4 +# not RH 00|08|52|9A|D3___| |___0300-D7CA_ << 0-255 = ? # | | | # temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU -# Default parser raises invalid_fan_info. New parser reports: -2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 579, '_unknown_1': '00', 'outdoor_temp': 17.67, 'supply_temp': None, 'indoor_temp': 20.73, 'exhaust_temp': 19.09, '_unknown_2': '00'} - -2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 668, '_unknown_1': '00', 'outdoor_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'exhaust_temp': 19.6, '_unknown_2': '00'} # auto -2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'co2_level': 712, '_unknown_1': '00', 'outdoor_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'exhaust_temp': 15.2, '_unknown_2': '08'} # speed 1 -2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'co2_level': 571, '_unknown_1': '00', 'outdoor_temp': 18.73, 'supply_temp': None, 'indoor_temp': 18.42, 'exhaust_temp': 13.7, '_unknown_2': '14'} # speed 2 -2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 415, '_unknown_1': '00', 'outdoor_temp': 16.58, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.7, '_unknown_2': '00'} # auto +# 12ao_v parser reports: +2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 579, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.67, 'supply_temp': None, 'indoor_temp': 20.73, 'outdoor_temp': 19.09, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} +2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 668, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'exhaust_fan_speed': 0.00} # auto +2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 712, 'supply_fan_speed': 0.0, 'outdoor_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'exhaust_fan_speed': 0.04} # speed 1 +2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 571, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.73, 'supply_temp': None, 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'exhaust_fan_speed': 0.1} # speed 2 +2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 415, 'supply_fan_speed': 0.0, 'outdoor_temp': 16.58, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'exhaust_fan_speed': 0.00} # auto, not blowing 2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # 1st button press = no changes 2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # -2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 556, '_unknown_1': '00', 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, '_unknown_2': '00'} +2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 556, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, 'exhaust_fan_speed': 0.00} # Compare 'indoor_temp': 20.55, 'exhaust_temp': 18.95 with temperatures in 12A0 at same time: # 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 # [{'hvac_idx': '00', 'indoor_humidity': 0.65, 'temperature': 19.33, 'dewpoint_temp': None}, # {'hvac_idx': '01', 'rel_humidity': None}, # {'hvac_idx': '02', 'outdoor_humidity': 0.71, 'temperature': 18.73, 'dewpoint_temp': 13.44}] # Selector string: -# My VenturaV1x: BE09001F = BE 09 00 1F = d 190 9 0 31 +# My VenturaV1x: BE09001F = BE 09 00 1F = d 190 9 0 31 (1F = Fan Info) # Another HVC: F800EF18 = F8 00 EF 18 = d 248 0 NA 24 -# Different HVC (from the neighbours): +# An unidentified HVC (picked up from the neighbours' house): 2024-10-21T00:03:43.334878 084 I --- 37:125482 --:------ 37:125482 31DA 030 00EF007FFF4BEF7FFF7FFF7FFF7FFFF800EF18C8000000EFEF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 1.0, 'fan_info': 'auto', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': 0.75, 'outdoor_humidity': None, 'exhaust_temp': None, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': None, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} # Same, Rainy: 2024-10-21T13:25:18.172659 084 I --- 37:125482 --:------ 37:125482 31DA 030 00EF007FFF41EF7FFF7FFF7FFF7FFFF800EF183C000000EFEF7FFF7FFF00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.3, 'fan_info': 'auto', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': 0.65, 'outdoor_humidity': None, 'exhaust_temp': None, 'supply_temp': None, 'indoor_temp': None, 'outdoor_temp': None, 'speed_capabilities': ['off', 'low_med_high', 'timer', 'boost', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': None, 'supply_flow': None, 'exhaust_flow': None} # D60 same moment: 2024-10-21T13:21:55.233373 094 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF06CA077307C00692A800EF0232320000EF00053502EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.33, 'exhaust_flow': 7.5} # Ventura cont. Rainy cf. D60 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82 matching temps -2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 556, '_unknown_1': '00', 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, '_unknown_2': '00'} -# Manual speed 2, same temps, noete CO2 level dropping -2024-10-21T13:49:35.331599 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E17FFF08020766BE09001F0000000000008500850000 # {'hvac_id': '00', 'co2_level': 414, '_unknown_1': '00', 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.5, 'exhaust_temp': 18.94, '_unknown_2': '00'} +2024-10-21T13:19:33.347521 060 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E57FFF07FF0763BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 414, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.65, 'supply_temp': None, 'indoor_temp': 20.47, 'exhaust_temp': 18.91, 'exhaust_fan_speed': 0.00} +2024-10-21T13:29:34.002088 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF06E17FFF07FB0764BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 415, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.43, 'exhaust_temp': 18.92, 'exhaust_fan_speed': 0.00} +# Manual speed 2, same temps, note CO2 level (CO2 sensor in room: 681 ppm = 0x02A9) so 415 is something else (HexStr2) +2024-10-21T13:49:35.331599 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E17FFF08020766BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 414, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.5, 'exhaust_temp': 18.94, 'exhaust_fan_speed': 0.00} +# 12A0 from same HRU at same moment: # 2024-10-21T13:49:35.480133 060 I --- 37:153226 --:------ 37:153226 12A0 [snip] # [{'hvac_idx': '00', 'indoor_humidity': 0.65, 'temperature': 20.5, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.78, 'temperature': 17.61, 'dewpoint_temp': 13.81}] +# Next boosting speed 5 (in 12A0): rising CO2 is clearly wrong, temp dropping indoors OK +2024-10-21T14:39:38.823617 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00028700EF076E7FFF075C0617BE09001F7E7E000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 647, 'supply_fan_speed': 0.0, 'outdoor_temp': 19.02, 'supply_temp': None, 'indoor_temp': 18.84, 'exhaust_temp': 15.59, 'exhaust_fan_speed': 0.63} +# Down to speed 3 +2024-10-21T14:59:40.122477 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023900EF07597FFF07390620BE09001F2828000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 569, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.81, 'supply_temp': None, 'indoor_temp': 18.49, 'exhaust_temp': 15.68, 'exhaust_fan_speed': 0.2} +# Back to Auto, 1h later +2024-10-21T16:19:45.476345 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001BD00EF06FD7FFF07CA0743BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 445, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.89, 'supply_temp': None, 'indoor_temp': 19.94, 'exhaust_temp': 18.59, 'exhaust_fan_speed': 0.0} +# speed is correct, exhaust_temp rises to room temp when no fresh air passing, actual outdoor_temp is now in fact 15.3C (independent sensor), room_temp = 20.2C (independent sensor, see 12A0) From 86ceaa59234285549b2ba3f5e53ef44175ed3d2f Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 21 Oct 2024 21:44:55 +0200 Subject: [PATCH 6/7] update test parsing results --- tests/tests/parsers/code_31da.log | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index e6104267..75226633 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -328,13 +328,13 @@ # temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU # 12ao_v parser reports: 2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 579, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.67, 'supply_temp': None, 'indoor_temp': 20.73, 'outdoor_temp': 19.09, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} -2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 668, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'exhaust_temp': 19.6, 'exhaust_fan_speed': 0.00} # auto -2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 712, 'supply_fan_speed': 0.0, 'outdoor_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'exhaust_temp': 15.2, 'exhaust_fan_speed': 0.04} # speed 1 -2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 571, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.73, 'supply_temp': None, 'indoor_temp': 18.42, 'exhaust_temp': 13.7, 'exhaust_fan_speed': 0.1} # speed 2 -2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 415, 'supply_fan_speed': 0.0, 'outdoor_temp': 16.58, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.7, 'exhaust_fan_speed': 0.00} # auto, not blowing +2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 668, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'outdoor_temp': 19.6, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # auto +2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.04, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 712, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'outdoor_temp': 15.2, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.04, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # speed 1 +2024-10-18T00:03:42.690883 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023B00EF07517FFF0732055ABE09001F1414000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.1, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 571, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 18.73, 'supply_temp': None, 'indoor_temp': 18.42, 'outdoor_temp': 13.7, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.1, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # speed 2 +2024-10-18T00:03:42.690884 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF067A7FFF0807074EBE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 415, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 16.58, 'supply_temp': None, 'indoor_temp': 20.55, 'outdoor_temp': 18.7, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # auto, not blowing 2024-10-18T00:03:42.690885 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF000195F7EF06217FFF08460773BE09001F0000000000008500850000 # 1st button press = no changes 2024-10-18T00:03:42.690886 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001AB3EEF05727FFF07BC06EABE09001F0000000000008500850000 # -2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 556, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'exhaust_temp': 18.95, 'exhaust_fan_speed': 0.00} +2024-10-18T01:13:47.239622 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00022C00EF06D67FFF08070767BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 556, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.5, 'supply_temp': None, 'indoor_temp': 20.55, 'outdoor_temp': 18.95, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # Compare 'indoor_temp': 20.55, 'exhaust_temp': 18.95 with temperatures in 12A0 at same time: # 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 # [{'hvac_idx': '00', 'indoor_humidity': 0.65, 'temperature': 19.33, 'dewpoint_temp': None}, @@ -350,15 +350,15 @@ # D60 same moment: 2024-10-21T13:21:55.233373 094 I --- 32:022222 --:------ 32:022222 31DA 030 00EF007FFFEFEF06CA077307C00692A800EF0232320000EF00053502EE00 # {'hvac_id': '00', 'exhaust_fan_speed': 0.25, 'fan_info': 'speed 2, medium', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': None, 'indoor_humidity': None, 'outdoor_humidity': None, 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82, 'speed_capabilities': ['off', 'timer', 'auto'], 'bypass_position': None, 'supply_fan_speed': 0.25, 'remaining_mins': 0, 'post_heat': None, 'pre_heat': 0.0, 'supply_flow': 13.33, 'exhaust_flow': 7.5} # Ventura cont. Rainy cf. D60 'exhaust_temp': 17.38, 'supply_temp': 19.07, 'indoor_temp': 19.84, 'outdoor_temp': 16.82 matching temps -2024-10-21T13:19:33.347521 060 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E57FFF07FF0763BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 414, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.65, 'supply_temp': None, 'indoor_temp': 20.47, 'exhaust_temp': 18.91, 'exhaust_fan_speed': 0.00} -2024-10-21T13:29:34.002088 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF06E17FFF07FB0764BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 415, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.43, 'exhaust_temp': 18.92, 'exhaust_fan_speed': 0.00} +2024-10-21T13:19:33.347521 060 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E57FFF07FF0763BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 414, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.65, 'supply_temp': None, 'indoor_temp': 20.47, 'outdoor_temp': 18.91, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} +2024-10-21T13:29:34.002088 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019F00EF06E17FFF07FB0764BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 415, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.43, 'outdoor_temp': 18.92, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # Manual speed 2, same temps, note CO2 level (CO2 sensor in room: 681 ppm = 0x02A9) so 415 is something else (HexStr2) -2024-10-21T13:49:35.331599 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E17FFF08020766BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 414, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.5, 'exhaust_temp': 18.94, 'exhaust_fan_speed': 0.00} +2024-10-21T13:49:35.331599 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00019E00EF06E17FFF08020766BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 414, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.61, 'supply_temp': None, 'indoor_temp': 20.5, 'outdoor_temp': 18.94, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # 12A0 from same HRU at same moment: # 2024-10-21T13:49:35.480133 060 I --- 37:153226 --:------ 37:153226 12A0 [snip] # [{'hvac_idx': '00', 'indoor_humidity': 0.65, 'temperature': 20.5, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.78, 'temperature': 17.61, 'dewpoint_temp': 13.81}] # Next boosting speed 5 (in 12A0): rising CO2 is clearly wrong, temp dropping indoors OK -2024-10-21T14:39:38.823617 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00028700EF076E7FFF075C0617BE09001F7E7E000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 647, 'supply_fan_speed': 0.0, 'outdoor_temp': 19.02, 'supply_temp': None, 'indoor_temp': 18.84, 'exhaust_temp': 15.59, 'exhaust_fan_speed': 0.63} +2024-10-21T14:39:38.823617 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00028700EF076E7FFF075C0617BE09001F7E7E000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.63, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 647, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 19.02, 'supply_temp': None, 'indoor_temp': 18.84, 'outdoor_temp': 15.59, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.63, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # Down to speed 3 -2024-10-21T14:59:40.122477 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023900EF07597FFF07390620BE09001F2828000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 569, 'supply_fan_speed': 0.0, 'outdoor_temp': 18.81, 'supply_temp': None, 'indoor_temp': 18.49, 'exhaust_temp': 15.68, 'exhaust_fan_speed': 0.2} +2024-10-21T14:59:40.122477 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00023900EF07597FFF07390620BE09001F2828000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.2, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 569, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 18.81, 'supply_temp': None, 'indoor_temp': 18.49, 'outdoor_temp': 15.68, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.2, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # Back to Auto, 1h later -2024-10-21T16:19:45.476345 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001BD00EF06FD7FFF07CA0743BE09001F0000000000008500850000 # {'hvac_id': '00', 'air_quality': None, 'co2_level': 445, 'supply_fan_speed': 0.0, 'outdoor_temp': 17.89, 'supply_temp': None, 'indoor_temp': 19.94, 'exhaust_temp': 18.59, 'exhaust_fan_speed': 0.0} +2024-10-21T16:19:45.476345 061 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0001BD00EF06FD7FFF07CA0743BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 445, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.89, 'supply_temp': None, 'indoor_temp': 19.94, 'outdoor_temp': 18.59, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # speed is correct, exhaust_temp rises to room temp when no fresh air passing, actual outdoor_temp is now in fact 15.3C (independent sensor), room_temp = 20.2C (independent sensor, see 12A0) From 957602bee13489dec02fdff9f3996ca78fcadd04 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 28 Oct 2024 20:21:46 +0100 Subject: [PATCH 7/7] move comments to log --- src/ramses_tx/parsers.py | 4 +--- tests/tests/parsers/code_31da.log | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index bffcbc27..ce78cae5 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -2170,9 +2170,7 @@ def parser_31da(payload: str, msg: Message) -> PayDictT._31DA: **parse_outdoor_temp(payload[26:30]), # 1290? **parse_capabilities(payload[30:34]), **parse_bypass_position(payload[34:36]), # 22F7-ish - **parse_supply_fan_speed( - payload[40:42] - ), # VenturaV1x: 0x00|08|14|28|7E repeated in [40:42] + **parse_supply_fan_speed(payload[40:42]), **parse_remaining_mins(payload[42:46]), # mins, ~22F3[2:6] **parse_post_heater(payload[46:48]), **parse_pre_heater(payload[48:50]), diff --git a/tests/tests/parsers/code_31da.log b/tests/tests/parsers/code_31da.log index 75226633..74c1d1fa 100644 --- a/tests/tests/parsers/code_31da.log +++ b/tests/tests/parsers/code_31da.log @@ -320,13 +320,13 @@ # .I + 31DA 030 00 EF 00 019F 00 EF 067A 7FFF 0807 074E BE09001F 0000 000000008500850000 (auto) # .I + 31DA 030 00 EF 00 0195 F7 EF 0621 7FFF 0846 0773 BE09001F 0000 000000008500850000 (wake up button press, no changes) # .I + 31DA 030 00 EF 00 01AB 3E EF 0572 7FFF 07BC 06EA BE09001F 0000 000000008500850000 -# airQ? | | | | | no ascii |_|___(00|08|14){2} +# airQ? | | | | | no ascii |_|___0x00|08|14|28|7E repeated in [40:42] # Deduction: | | | | |___0502-07F7 << 0-255 = speed% ? # CO2?___hexStr4 ___| | | |___055A-0813=hexStr4 # not RH 00|08|52|9A|D3___| |___0300-D7CA_ << 0-255 = ? # | | | # temp2 temp3 temp4 -- assigned based on value lo>hi for a HRU -# 12ao_v parser reports: +# 12A0 reports: 2024-10-18T00:03:42.690880 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00024300EF06E77FFF08190775BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 579, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 17.67, 'supply_temp': None, 'indoor_temp': 20.73, 'outdoor_temp': 19.09, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} 2024-10-18T00:03:42.690881 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF00029C00EF070D7FFF083307A8BE09001F0000000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.0, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 668, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 18.05, 'supply_temp': None, 'indoor_temp': 20.99, 'outdoor_temp': 19.6, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.0, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # auto 2024-10-18T00:03:42.690882 065 I --- 37:153226 --:------ 37:153226 31DA 030 00EF0002C800EF07AA7FFF07CB05F0BE09001F0808000000008500850000 # {'hvac_id': '00', 'exhaust_fan_speed': 0.04, 'fan_info': '-unknown 0x1F-', '_unknown_fan_info_flags': [0, 0, 0], 'air_quality': None, 'co2_level': 712, 'indoor_humidity': 0.0, 'outdoor_humidity': None, 'exhaust_temp': 19.62, 'supply_temp': None, 'indoor_temp': 19.95, 'outdoor_temp': 15.2, 'speed_capabilities': ['off', 'timer', 'boost', 'auto', 'speed_4', 'speed_5', 'auto_night', 'pre_heater'], 'bypass_position': 0.0, 'supply_fan_speed': 0.04, 'remaining_mins': 0, 'post_heat': 0.0, 'pre_heat': 0.0, 'supply_flow_fault': 'unreliable', 'exhaust_flow_fault': 'unreliable'} # speed 1