diff --git a/src/ramses_tx/parsers.py b/src/ramses_tx/parsers.py index 780fb873..73a0250d 100644 --- a/src/ramses_tx/parsers.py +++ b/src/ramses_tx/parsers.py @@ -1507,10 +1507,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 new file mode 100644 index 00000000..597ca340 --- /dev/null +++ b/tests/tests/parsers/code_22e9.log @@ -0,0 +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 - 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'} # 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