From d68975d59451328ba92e5764cb7780c12af70617 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Thu, 17 Oct 2024 21:47:18 +0200 Subject: [PATCH 01/13] add 12a0 typedDict, move used classes before it --- src/ramses_tx/parsers.py | 35 +++++++++++++++++++- src/ramses_tx/typed_dicts.py | 62 ++++++++++++++++++++---------------- 2 files changed, 69 insertions(+), 28 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 571a703c..c37e4f88 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -50,6 +50,7 @@ SZ_FRAG_LENGTH, SZ_FRAG_NUMBER, SZ_FRAGMENT, + SZ_INDOOR_HUMIDITY, SZ_IS_DST, SZ_LANGUAGE, SZ_LOCAL_OVERRIDE, @@ -63,6 +64,7 @@ SZ_OEM_CODE, SZ_OFFER, SZ_OPENWINDOW_FUNCTION, + SZ_OUTDOOR_TEMP, SZ_PAYLOAD, SZ_PERCENTAGE, SZ_PHASE, @@ -1137,7 +1139,38 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: # HVAC: indoor_humidity def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: - return parse_indoor_humidity(payload[2:]) + result: PayDictT._12A0 = {SZ_INDOOR_HUMIDITY: None} + if len(payload) == 42: + # TODO EBR fix typed check error by overriding indoor_humidity in typed_dicts + # for ClimaRad VenturaV1x: + # . I + 12A0 021 00 29 081D 7FFF 0001EF7FFF7FFF000241 0505 0294 00 + # . I + 12A0 021 00 3B 064B 7FFF 0001EF7FFF7FFF00023F 0657 03A6 00 + # normal: _parse_hvac_humidity(SZ_INDOOR_HUMIDITY, value[:2], value[2:6], value[6:10]) + assert ( + payload[8:12] == "7FFF" + ), _INFORM_DEV_MSG # V1x: 'dewpoint_temp' sent in 31DA + assert payload[12:14] == "00", _INFORM_DEV_MSG # _parse_fan_heater ? or flags ? + assert payload[14:16] == "01", _INFORM_DEV_MSG # parse_fan_info ? + assert payload[16:18] == "EF", _INFORM_DEV_MSG # parse_bypass_position ? + assert payload[18:22] == "7FFF", _INFORM_DEV_MSG + assert payload[22:26] == "7FFF", _INFORM_DEV_MSG + assert payload[26:28] == "00", _INFORM_DEV_MSG + assert payload[40:42] == "00", _INFORM_DEV_MSG + result = { + **parse_indoor_humidity(payload[2:12]), + "units": {"00": "Fahrenheit", "01": "Celsius"}[payload[14:16]], # type: ignore[typeddict-item] + # only 0x01 (decimal/Celsius?) seen on Ventura + **parse_co2_level(payload[28:32]), + **parse_supply_temp(payload[32:36]), # type: ignore[typeddict-item] + SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), + } + # TODO confirm complete message + else: + result = { + **parse_indoor_humidity(payload[2:]), # type: ignore[typeddict-item] + } + # .I --- 29:099029 --:------ 29:099029 12A0 002 0042 from a ClimaRad MiniBox FAN (0x42 = 66% = 0.6) + return result # window_state (of a device/zone) diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index b24a158f..68b9ab43 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -118,6 +118,40 @@ class _1100_IDX(TypedDict): domain_id: str +class IndoorHumidity(TypedDict): + indoor_humidity: _HexToTempT + temperature: NotRequired[float | None] + dewpoint_temp: NotRequired[float | None] + + +class Co2Level(TypedDict): + co2_level: float | None + + +class SupplyTemp(TypedDict): + supply_temp: _HexToTempT + + +class ExhaustTemp(TypedDict): + exhaust_temp: _HexToTempT + + +class IndoorTemp(TypedDict): + indoor_temp: _HexToTempT + + +class OutdoorTemp(TypedDict): + outdoor_temp: _HexToTempT + + +class _12a0(IndoorHumidity, total=False): + # only add what is not in IndoorHumidity + units: Literal["Fahrenheit", "Celsius"] + SZ_CO2_LEVEL: Co2Level # Co2Level + SZ_SUPPLY_TEMP: SupplyTemp # SupplyTemp + SZ_OUTDOOR_TEMP: OutdoorTemp # OutdoorTemp + + class _12b0(TypedDict): window_open: bool | None @@ -298,38 +332,12 @@ class AirQuality(TypedDict): air_quality_basis: NotRequired[str] -class Co2Level(TypedDict): - co2_level: float | None - - -class IndoorHumidity(TypedDict): - indoor_humidity: _HexToTempT - temperature: NotRequired[float | None] - dewpoint_temp: NotRequired[float | None] - - class OutdoorHumidity(TypedDict): outdoor_humidity: _HexToTempT temperature: NotRequired[float | None] dewpoint_temp: NotRequired[float | None] -class ExhaustTemp(TypedDict): - exhaust_temp: _HexToTempT - - -class SupplyTemp(TypedDict): - supply_temp: _HexToTempT - - -class IndoorTemp(TypedDict): - indoor_temp: _HexToTempT - - -class OutdoorTemp(TypedDict): - outdoor_temp: _HexToTempT - - class Capabilities(TypedDict): speed_capabilities: list[str] | None @@ -420,7 +428,7 @@ class PayDictT: _1280: TypeAlias = OutdoorHumidity _1290: TypeAlias = OutdoorTemp _1298: TypeAlias = Co2Level - _12A0: TypeAlias = IndoorHumidity + _12A0: TypeAlias = _12a0 _12B0: TypeAlias = _12b0 _12C0: TypeAlias = _12c0 _12C8: TypeAlias = AirQuality From 2b8b4b51fa29aae9436de6ab6a9674f988a56a6f Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Thu, 17 Oct 2024 22:11:12 +0200 Subject: [PATCH 02/13] clean-up and Ventura packet logs --- src/ramses_tx/parsers.py | 9 ++------- src/ramses_tx/ramses.py | 5 +++-- tests/tests/fingerprints/hvac/37_VMD-07RPS13.log | 1 + tests/tests/parsers/code_12a0.log | 4 ++++ 4 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 tests/tests/fingerprints/hvac/37_VMD-07RPS13.log diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index c37e4f88..08b6b339 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1141,11 +1141,7 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: result: PayDictT._12A0 = {SZ_INDOOR_HUMIDITY: None} if len(payload) == 42: - # TODO EBR fix typed check error by overriding indoor_humidity in typed_dicts - # for ClimaRad VenturaV1x: - # . I + 12A0 021 00 29 081D 7FFF 0001EF7FFF7FFF000241 0505 0294 00 - # . I + 12A0 021 00 3B 064B 7FFF 0001EF7FFF7FFF00023F 0657 03A6 00 - # normal: _parse_hvac_humidity(SZ_INDOOR_HUMIDITY, value[:2], value[2:6], value[6:10]) + # for ClimaRad VenturaV1x assert ( payload[8:12] == "7FFF" ), _INFORM_DEV_MSG # V1x: 'dewpoint_temp' sent in 31DA @@ -1164,12 +1160,11 @@ def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: **parse_supply_temp(payload[32:36]), # type: ignore[typeddict-item] SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), } - # TODO confirm complete message else: + # normal: _parse_hvac_humidity(SZ_INDOOR_HUMIDITY, value[:2], value[2:6], value[6:10]) result = { **parse_indoor_humidity(payload[2:]), # type: ignore[typeddict-item] } - # .I --- 29:099029 --:------ 29:099029 12A0 002 0042 from a ClimaRad MiniBox FAN (0x42 = 66% = 0.6) return result diff --git a/src/ramses_tx/ramses.py b/src/ramses_tx/ramses.py index 26fa47ab..86a3f3b5 100644 --- a/src/ramses_tx/ramses.py +++ b/src/ramses_tx/ramses.py @@ -274,12 +274,13 @@ SZ_NAME: "co2_level", I_: r"^00[0-9A-F]{4}$", }, - Code._12A0: { # indoor_humidity + Code._12A0: { # indoor_humidity (optional hvac) # .I --- 32:168090 --:------ 32:168090 12A0 006 0030093504A8 # .I --- 32:132125 --:------ 32:132125 12A0 007 003107B67FFF00 # only dev_id with 007 + # .I --- 37:153226 --:------ 37:153226 12A0 021 003108127FFF00 01EF7FFF7FFF0002 420615 03AC 00 # ClimaRad VenturaV1x # RP --- 20:008749 18:142609 --:------ 12A0 002 00EF SZ_NAME: "indoor_humidity", - I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?$", + I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?((01EF7FFF7FFF0002)[0-9A-F]{10}(00))?$", RP: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?$", SZ_LIFESPAN: td(hours=1), }, diff --git a/tests/tests/fingerprints/hvac/37_VMD-07RPS13.log b/tests/tests/fingerprints/hvac/37_VMD-07RPS13.log new file mode 100644 index 00000000..80c20447 --- /dev/null +++ b/tests/tests/fingerprints/hvac/37_VMD-07RPS13.log @@ -0,0 +1 @@ +2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, 'units': 'Celsius', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index f8d9c428..70397f31 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -7,3 +7,7 @@ 2022-08-17T02:29:36.718767 056 I --- 32:155617 --:------ 32:155617 12A0 007 003C096E7FFF00 # {'indoor_humidity': 0.60, 'temperature': 24.14, 'dewpoint_temp': None} 2019-12-16T05:19:20.630177 072 I --- 32:168090 --:------ 32:168090 12A0 006 003C06DE03E3 # {'indoor_humidity': 0.60, 'temperature': 17.58, 'dewpoint_temp': 9.95} + +# ClimaRad VenturaV1x +2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, 'units': 'Celsius', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} +2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # {'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None, 'units': 'Celsius', 'co2_level': 575, 'supply_temp': 14.03, 'outdoor_temp': 7.22} From 4a70578a0638406f54057ad48dc5b5d3a70d0c80 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Thu, 17 Oct 2024 22:17:34 +0200 Subject: [PATCH 03/13] fingerprints --- tests/tests/fingerprints/hvac/29_VMC-07RP01.log | 2 ++ tests/tests/parsers/code_12a0.log | 1 + 2 files changed, 3 insertions(+) create mode 100644 tests/tests/fingerprints/hvac/29_VMC-07RP01.log diff --git a/tests/tests/fingerprints/hvac/29_VMC-07RP01.log b/tests/tests/fingerprints/hvac/29_VMC-07RP01.log new file mode 100644 index 00000000..4b9c2162 --- /dev/null +++ b/tests/tests/fingerprints/hvac/29_VMC-07RP01.log @@ -0,0 +1,2 @@ +# ClimaRad MiniBox FAN +2024-10-15T12:41:34.415872 075 I --- 29:099029 --:------ 29:099029 12A0 002 0031 # {'indoor_humidity': 0.49} diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 70397f31..839a2e48 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -1,5 +1,6 @@ 2021-02-12T20:59:47.225210 066 RP --- 20:008749 18:142609 --:------ 12A0 002 00EF # {'indoor_humidity': None} +2024-10-15T12:41:34.415872 075 I --- 29:099029 --:------ 29:099029 12A0 002 0031 # {'indoor_humidity': 0.49} 2022-03-08T11:24:21.138647 076 I --- 29:146052 --:------ 29:146052 12A0 006 00220685004C # {'indoor_humidity': 0.34, 'temperature': 16.69, 'dewpoint_temp': 0.76} From 34960b09d94bcd68975ef310237271885984157d Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 09:45:35 +0200 Subject: [PATCH 04/13] remove notes Co-authored-by: David Bonnes --- src/ramses_tx/typed_dicts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index 68b9ab43..45844bb2 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -147,9 +147,9 @@ class OutdoorTemp(TypedDict): class _12a0(IndoorHumidity, total=False): # only add what is not in IndoorHumidity units: Literal["Fahrenheit", "Celsius"] - SZ_CO2_LEVEL: Co2Level # Co2Level - SZ_SUPPLY_TEMP: SupplyTemp # SupplyTemp - SZ_OUTDOOR_TEMP: OutdoorTemp # OutdoorTemp + SZ_CO2_LEVEL: Co2Level + SZ_SUPPLY_TEMP: SupplyTemp + SZ_OUTDOOR_TEMP: OutdoorTemp class _12b0(TypedDict): From 3264a40a0a3c4a4a05d0e1f76c27f83a21ddab57 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 09:48:21 +0200 Subject: [PATCH 05/13] split result Co-authored-by: David Bonnes --- src/ramses_tx/parsers.py | 48 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index a82aae1d..f39f75d5 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1132,33 +1132,27 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: # HVAC: indoor_humidity def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: - result: PayDictT._12A0 = {SZ_INDOOR_HUMIDITY: None} - if len(payload) == 42: - # for ClimaRad VenturaV1x - assert ( - payload[8:12] == "7FFF" - ), _INFORM_DEV_MSG # V1x: 'dewpoint_temp' sent in 31DA - assert payload[12:14] == "00", _INFORM_DEV_MSG # _parse_fan_heater ? or flags ? - assert payload[14:16] == "01", _INFORM_DEV_MSG # parse_fan_info ? - assert payload[16:18] == "EF", _INFORM_DEV_MSG # parse_bypass_position ? - assert payload[18:22] == "7FFF", _INFORM_DEV_MSG - assert payload[22:26] == "7FFF", _INFORM_DEV_MSG - assert payload[26:28] == "00", _INFORM_DEV_MSG - assert payload[40:42] == "00", _INFORM_DEV_MSG - result = { - **parse_indoor_humidity(payload[2:12]), - "units": {"00": "Fahrenheit", "01": "Celsius"}[payload[14:16]], # type: ignore[typeddict-item] - # only 0x01 (decimal/Celsius?) seen on Ventura - **parse_co2_level(payload[28:32]), - **parse_supply_temp(payload[32:36]), # type: ignore[typeddict-item] - SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), - } - else: - # normal: _parse_hvac_humidity(SZ_INDOOR_HUMIDITY, value[:2], value[2:6], value[6:10]) - result = { - **parse_indoor_humidity(payload[2:]), # type: ignore[typeddict-item] - } - return result + if len(payload) <= 14: + assert payload[12:14] == "00", _INFORM_DEV_MSG + return parse_indoor_humidity(payload[2:12]) # type: ignore[return-value] + + # if len(payload) == 42: # for ClimaRad VenturaV1x + assert payload[8:12] == "7FFF", _INFORM_DEV_MSG + assert payload[12:14] == "00", _INFORM_DEV_MSG # parse_fan_heater or flags? + assert payload[14:16] == "01", _INFORM_DEV_MSG # parse_fan_info? + assert payload[16:18] == "EF", _INFORM_DEV_MSG # parse_bypass_position? + assert payload[18:22] == "7FFF", _INFORM_DEV_MSG + assert payload[22:26] == "7FFF", _INFORM_DEV_MSG + assert payload[26:28] == "00", _INFORM_DEV_MSG + assert payload[40:] == "00", _INFORM_DEV_MSG + + return { + **parse_indoor_humidity(payload[2:12]), + "units": {"00": "Fahrenheit", "01": "Celsius"}[payload[14:16]], # type: ignore[typeddict-item] + **parse_co2_level(payload[28:32]), + **parse_supply_temp(payload[32:36]), # type: ignore[typeddict-item] + SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), + } # window_state (of a device/zone) From 7f6f5379e7892936de15b2477eb3cb4d0e6e9d0b Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 15:31:09 +0200 Subject: [PATCH 06/13] simplify regex, remove assert --- src/ramses_tx/parsers.py | 2 -- src/ramses_tx/ramses.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index e8758cb2..8e466456 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -50,7 +50,6 @@ SZ_FRAG_LENGTH, SZ_FRAG_NUMBER, SZ_FRAGMENT, - SZ_INDOOR_HUMIDITY, SZ_IS_DST, SZ_LANGUAGE, SZ_LOCAL_OVERRIDE, @@ -1133,7 +1132,6 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: # HVAC: indoor_humidity def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: if len(payload) <= 14: - assert payload[12:14] == "00", _INFORM_DEV_MSG return parse_indoor_humidity(payload[2:12]) # type: ignore[return-value] # if len(payload) == 42: # for ClimaRad VenturaV1x diff --git a/src/ramses_tx/ramses.py b/src/ramses_tx/ramses.py index 9cd04046..c93df365 100644 --- a/src/ramses_tx/ramses.py +++ b/src/ramses_tx/ramses.py @@ -275,13 +275,13 @@ I_: r"^00[0-9A-F]{4}$", RQ: r"^00$", }, - Code._12A0: { # indoor_humidity (optional hvac) + Code._12A0: { # indoor_humidity # .I --- 32:168090 --:------ 32:168090 12A0 006 0030093504A8 # .I --- 32:132125 --:------ 32:132125 12A0 007 003107B67FFF00 # only dev_id with 007 # .I --- 37:153226 --:------ 37:153226 12A0 021 003108127FFF00 01EF7FFF7FFF0002 420615 03AC 00 # ClimaRad VenturaV1x # RP --- 20:008749 18:142609 --:------ 12A0 002 00EF SZ_NAME: "indoor_humidity", - I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?((01EF7FFF7FFF0002)[0-9A-F]{10}(00))?$", + I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?([0-9A-F]{26}(00))?$", RP: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?$", SZ_LIFESPAN: td(hours=1), }, From e979a236f4dfcffbd6d43bc5f2690f2524264e75 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 16:38:40 +0200 Subject: [PATCH 07/13] split _12a0 types, tag unknown0 --- src/ramses_tx/parsers.py | 8 ++++---- src/ramses_tx/typed_dicts.py | 6 +++--- tests/tests/parsers/code_12a0.log | 11 +++++++++-- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 8e466456..5d7e7f33 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1132,7 +1132,7 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: # HVAC: indoor_humidity def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: if len(payload) <= 14: - return parse_indoor_humidity(payload[2:12]) # type: ignore[return-value] + return parse_indoor_humidity(payload[2:12]) # if len(payload) == 42: # for ClimaRad VenturaV1x assert payload[8:12] == "7FFF", _INFORM_DEV_MSG @@ -1146,11 +1146,11 @@ def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: return { **parse_indoor_humidity(payload[2:12]), - "units": {"00": "Fahrenheit", "01": "Celsius"}[payload[14:16]], # type: ignore[typeddict-item] + "_unknown_0": payload[14:16], # perhaps C/F or bypass state **parse_co2_level(payload[28:32]), - **parse_supply_temp(payload[32:36]), # type: ignore[typeddict-item] + **parse_supply_temp(payload[32:36]), SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), - } + } # type: ignore[return-value] # window_state (of a device/zone) diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index e15fec87..5b6eabc0 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -144,9 +144,9 @@ class OutdoorTemp(TypedDict): outdoor_temp: _HexToTempT -class _12a0(IndoorHumidity, total=False): +class _12a0_x(IndoorHumidity): # only add what is not in IndoorHumidity - units: Literal["Fahrenheit", "Celsius"] + _unknown_0: str SZ_CO2_LEVEL: Co2Level SZ_SUPPLY_TEMP: SupplyTemp SZ_OUTDOOR_TEMP: OutdoorTemp @@ -417,7 +417,7 @@ class PayDictT: _1280: TypeAlias = OutdoorHumidity _1290: TypeAlias = OutdoorTemp _1298: TypeAlias = Co2Level - _12A0: TypeAlias = _12a0 + _12A0: TypeAlias = _12a0_x | IndoorHumidity _12B0: TypeAlias = _12b0 _12C0: TypeAlias = _12c0 _12C8: TypeAlias = AirQuality diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 839a2e48..1941bbdc 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -10,5 +10,12 @@ 2019-12-16T05:19:20.630177 072 I --- 32:168090 --:------ 32:168090 12A0 006 003C06DE03E3 # {'indoor_humidity': 0.60, 'temperature': 17.58, 'dewpoint_temp': 9.95} # ClimaRad VenturaV1x -2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, 'units': 'Celsius', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} -2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # {'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None, 'units': 'Celsius', 'co2_level': 575, 'supply_temp': 14.03, 'outdoor_temp': 7.22} +2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} +2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # {'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 575, 'supply_temp': 14.03, 'outdoor_temp': 7.22} +2024-10-15T12:48:22.825444 060 I --- 37:153226 --:------ 37:153226 12A0 021 003107E47FFF0001EF7FFF7FFF00023E05A802D900 # {'indoor_humidity': 0.49, 'temperature': 20.2, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 14.48, 'outdoor_temp': 7.29} +2024-10-15T13:25:35.121534 062 I --- 37:153226 --:------ 37:153226 12A0 021 0034080C7FFF0001EF7FFF7FFF00023B05C002AF00 # {'indoor_humidity': 0.52, 'temperature': 20.6, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 571, 'supply_temp': 14.72, 'outdoor_temp': 6.87} +2024-10-15T15:59:04.943042 061 I --- 37:153226 --:------ 37:153226 12A0 021 0033088F7FFF0001EF7FFF7FFF000237065C02D900 # {'indoor_humidity': 0.51, 'temperature': 21.91, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 567, 'supply_temp': 16.28, 'outdoor_temp': 7.29} +2024-10-15T23:50:36.119335 074 I --- 37:153226 --:------ 37:153226 12A0 021 002B08137FFF0001EF7FFF7FFF00023D05A102CE00 # {'indoor_humidity': 0.43, 'temperature': 20.67, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 573, 'supply_temp': 14.41, 'outdoor_temp': 7.18} +2024-10-18T13:40:19.208645 067 I --- 37:153226 --:------ 37:153226 12A0 021 0042081D7FFF0001EF7FFF7FFF00024D079205FF00 # {'indoor_humidity': 0.66, 'temperature': 20.77, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 589, 'supply_temp': 19.38, 'outdoor_temp': 15.35} +2024-10-18T15:45:27.762626 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408327FFF0001EF7FFF7FFF00024707EF05DE00 # {'indoor_humidity': 0.68, 'temperature': 20.98, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 583, 'supply_temp': 20.31, 'outdoor_temp': 15.02} +2024-10-18T15:50:28.112562 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408377FFF0001EF7FFF7FFF00024707F705E000 # {'indoor_humidity': 0.68, 'temperature': 21.03, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 583, 'supply_temp': 20.39, 'outdoor_temp': 15.04} From ccdcdd1e4edd4aa84d32766788e943ce7bcdba78 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 15:08:29 +0200 Subject: [PATCH 08/13] remove asserts --- src/ramses_tx/parsers.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 3e888538..b885fe1e 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1134,16 +1134,6 @@ def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: if len(payload) <= 14: return parse_indoor_humidity(payload[2:12]) - # if len(payload) == 42: # for ClimaRad VenturaV1x - assert payload[8:12] == "7FFF", _INFORM_DEV_MSG - assert payload[12:14] == "00", _INFORM_DEV_MSG # parse_fan_heater or flags? - assert payload[14:16] == "01", _INFORM_DEV_MSG # parse_fan_info? - assert payload[16:18] == "EF", _INFORM_DEV_MSG # parse_bypass_position? - assert payload[18:22] == "7FFF", _INFORM_DEV_MSG - assert payload[22:26] == "7FFF", _INFORM_DEV_MSG - assert payload[26:28] == "00", _INFORM_DEV_MSG - assert payload[40:] == "00", _INFORM_DEV_MSG - return { **parse_indoor_humidity(payload[2:12]), "_unknown_0": payload[14:16], # perhaps C/F or bypass state From 8694343e2bafdd9af6aa1cf70b4c1d7c1f14212f Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 15:09:32 +0200 Subject: [PATCH 09/13] hum parse suggestion Co-authored-by: David Bonnes --- src/ramses_tx/parsers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 3e888538..7455d704 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1144,13 +1144,13 @@ def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: assert payload[26:28] == "00", _INFORM_DEV_MSG assert payload[40:] == "00", _INFORM_DEV_MSG - return { - **parse_indoor_humidity(payload[2:12]), - "_unknown_0": payload[14:16], # perhaps C/F or bypass state - **parse_co2_level(payload[28:32]), - **parse_supply_temp(payload[32:36]), - SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), - } # type: ignore[return-value] + return [ + { + "hvac_idx": payload[i : i + 2], + **parse_indoor_humidity(payload[i + 2 : i + 12]), + } + for i in range(0, len(payload), 14) + ] # window_state (of a device/zone) From d2c762ef3a3a01d9c5525415b91fd68093f9d8a5 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 15:48:23 +0200 Subject: [PATCH 10/13] 12A0 dict easy --- src/ramses_tx/ramses.py | 6 +----- src/ramses_tx/typed_dicts.py | 2 +- tests/tests/parsers/code_12a0.log | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ramses_tx/ramses.py b/src/ramses_tx/ramses.py index 8d91fdb7..f17b638c 100644 --- a/src/ramses_tx/ramses.py +++ b/src/ramses_tx/ramses.py @@ -276,12 +276,8 @@ RQ: r"^00$", }, Code._12A0: { # indoor_humidity - # .I --- 32:168090 --:------ 32:168090 12A0 006 0030093504A8 - # .I --- 32:132125 --:------ 32:132125 12A0 007 003107B67FFF00 # only dev_id with 007 - # .I --- 37:153226 --:------ 37:153226 12A0 021 003108127FFF00 01EF7FFF7FFF0002 420615 03AC 00 # ClimaRad VenturaV1x - # RP --- 20:008749 18:142609 --:------ 12A0 002 00EF SZ_NAME: "indoor_humidity", - I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?([0-9A-F]{26}(00))?$", + I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?", # ([0-9A-F]{26}(00))?$", RP: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?$", SZ_LIFESPAN: td(hours=1), }, diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index 52a66efb..8dd96d11 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -429,7 +429,7 @@ class PayDictT: _1280: TypeAlias = OutdoorHumidity _1290: TypeAlias = OutdoorTemp _1298: TypeAlias = Co2Level - _12A0: TypeAlias = _12a0_x | IndoorHumidity + _12A0: TypeAlias = IndoorHumidity | _12a0_x _12B0: TypeAlias = _12b0 _12C0: TypeAlias = _12c0 _12C8: TypeAlias = AirQuality diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 2cabc920..80cd84c4 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -11,7 +11,7 @@ # ClimaRad VenturaV1x 2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} -[{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None}, {'hvac_idx': '01', 'indoor_humidity': None}, {'hvac_idx': '02', 'indoor_humidity': 0.62, 'temperature': 13.87, 'dewpoint_temp': 6.78}] +# [{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None}, {'hvac_idx': '01', 'indoor_humidity': None}, {'hvac_idx': '02', 'indoor_humidity': 0.62, 'temperature': 13.87, 'dewpoint_temp': 6.78}] 2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # {'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 575, 'supply_temp': 14.03, 'outdoor_temp': 7.22} 2024-10-15T12:48:22.825444 060 I --- 37:153226 --:------ 37:153226 12A0 021 003107E47FFF0001EF7FFF7FFF00023E05A802D900 # {'indoor_humidity': 0.49, 'temperature': 20.2, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 14.48, 'outdoor_temp': 7.29} 2024-10-15T13:25:35.121534 062 I --- 37:153226 --:------ 37:153226 12A0 021 0034080C7FFF0001EF7FFF7FFF00023B05C002AF00 # {'indoor_humidity': 0.52, 'temperature': 20.6, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 571, 'supply_temp': 14.72, 'outdoor_temp': 6.87} From 6693c914f50b738e6b3c0c6b637d076663ef3af7 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 23:09:18 +0200 Subject: [PATCH 11/13] typed humidity list interior-rh-exterior --- src/ramses_tx/helpers.py | 15 +++++++++++++++ src/ramses_tx/parsers.py | 30 ++++++++++++------------------ src/ramses_tx/ramses.py | 4 ++-- src/ramses_tx/typed_dicts.py | 24 +++++++++++++++++------- tests/tests/parsers/code_12a0.log | 26 +++++++++++++++----------- 5 files changed, 61 insertions(+), 38 deletions(-) diff --git a/src/ramses_tx/helpers.py b/src/ramses_tx/helpers.py index 26288701..b092df29 100644 --- a/src/ramses_tx/helpers.py +++ b/src/ramses_tx/helpers.py @@ -37,6 +37,7 @@ SZ_OUTDOOR_TEMP, SZ_POST_HEAT, SZ_PRE_HEAT, + SZ_REL_HUMIDITY, SZ_REMAINING_MINS, SZ_SPEED_CAPABILITIES, SZ_SUPPLY_FAN_SPEED, @@ -537,6 +538,20 @@ def parse_co2_level(value: HexStr4) -> PayDictT.CO2_LEVEL: return {SZ_CO2_LEVEL: level} +def parse_humidity_element(value: str, index: str) -> PayDictT._12A0: + """Return the relative humidity (%) and 2 temperatures + + The result may include current temperature ('C) and include dewpoint temperature ('C). + """ + if index == "01": + return _parse_hvac_humidity(SZ_REL_HUMIDITY, value[:2], value[2:6], value[6:10]) # type: ignore[return-value] + if index == "02": + return _parse_hvac_humidity( + SZ_OUTDOOR_HUMIDITY, value[:2], value[2:6], value[6:10] + ) # type: ignore[return-value] + return _parse_hvac_humidity(SZ_INDOOR_HUMIDITY, value[:2], value[2:6], value[6:10]) # type: ignore[return-value] + + # 31DA[10:12] and 12A0[2:12] def parse_indoor_humidity(value: str) -> PayDictT.INDOOR_HUMIDITY: """Return the relative indoor humidity (%). diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 97b18fee..2a94570c 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -64,7 +64,6 @@ SZ_OEM_CODE, SZ_OFFER, SZ_OPENWINDOW_FUNCTION, - SZ_OUTDOOR_TEMP, SZ_PAYLOAD, SZ_PHASE, SZ_PRESSURE, @@ -107,6 +106,7 @@ parse_exhaust_temp, parse_fan_info, parse_fault_log_entry, + parse_humidity_element, parse_indoor_humidity, parse_indoor_temp, parse_outdoor_humidity, @@ -1129,26 +1129,20 @@ def parser_1298(payload: str, msg: Message) -> PayDictT._1298: return parse_co2_level(payload[2:6]) -# HVAC: indoor_humidity -def parser_12a0(payload: str, msg: Message) -> PayDictT._12A0: +# HVAC: indoor_humidity, array of 3 sets for HRU +def parser_12a0( + payload: str, msg: Message +) -> PayDictT.INDOOR_HUMIDITY | list[PayDictT._12A0]: if len(payload) <= 14: return parse_indoor_humidity(payload[2:12]) - # return [ - # { - # "hvac_idx": payload[i : i + 2], - # **parse_indoor_humidity(payload[i + 2 : i + 12]), - # } - # for i in range(0, len(payload), 14) - # ] - - return { - **parse_indoor_humidity(payload[2:12]), - "_unknown_0": payload[14:16], # perhaps C/F or bypass state - **parse_co2_level(payload[28:32]), - **parse_supply_temp(payload[32:36]), - SZ_OUTDOOR_TEMP: hex_to_temp(payload[36:40]), - } # type: ignore[return-value] + return [ + { + "hvac_idx": payload[i : i + 2], + **parse_humidity_element(payload[i + 2 : i + 12], payload[i : i + 2]), + } + for i in range(0, len(payload), 14) + ] # window_state (of a device/zone) diff --git a/src/ramses_tx/ramses.py b/src/ramses_tx/ramses.py index f17b638c..33f5662a 100644 --- a/src/ramses_tx/ramses.py +++ b/src/ramses_tx/ramses.py @@ -277,8 +277,8 @@ }, Code._12A0: { # indoor_humidity SZ_NAME: "indoor_humidity", - I_: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?", # ([0-9A-F]{26}(00))?$", - RP: r"^00[0-9A-F]{2}([0-9A-F]{8}(00)?)?$", + I_: r"^(0[0-9A-F]{3}([0-9A-F]{8}(00)?)?)+$", + RP: r"^0[0-9A-F]{3}([0-9A-F]{8}(00)?)?$", SZ_LIFESPAN: td(hours=1), }, Code._12B0: { # window_state (HVAC % window open) diff --git a/src/ramses_tx/typed_dicts.py b/src/ramses_tx/typed_dicts.py index 8dd96d11..0eba4290 100644 --- a/src/ramses_tx/typed_dicts.py +++ b/src/ramses_tx/typed_dicts.py @@ -67,6 +67,12 @@ class Co2Level(TypedDict): co2_level: float | None +class RelativeHumidity(TypedDict): + relative_humidity: _HexToTempT + temperature: NotRequired[float | None] + dewpoint_temp: NotRequired[float | None] + + class IndoorHumidity(TypedDict): indoor_humidity: _HexToTempT temperature: NotRequired[float | None] @@ -255,12 +261,13 @@ class _1100_IDX(TypedDict): domain_id: str -class _12a0_x(IndoorHumidity): - # only add what is not in IndoorHumidity - _unknown_0: str - SZ_CO2_LEVEL: Co2Level - SZ_SUPPLY_TEMP: SupplyTemp - SZ_OUTDOOR_TEMP: OutdoorTemp +class _12a0(TypedDict): + hvac_idx: str + indoor_humidity: NotRequired[_HexToTempT | None] + outdoor_humidity: NotRequired[_HexToTempT | None] + relative_humidity: NotRequired[_HexToTempT | None] + temperature: NotRequired[float | None] + dewpoint_temp: NotRequired[float | None] class _12b0(TypedDict): @@ -429,7 +436,7 @@ class PayDictT: _1280: TypeAlias = OutdoorHumidity _1290: TypeAlias = OutdoorTemp _1298: TypeAlias = Co2Level - _12A0: TypeAlias = IndoorHumidity | _12a0_x + _12A0: TypeAlias = _12a0 _12B0: TypeAlias = _12b0 _12C0: TypeAlias = _12c0 _12C8: TypeAlias = AirQuality @@ -461,6 +468,9 @@ class PayDictT: FAULT_LOG_ENTRY_NULL: TypeAlias = FaultLogEntryNull TEMPERATURE: TypeAlias = _Temperature + # 12A0 primitive + RELATIVE_HUMIDITY: TypeAlias = RelativeHumidity + # 31DA primitives AIR_QUALITY: TypeAlias = AirQuality CO2_LEVEL: TypeAlias = Co2Level diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 80cd84c4..4480c3ef 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -9,14 +9,18 @@ 2019-12-16T05:19:20.630177 072 I --- 32:168090 --:------ 32:168090 12A0 006 003C06DE03E3 # {'indoor_humidity': 0.60, 'temperature': 17.58, 'dewpoint_temp': 9.95} -# ClimaRad VenturaV1x -2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} -# [{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None}, {'hvac_idx': '01', 'indoor_humidity': None}, {'hvac_idx': '02', 'indoor_humidity': 0.62, 'temperature': 13.87, 'dewpoint_temp': 6.78}] -2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # {'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 575, 'supply_temp': 14.03, 'outdoor_temp': 7.22} -2024-10-15T12:48:22.825444 060 I --- 37:153226 --:------ 37:153226 12A0 021 003107E47FFF0001EF7FFF7FFF00023E05A802D900 # {'indoor_humidity': 0.49, 'temperature': 20.2, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 14.48, 'outdoor_temp': 7.29} -2024-10-15T13:25:35.121534 062 I --- 37:153226 --:------ 37:153226 12A0 021 0034080C7FFF0001EF7FFF7FFF00023B05C002AF00 # {'indoor_humidity': 0.52, 'temperature': 20.6, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 571, 'supply_temp': 14.72, 'outdoor_temp': 6.87} -2024-10-15T15:59:04.943042 061 I --- 37:153226 --:------ 37:153226 12A0 021 0033088F7FFF0001EF7FFF7FFF000237065C02D900 # {'indoor_humidity': 0.51, 'temperature': 21.91, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 567, 'supply_temp': 16.28, 'outdoor_temp': 7.29} -2024-10-15T23:50:36.119335 074 I --- 37:153226 --:------ 37:153226 12A0 021 002B08137FFF0001EF7FFF7FFF00023D05A102CE00 # {'indoor_humidity': 0.43, 'temperature': 20.67, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 573, 'supply_temp': 14.41, 'outdoor_temp': 7.18} -2024-10-18T13:40:19.208645 067 I --- 37:153226 --:------ 37:153226 12A0 021 0042081D7FFF0001EF7FFF7FFF00024D079205FF00 # {'indoor_humidity': 0.66, 'temperature': 20.77, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 589, 'supply_temp': 19.38, 'outdoor_temp': 15.35} -2024-10-18T15:45:27.762626 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408327FFF0001EF7FFF7FFF00024707EF05DE00 # {'indoor_humidity': 0.68, 'temperature': 20.98, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 583, 'supply_temp': 20.31, 'outdoor_temp': 15.02} -2024-10-18T15:50:28.112562 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408377FFF0001EF7FFF7FFF00024707F705E000 # {'indoor_humidity': 0.68, 'temperature': 21.03, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 583, 'supply_temp': 20.39, 'outdoor_temp': 15.04} +# ClimaRad VenturaV1x array of 3 Indoor_Humidity sets for HRU: Flow In (no dewpoint), Flow Out, Item_3 + +2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # [{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.62, 'temperature': 13.87, 'dewpoint_temp': 6.78}] +# demo Ventura: # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} +# TODO search for CO2 in other code +2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # [{'hvac_idx': '00', 'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.63, 'temperature': 14.03, 'dewpoint_temp': 7.22}] +2024-10-15T12:48:22.825444 060 I --- 37:153226 --:------ 37:153226 12A0 021 003107E47FFF0001EF7FFF7FFF00023E05A802D900 # [{'hvac_idx': '00', 'indoor_humidity': 0.49, 'temperature': 20.2, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.62, 'temperature': 14.48, 'dewpoint_temp': 7.29}] +2024-10-15T13:25:35.121534 062 I --- 37:153226 --:------ 37:153226 12A0 021 0034080C7FFF0001EF7FFF7FFF00023B05C002AF00 # [{'hvac_idx': '00', 'indoor_humidity': 0.52, 'temperature': 20.6, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.59, 'temperature': 14.72, 'dewpoint_temp': 6.87}] +2024-10-15T15:59:04.943042 061 I --- 37:153226 --:------ 37:153226 12A0 021 0033088F7FFF0001EF7FFF7FFF000237065C02D900 # [{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 21.91, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.55, 'temperature': 16.28, 'dewpoint_temp': 7.29}] +2024-10-15T23:50:36.119335 074 I --- 37:153226 --:------ 37:153226 12A0 021 002B08137FFF0001EF7FFF7FFF00023D05A102CE00 # [{'hvac_idx': '00', 'indoor_humidity': 0.43, 'temperature': 20.67, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.61, 'temperature': 14.41, 'dewpoint_temp': 7.18}] +2024-10-18T13:40:19.208645 067 I --- 37:153226 --:------ 37:153226 12A0 021 0042081D7FFF0001EF7FFF7FFF00024D079205FF00 # [{'hvac_idx': '00', 'indoor_humidity': 0.66, 'temperature': 20.77, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.77, 'temperature': 19.38, 'dewpoint_temp': 15.35}] +2024-10-18T15:45:27.762626 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408327FFF0001EF7FFF7FFF00024707EF05DE00 # [{'hvac_idx': '00', 'indoor_humidity': 0.68, 'temperature': 20.98, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.71, 'temperature': 20.31, 'dewpoint_temp': 15.02}] +2024-10-18T15:50:28.112562 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408377FFF0001EF7FFF7FFF00024707F705E000 # [{'hvac_idx': '00', 'indoor_humidity': 0.68, 'temperature': 21.03, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.71, 'temperature': 20.39, 'dewpoint_temp': 15.04}] +2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 # [{'hvac_idx': '00', 'indoor_humidity': 0.63, 'temperature': 20.55, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.78, 'temperature': 17.5, 'dewpoint_temp': 13.73}] +2024-10-20T15:01:12.576913 072 I --- 37:153226 --:------ 37:153226 12A0 021 0041078D7FFF0001EF7FFF7FFF0002470751054000 # [{'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}] From 2efcf16a02810dfd6ded6613aeb56f47270448c2 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Sun, 20 Oct 2024 23:11:08 +0200 Subject: [PATCH 12/13] clean up log --- tests/tests/parsers/code_12a0.log | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 4480c3ef..6c4a6e76 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -12,8 +12,6 @@ # ClimaRad VenturaV1x array of 3 Indoor_Humidity sets for HRU: Flow In (no dewpoint), Flow Out, Item_3 2024-10-15T12:33:21.828292 060 I --- 37:153226 --:------ 37:153226 12A0 021 003307DD7FFF0001EF7FFF7FFF00023E056B02A600 # [{'hvac_idx': '00', 'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.62, 'temperature': 13.87, 'dewpoint_temp': 6.78}] -# demo Ventura: # {'indoor_humidity': 0.51, 'temperature': 20.13, 'dewpoint_temp': None, '_unknown_0': '01', 'co2_level': 574, 'supply_temp': 13.87, 'outdoor_temp': 6.78} -# TODO search for CO2 in other code 2024-10-15T12:38:22.145126 060 I --- 37:153226 --:------ 37:153226 12A0 021 003207D27FFF0001EF7FFF7FFF00023F057B02D200 # [{'hvac_idx': '00', 'indoor_humidity': 0.5, 'temperature': 20.02, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.63, 'temperature': 14.03, 'dewpoint_temp': 7.22}] 2024-10-15T12:48:22.825444 060 I --- 37:153226 --:------ 37:153226 12A0 021 003107E47FFF0001EF7FFF7FFF00023E05A802D900 # [{'hvac_idx': '00', 'indoor_humidity': 0.49, 'temperature': 20.2, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.62, 'temperature': 14.48, 'dewpoint_temp': 7.29}] 2024-10-15T13:25:35.121534 062 I --- 37:153226 --:------ 37:153226 12A0 021 0034080C7FFF0001EF7FFF7FFF00023B05C002AF00 # [{'hvac_idx': '00', 'indoor_humidity': 0.52, 'temperature': 20.6, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.59, 'temperature': 14.72, 'dewpoint_temp': 6.87}] From 7472381aa0751b08bfb8eaca09373ab391d0f602 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 21 Oct 2024 14:03:23 +0200 Subject: [PATCH 13/13] new V1x packet --- tests/tests/parsers/code_12a0.log | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/tests/parsers/code_12a0.log b/tests/tests/parsers/code_12a0.log index 6c4a6e76..021f4e80 100644 --- a/tests/tests/parsers/code_12a0.log +++ b/tests/tests/parsers/code_12a0.log @@ -22,3 +22,4 @@ 2024-10-18T15:50:28.112562 067 I --- 37:153226 --:------ 37:153226 12A0 021 004408377FFF0001EF7FFF7FFF00024707F705E000 # [{'hvac_idx': '00', 'indoor_humidity': 0.68, 'temperature': 21.03, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.71, 'temperature': 20.39, 'dewpoint_temp': 15.04}] 2024-10-18T01:13:47.417683 064 I --- 37:153226 --:------ 37:153226 12A0 021 003F08077FFF0001EF7FFF7FFF00024E06D6055D00 # [{'hvac_idx': '00', 'indoor_humidity': 0.63, 'temperature': 20.55, 'dewpoint_temp': None}, {'hvac_idx': '01', 'rel_humidity': None}, {'hvac_idx': '02', 'outdoor_humidity': 0.78, 'temperature': 17.5, 'dewpoint_temp': 13.73}] 2024-10-20T15:01:12.576913 072 I --- 37:153226 --:------ 37:153226 12A0 021 0041078D7FFF0001EF7FFF7FFF0002470751054000 # [{'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}] +2024-10-21T13:49:35.480133 060 I --- 37:153226 --:------ 37:153226 12A0 021 004108027FFF0001EF7FFF7FFF00024E06E1056500 # [{'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}]