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 22F3 for Vasco/ClimaRad HVAC #138

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
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
24 changes: 11 additions & 13 deletions src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
@@ -1584,16 +1584,8 @@ def _parser(seqx: str) -> dict:

# fan_boost, HVAC
def parser_22f3(payload: str, msg: Message) -> dict[str, Any]:
# .I 019 --:------ --:------ 39:159057 22F3 003 00000A # 10 mins
# .I 022 --:------ --:------ 39:159057 22F3 003 000014 # 20 mins
# .I 026 --:------ --:------ 39:159057 22F3 003 00001E # 30 mins
# .I --- 29:151550 29:237552 --:------ 22F3 007 00023C-0304-0000 # 60 mins
# .I --- 29:162374 29:237552 --:------ 22F3 007 00020F-0304-0000 # 15 mins
# .I --- 29:162374 29:237552 --:------ 22F3 007 00020F-0304-0000 # 15 mins

# NOTE: for boost timer for high
try:
# assert payload[2:4] in ("00", "02", "12", "x52"), f"byte 1: {flag8(payload[2:4])}"
assert msg.len <= 7 or payload[14:] == "0000", f"byte 7: {payload[14:]}"
except AssertionError as err:
_LOGGER.warning(f"{msg!r} < {_INFORM_DEV_MSG} ({err})")
@@ -1604,11 +1596,16 @@ def parser_22f3(payload: str, msg: Message) -> dict[str, Any]:
0x02: "per_vent_speed", # set fan as per current fan mode/speed?
}.get(int(payload[2:4], 0x10) & 0x07) # 0b0000-0111

fallback_speed = { # after timer expiry
0x08: "fan_off", # # set fan off?
0x10: "per_request", # # set fan as per payload[6:10], or payload[10:]?
0x18: "per_vent_speed", # set fan as per current fan mode/speed?
}.get(int(payload[2:4], 0x10) & 0x38) # 0b0011-1000
fallback_speed: str | None
if msg.len == 7 and payload[9:10] == "06": # Vasco and ClimaRad REM
fallback_speed = "per_vent_speed" # after timer expiry
# set fan as per current fan mode/speed
else:
fallback_speed = { # after timer expiry
0x08: "fan_off", # # set fan off?
0x10: "per_request", # # set fan as per payload[6:10], or payload[10:]?
0x18: "per_vent_speed", # set fan as per current fan mode/speed?
}.get(int(payload[2:4], 0x10) & 0x38) # 0b0011-1000

units = {
0x00: "minutes",
@@ -1617,6 +1614,7 @@ def parser_22f3(payload: str, msg: Message) -> dict[str, Any]:
}.get(int(payload[2:4], 0x10) & 0xC0) # 0b1100-0000

duration = int(payload[4:6], 16) * 60 if units == "hours" else int(payload[4:6], 16)
result = {}

if msg.len >= 3:
result = {
2 changes: 1 addition & 1 deletion src/ramses_tx/ramses.py
Original file line number Diff line number Diff line change
@@ -417,7 +417,7 @@
},
Code._22F3: { # fan_boost, HVAC
SZ_NAME: "fan_boost",
I_: r"^(00|63)[0-9A-F]{4}([0-9A-F]{8})?$",
I_: r"^(00|63)(021E)?[0-9A-F]{4}([0-9A-F]{8})?$",
}, # minutes only?
Code._22F4: { # unknown_22f4, HVAC
SZ_NAME: "unknown_22f4",
17 changes: 17 additions & 0 deletions tests/tests/parsers/code_22f3.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
2024-01-01T01:00:00.000000 ... I 019 --:------ --:------ 39:159057 22F3 003 00000A # 10 mins
2024-01-01T01:00:00.000000 ... I 022 --:------ --:------ 39:159057 22F3 003 000014 # 20 mins
2024-01-01T01:00:00.000000 ... I 026 --:------ --:------ 39:159057 22F3 003 00001E # 30 mins
2024-01-01T01:00:00.000000 ... I --- 29:151550 29:237552 --:------ 22F3 007 00023C03040000 # 60 mins
2024-01-01T01:00:00.000000 ... I --- 29:162374 29:237552 --:------ 22F3 007 00020F03040000 # 15 mins
2024-01-01T01:00:00.000000 ... I --- 29:162374 29:237552 --:------ 22F3 007 00020F03040000 # 15 mins

# Vasco remote (VMN-17LMP01) boost
2024-10-14T20:51:11.263018 049 I --- 29:091138 32:022222 --:------ 22F3 007 00021E04060000 # {'minutes': 30, 'flags': [0, 0, 0, 0, 0, 0, 1, 0], '_new_speed_mode': 'per_vent_speed', '_fallback_speed_mode': None, 'rate': None, '_unknown_5': '0000'}
# repeated 5 times total

# ClimaRad 4-button remote boost, lasts 20 mins
2024-10-14T08:50:34.322538 072 I --- 29:123150 29:099029 --:------ 22F3 007 00021E04060000 # {'minutes': 30, 'flags': [0, 0, 0, 0, 0, 0, 1, 0], '_new_speed_mode': 'per_vent_speed', '_fallback_speed_mode': None, 'rate': None, '_unknown_5': '0000'}
# repeated 2 times total but that could be caused by reception/confirm problem. LED is slow to confirm

# curious 22f3 packet: invalid button combi pressed?
2024-01-01T01:00:00.000000 123 I --- 29:123150 29:099029 --:------ 22F3 007 00020F00060000 # {'minutes': 15, 'flags': [0, 0, 0, 0, 0, 0, 1, 0], '_new_speed_mode': 'per_vent_speed', '_fallback_speed_mode': None, 'rate': None, '_unknown_5': '0000'}