From b00b4300855acc31ab50ae6d71f29d67e7722c34 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 14 Oct 2024 21:24:05 +0200 Subject: [PATCH 1/4] 2e10 parser + logs --- src/ramses_tx/parsers.py | 20 ++++++++++++++++++-- tests/tests/parsers/code_2e10_wip.log | 4 ++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 571a703cd..3fdb547e2 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1950,9 +1950,25 @@ def parser_2e04(payload: str, msg: Message) -> PayDictT._2E04: return result # TODO: double-check the final "00" -# presence_detect, HVAC sensor +# presence_detect, HVAC sensor, or Timed boost for Vasco D60 def parser_2e10(payload: str, msg: Message) -> dict[str, Any]: - assert payload in ("0001", "000100"), _INFORM_DEV_MSG + if ( + payload == "00021E04060000" + ): # Vasco remote timed boost on, button bottom right pressed + return { + "mode": "boost", + "duration": (payload[5:6]), + "_unknown_4": payload[7:], + } + elif msg.src.type == "37": # ClimaRad VenturaV1x FAN state set to Auto + # .I --- 37:153226 --:------ 37:153226 2E10 003 000000 + # .I --- 37:153226 --:------ 37:153226 2E10 003 000100 # seen while on Manual 2** + assert payload in ("000000", "000100"), _INFORM_DEV_MSG + return { + "unknown_2": f"0x{(payload[2:4])}", + } + else: + assert payload in ("0001", "000100"), _INFORM_DEV_MSG return { "presence_detected": bool(payload[2:4]), diff --git a/tests/tests/parsers/code_2e10_wip.log b/tests/tests/parsers/code_2e10_wip.log index 67a205f42..a843dc674 100644 --- a/tests/tests/parsers/code_2e10_wip.log +++ b/tests/tests/parsers/code_2e10_wip.log @@ -8,3 +8,7 @@ 2023-11-04T17:38:34.781338 067 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} 2023-11-04T17:38:34.867259 067 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} 2023-11-04T17:38:34.942291 068 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} + +# Vasco fan +2024-10-14T19:59:07.786056 070 I --- 37:153226 --:------ 37:153226 2E10 003 000000 # ClimaRad VenturaV1x reporting, what? +2024-10-10T17:57:21.140055 068 I --- 37:153226 --:------ 37:153226 2E10 003 000100 From cc3e82399b77e91c52c738f179070ed2e597f9d1 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Wed, 16 Oct 2024 23:42:28 +0200 Subject: [PATCH 2/4] bool presence for Ventura --- src/ramses_tx/parsers.py | 13 ++++++------- tests/tests/parsers/code_2e10_wip.log | 6 +++--- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 3fdb547e2..3c08c3a2a 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1952,6 +1952,7 @@ def parser_2e04(payload: str, msg: Message) -> PayDictT._2E04: # presence_detect, HVAC sensor, or Timed boost for Vasco D60 def parser_2e10(payload: str, msg: Message) -> dict[str, Any]: + presence: str | int if ( payload == "00021E04060000" ): # Vasco remote timed boost on, button bottom right pressed @@ -1960,18 +1961,16 @@ def parser_2e10(payload: str, msg: Message) -> dict[str, Any]: "duration": (payload[5:6]), "_unknown_4": payload[7:], } - elif msg.src.type == "37": # ClimaRad VenturaV1x FAN state set to Auto - # .I --- 37:153226 --:------ 37:153226 2E10 003 000000 + elif msg.src.type == "37": # ClimaRad VenturaV1x FAN + # .I --- 37:153226 --:------ 37:153226 2E10 003 000000 # just 1 change in 24 h @ 7PM # .I --- 37:153226 --:------ 37:153226 2E10 003 000100 # seen while on Manual 2** assert payload in ("000000", "000100"), _INFORM_DEV_MSG - return { - "unknown_2": f"0x{(payload[2:4])}", - } + presence = int(payload[2:4]) else: assert payload in ("0001", "000100"), _INFORM_DEV_MSG - + presence = payload[2:4] return { - "presence_detected": bool(payload[2:4]), + "presence_detected": bool(presence), "_unknown_4": payload[4:], } diff --git a/tests/tests/parsers/code_2e10_wip.log b/tests/tests/parsers/code_2e10_wip.log index a843dc674..937668bba 100644 --- a/tests/tests/parsers/code_2e10_wip.log +++ b/tests/tests/parsers/code_2e10_wip.log @@ -9,6 +9,6 @@ 2023-11-04T17:38:34.867259 067 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} 2023-11-04T17:38:34.942291 068 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} -# Vasco fan -2024-10-14T19:59:07.786056 070 I --- 37:153226 --:------ 37:153226 2E10 003 000000 # ClimaRad VenturaV1x reporting, what? -2024-10-10T17:57:21.140055 068 I --- 37:153226 --:------ 37:153226 2E10 003 000100 +# ClimaRad VenturaV1x reporting, no option for presence detection +2024-10-14T19:59:07.786056 070 I --- 37:153226 --:------ 37:153226 2E10 003 000000 # {'_unknown_4': '00', 'presence_detected': False} +2024-10-10T17:57:21.140055 068 I --- 37:153226 --:------ 37:153226 2E10 003 000100 # {'_unknown_4': '00', 'presence_detected': True} From 04f1009bf221eabe0c928a268e1a67169530dadc Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Wed, 16 Oct 2024 23:45:23 +0200 Subject: [PATCH 3/4] remove packets from parser --- src/ramses_tx/parsers.py | 2 -- tests/tests/parsers/code_2e10_wip.log | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 3c08c3a2a..1d42b4285 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1962,8 +1962,6 @@ def parser_2e10(payload: str, msg: Message) -> dict[str, Any]: "_unknown_4": payload[7:], } elif msg.src.type == "37": # ClimaRad VenturaV1x FAN - # .I --- 37:153226 --:------ 37:153226 2E10 003 000000 # just 1 change in 24 h @ 7PM - # .I --- 37:153226 --:------ 37:153226 2E10 003 000100 # seen while on Manual 2** assert payload in ("000000", "000100"), _INFORM_DEV_MSG presence = int(payload[2:4]) else: diff --git a/tests/tests/parsers/code_2e10_wip.log b/tests/tests/parsers/code_2e10_wip.log index 937668bba..054b1098b 100644 --- a/tests/tests/parsers/code_2e10_wip.log +++ b/tests/tests/parsers/code_2e10_wip.log @@ -9,6 +9,6 @@ 2023-11-04T17:38:34.867259 067 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} 2023-11-04T17:38:34.942291 068 I 024 21:052764 --:------ 21:052764 2E10 002 0001 # {'presence_detected': True, '_unknown_4': '', 'seqx_num': '024'} -# ClimaRad VenturaV1x reporting, no option for presence detection +# ClimaRad VenturaV1x reporting, no option for presence detection, eg. just 1 change in 24 h @ 7PM 2024-10-14T19:59:07.786056 070 I --- 37:153226 --:------ 37:153226 2E10 003 000000 # {'_unknown_4': '00', 'presence_detected': False} 2024-10-10T17:57:21.140055 068 I --- 37:153226 --:------ 37:153226 2E10 003 000100 # {'_unknown_4': '00', 'presence_detected': True} From 5f158bfc918d27390e08b5f4dc963263f09a7e5e Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Thu, 17 Oct 2024 00:06:09 +0200 Subject: [PATCH 4/4] remove stray Vasco 22F3 packets from 2E10 parser --- src/ramses_tx/parsers.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 1d42b4285..833e64731 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1953,15 +1953,7 @@ def parser_2e04(payload: str, msg: Message) -> PayDictT._2E04: # presence_detect, HVAC sensor, or Timed boost for Vasco D60 def parser_2e10(payload: str, msg: Message) -> dict[str, Any]: presence: str | int - if ( - payload == "00021E04060000" - ): # Vasco remote timed boost on, button bottom right pressed - return { - "mode": "boost", - "duration": (payload[5:6]), - "_unknown_4": payload[7:], - } - elif msg.src.type == "37": # ClimaRad VenturaV1x FAN + if msg.src.type == "37": # ClimaRad VenturaV1x FAN assert payload in ("000000", "000100"), _INFORM_DEV_MSG presence = int(payload[2:4]) else: