Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak 2E10 for ClimaRad HVAC #139

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1947,12 +1947,17 @@ 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

presence: str | int
if msg.src.type == "37": # ClimaRad VenturaV1x FAN
assert payload in ("000000", "000100"), _INFORM_DEV_MSG
presence = int(payload[2:4])
else:
assert payload in ("0001", "000100"), _INFORM_DEV_MSG
Copy link
Contributor Author

@silverailscolo silverailscolo Oct 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

000100 seems like a strange value to accept based on the older packets in the log (which are not from my ClimaRad Ventura)

presence = payload[2:4]
return {
"presence_detected": bool(payload[2:4]),
"presence_detected": bool(presence),
"_unknown_4": payload[4:],
}

Expand Down
4 changes: 4 additions & 0 deletions tests/tests/parsers/code_2e10_wip.log
Original file line number Diff line number Diff line change
Expand Up @@ -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'}

# ClimaRad VenturaV1x reporting, no option for presence detection, eg. just 1 change in 24 h @ 7PM
silverailscolo marked this conversation as resolved.
Show resolved Hide resolved
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}