From e69346b569dbd48f474700c426378526f16a5257 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Thu, 17 Oct 2024 23:32:46 +0200 Subject: [PATCH 1/5] Vasco D60 22E9 packets --- tests/tests/parsers/code_042f.log | 2 -- tests/tests/parsers/code_22e9.log | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 tests/tests/parsers/code_22e9.log diff --git a/tests/tests/parsers/code_042f.log b/tests/tests/parsers/code_042f.log index 9df2c10d..a5267ec9 100644 --- a/tests/tests/parsers/code_042f.log +++ b/tests/tests/parsers/code_042f.log @@ -35,5 +35,3 @@ 2024-10-09T10:35:09.245476 060 RQ --- 37:117647 32:022222 --:------ 22F1 001 00 2024-10-09T10:35:10.257671 058 RQ --- 37:117647 32:022222 --:------ 22F1 001 00 2024-10-09T10:35:11.269793 056 RQ --- 37:117647 32:022222 --:------ 22F1 001 00 - - diff --git a/tests/tests/parsers/code_22e9.log b/tests/tests/parsers/code_22e9.log new file mode 100644 index 00000000..e551eb19 --- /dev/null +++ b/tests/tests/parsers/code_22e9.log @@ -0,0 +1,3 @@ +2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} +2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'percent_2': 0.005, 'percent_4': 0.0, 'percent_6': 0.0} # Vasco D60 +2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'percent_2': 0.005, 'percent_4': 0.035, 'percent_6': 0.005} # idem From d552e2439ba1451963e05f18cd7821a58ad5bba6 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Fri, 18 Oct 2024 09:53:42 +0200 Subject: [PATCH 2/5] log spacing Co-authored-by: David Bonnes --- tests/tests/parsers/code_22e9.log | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/tests/parsers/code_22e9.log b/tests/tests/parsers/code_22e9.log index e551eb19..968aa194 100644 --- a/tests/tests/parsers/code_22e9.log +++ b/tests/tests/parsers/code_22e9.log @@ -1,3 +1,3 @@ -2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} -2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'percent_2': 0.005, 'percent_4': 0.0, 'percent_6': 0.0} # Vasco D60 -2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'percent_2': 0.005, 'percent_4': 0.035, 'percent_6': 0.005} # idem +2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} +2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'percent_2': 0.005, 'percent_4': 0.0, 'percent_6': 0.0} # Vasco D60 +2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'percent_2': 0.005, 'percent_4': 0.035, 'percent_6': 0.005} # idem From 304d5ec71363700be8d3817ead96a5d461101144 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Tue, 22 Oct 2024 22:38:51 +0200 Subject: [PATCH 3/5] split D60 RP packet, not a percentage --- src/ramses_tx/parsers.py | 10 ++++++---- tests/tests/parsers/code_22e9.log | 8 ++++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 45b81c8c..3655697b 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1515,10 +1515,12 @@ def parser_22e5(payload: str, msg: Message) -> Mapping[str, float | None]: # WIP: unknown, HVAC -def parser_22e9(payload: str, msg: Message) -> Mapping[str, float | None]: - # RP --- 32:153258 18:005904 --:------ 22E9 004 00C8C814 - # RP --- 32:155617 18:005904 --:------ 22E9 004 008CC814 - +def parser_22e9(payload: str, msg: Message) -> Mapping[str, float | str | None]: + if payload[2:4] == "01": + return { + "unknown_4": payload[4:6], + "unknown_6": payload[6:8], + } return parser_22e0(payload, msg) diff --git a/tests/tests/parsers/code_22e9.log b/tests/tests/parsers/code_22e9.log index 968aa194..52a55b53 100644 --- a/tests/tests/parsers/code_22e9.log +++ b/tests/tests/parsers/code_22e9.log @@ -1,3 +1,7 @@ +2024-01-01T00:00:00.000000 000 RP --- 32:153258 18:005904 --:------ 22E9 004 00C8C814 # {'percent_2': 1.0, 'percent_4': 1.0, 'percent_6': 0.1} +2024-01-01T00:00:00.000000 000 RP --- 32:155617 18:005904 --:------ 22E9 004 008CC814 # {'percent_2': 0.7, 'percent_4': 1.0, 'percent_6': 0.1} + +# Vasco D60 2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} -2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'percent_2': 0.005, 'percent_4': 0.0, 'percent_6': 0.0} # Vasco D60 -2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'percent_2': 0.005, 'percent_4': 0.035, 'percent_6': 0.005} # idem +2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'unknown_4': '00', 'unknown_6': '00'} +2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'unknown_4': '07', 'unknown_6': '01'} From ea2c5d79191aa4c497a5f87df89f5e3ad3736059 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Wed, 23 Oct 2024 10:00:48 +0200 Subject: [PATCH 4/5] split D60 RP packet, not a percentage --- tests/tests/parsers/code_22e9.log | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/tests/parsers/code_22e9.log b/tests/tests/parsers/code_22e9.log index 52a55b53..fbd6ba68 100644 --- a/tests/tests/parsers/code_22e9.log +++ b/tests/tests/parsers/code_22e9.log @@ -1,7 +1,7 @@ 2024-01-01T00:00:00.000000 000 RP --- 32:153258 18:005904 --:------ 22E9 004 00C8C814 # {'percent_2': 1.0, 'percent_4': 1.0, 'percent_6': 0.1} 2024-01-01T00:00:00.000000 000 RP --- 32:155617 18:005904 --:------ 22E9 004 008CC814 # {'percent_2': 0.7, 'percent_4': 1.0, 'percent_6': 0.1} -# Vasco D60 +# Vasco D60 TODO add more context (although this arrives as an RP) 2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} 2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'unknown_4': '00', 'unknown_6': '00'} 2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'unknown_4': '07', 'unknown_6': '01'} From 69d3a43f4fa5dfb635f15bf45bd56e6e39c1f828 Mon Sep 17 00:00:00 2001 From: Egbert Broerse Date: Mon, 28 Oct 2024 21:14:20 +0100 Subject: [PATCH 5/5] a little bt of context --- tests/tests/parsers/code_22e9.log | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/tests/parsers/code_22e9.log b/tests/tests/parsers/code_22e9.log index fbd6ba68..597ca340 100644 --- a/tests/tests/parsers/code_22e9.log +++ b/tests/tests/parsers/code_22e9.log @@ -1,7 +1,8 @@ +# unknown devices nearby 2024-01-01T00:00:00.000000 000 RP --- 32:153258 18:005904 --:------ 22E9 004 00C8C814 # {'percent_2': 1.0, 'percent_4': 1.0, 'percent_6': 0.1} 2024-01-01T00:00:00.000000 000 RP --- 32:155617 18:005904 --:------ 22E9 004 008CC814 # {'percent_2': 0.7, 'percent_4': 1.0, 'percent_6': 0.1} -# Vasco D60 TODO add more context (although this arrives as an RP) +# Vasco D60 - only sent as an RP 2024-10-15T12:32:31.521795 000 RQ --- 18:130140 32:022222 --:------ 22E9 001 00 # {} -2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'unknown_4': '00', 'unknown_6': '00'} -2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'unknown_4': '07', 'unknown_6': '01'} +2024-10-15T12:32:31.538027 082 RP --- 32:022222 18:130140 --:------ 22E9 004 00010000 # {'unknown_4': '00', 'unknown_6': '00'} # seen 75% of the time +2024-10-15T22:59:02.967986 084 RP --- 32:022222 18:130140 --:------ 22E9 004 00010701 # {'unknown_4': '07', 'unknown_6': '01'} # seen 25% of the time