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 22F4 ClimaRad payload #156

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
8 changes: 7 additions & 1 deletion src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1638,7 +1638,13 @@ def parser_22f3(payload: str, msg: Message) -> dict[str, Any]:
# WIP: unknown, HVAC
def parser_22f4(payload: str, msg: Message) -> dict[str, Any]:
# HACK: for dev/test: 37:153226 is ClimaRad Ventura fan/remote
payload = payload[8:14] if msg.src.id == "37:153226" else payload[:6]
if msg.src.id == "37:153226":
if payload[10:12] == "60":
payload = payload[8:14]
else:
payload = payload[:4] + payload[12:14]
else:
payload = payload[:6]

MODE_LOOKUP = {
0x00: "off?",
Expand Down
2 changes: 1 addition & 1 deletion src/ramses_tx/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def convert_null_to_dict(node_value: _T | None) -> _T | dict[Never, Never]:
SCH_DEVICE_ID_UFC = vol.Match(DEVICE_ID_REGEX.UFC)

_SCH_TRAITS_DOMAINS = ("heat", "hvac")
_SCH_TRAITS_HVAC_SCHEMES = ("itho", "nuaire", "orcon")
_SCH_TRAITS_HVAC_SCHEMES = ("itho", "nuaire", "orcon", "climarad")


DeviceTraitsT = TypedDict(
Expand Down
4 changes: 2 additions & 2 deletions tests/tests/parsers/code_22f4.log
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

# ClimaRad Ventura V1x, see _22F4_MODE_CLIMARAD
2024-10-15T13:12:46.635997 000 RQ --- 18:130140 37:153226 --:------ 22F4 001 00 # {}
2024-10-15T13:12:46.657580 061 RP --- 37:153226 18:130140 --:------ 22F4 013 00403000000000000000000000 # {'fan_mode': 'off?', 'fan_rate': 'speed 0'}
2024-10-15T13:12:46.657580 061 RP --- 37:153226 18:130140 --:------ 22F4 013 00403000000000000000000000 # {'fan_mode': 'auto', 'fan_rate': 'speed 0'}
# (SAME PAYLOAD) appears that payload may be an array? now/next? input/output? other?
2024-10-15T13:12:46.657580 061 RP --- 37:000001 18:130140 --:------ 22F4 013 00403000000000000000000000 # {'fan_mode': 'auto', 'fan_rate': 'speed 0'}

2024-01-01T01:00:00.000000 ... I --- 37:153226 --:------ 37:153226 22F4 013 00403000000000000000000000 # {'fan_mode': 'off?', 'fan_rate': 'speed 0'}
2024-01-01T01:00:00.000000 ... I --- 37:153226 --:------ 37:153226 22F4 013 00403000000000000000000000 # {'fan_mode': 'auto', 'fan_rate': 'speed 0'}
2024-01-01T01:00:00.000000 ... I --- 37:153226 --:------ 37:153226 22F4 013 000000000060C9000000000000 # {'fan_mode': 'manual', 'fan_rate': 'speed 1'}
2024-01-01T01:00:00.000000 ... I --- 37:153226 --:------ 37:153226 22F4 013 000000000060CA000000000000 # {'fan_mode': 'manual', 'fan_rate': 'speed 2'}
2024-01-01T01:00:00.000000 ... I --- 37:153226 --:------ 37:153226 22F4 013 000000000060CB000000000000 # {'fan_mode': 'manual', 'fan_rate': 'speed 3'}
Expand Down