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 22F1 for Vasco REM/CO2 #136

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
14 changes: 14 additions & 0 deletions src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,10 @@ def parser_22e9(payload: str, msg: Message) -> Mapping[str, float | None]:

# fan_speed (switch_mode), HVAC
def parser_22f1(payload: str, msg: Message) -> dict[str, Any]:
# Schema B: Vasco and ClimaRad fan remotes send fixed command 06, not 04, like
# .I --- 37:117647 32:022222 --:------ 22F1 003 000506 for high
# ClimaRad VenturaV1x does not send 22F1 for speed, uses 22F4

silverailscolo marked this conversation as resolved.
Show resolved Hide resolved
try:
assert payload[0:2] in ("00", "63")
assert not payload[4:] or int(payload[2:4], 16) <= int(
Expand Down Expand Up @@ -1559,6 +1563,16 @@ def parser_22f1(payload: str, msg: Message) -> dict[str, Any]:
_22f1_mode_set = ("", "0A")
_22f1_scheme = "nuaire"

elif payload[4:6] == "06":
from .ramses import _22F1_MODE_VASCO as _22F1_FAN_MODE

_22f1_mode_set = (
"",
"00",
"06",
) # "00" seen incidentally on a ClimaRad 4-button remote
_22f1_scheme = "vasco"

else:
from .ramses import _22F1_MODE_ORCON as _22F1_FAN_MODE

Expand Down
9 changes: 9 additions & 0 deletions src/ramses_tx/ramses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@
Code._10E0: {I_: {}, RP: {}},
Code._1298: {I_: {}},
Code._1FC9: {I_: {}},
Code._22F1: {RQ: {}},
Code._2411: {RQ: {}},
Code._2E10: {I_: {}},
Code._3120: {I_: {}},
Expand Down Expand Up @@ -1227,10 +1228,18 @@
"07": "off",
}

_22F1_MODE_VASCO: dict[str, str] = { # for VASCO D60 AND ClimaRad Minibox fanS/remoteS
"02": "low", # low: 000206
"03": "medium", # medium: 000306
"04": "high", # high: 000406, aka boost with 22F3
"05": "auto",
}

zxdavb marked this conversation as resolved.
Show resolved Hide resolved
_22F1_SCHEMES: dict[str, dict[str, str]] = {
"itho": _22F1_MODE_ITHO,
"nuaire": _22F1_MODE_NUAIRE,
"orcon": _22F1_MODE_ORCON,
"vasco": _22F1_MODE_VASCO,
}

# unclear if true for only Orcon/*all* models
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", "vasco")


DeviceTraitsT = TypedDict(
Expand Down
2 changes: 2 additions & 0 deletions tests/tests/parsers/code_22f1.log
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
2024-10-10T23:31:09.943782 042 I --- 29:091138 32:022222 --:------ 22F1 003 000306 #
2024-10-10T23:36:03.885268 042 I --- 29:091138 32:022222 --:------ 22F1 003 000406 #

2024-10-14T19:40:40.840473 056 RQ --- 37:117647 32:022222 --:------ 22F1 001 00 # fan state request by CO2

zxdavb marked this conversation as resolved.
Show resolved Hide resolved
# Scheme 07 - seen with Orcon : 000[2345]07 (away is aka absent, boost is aka party/boost)
2022-06-22T21:36:43.354510 ... I --- 37:155617 32:155617 --:------ 22F1 003 000007 # {'fan_mode': 'away', '_scheme': 'orcon', '_mode_idx': '00', '_mode_max': '07'}
2022-06-22T21:49:05.450903 ... I --- 37:155617 32:155617 --:------ 22F1 003 000107 # {'fan_mode': 'low', '_scheme': 'orcon', '_mode_idx': '01', '_mode_max': '07'}
Expand Down