Skip to content

Commit

Permalink
add packets in test, RP to codeschema
Browse files Browse the repository at this point in the history
  • Loading branch information
silverailscolo committed Oct 15, 2024
1 parent ce7241f commit 0dc17c8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
4 changes: 1 addition & 3 deletions src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1531,9 +1531,7 @@ 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
# ClimaRad VenturaV1x HRU does not send 22F1 for speed, uses 22F4

try:
assert payload[0:2] in ("00", "63")
Expand Down
14 changes: 8 additions & 6 deletions src/ramses_tx/ramses.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,7 @@
Code._22F1: { # fan_mode, HVAC
SZ_NAME: "fan_mode",
RQ: r"^00$",
RP: r"^00[0-9A-F]{4}$",
I_: r"^(00|63)(0[0-9A-F]){1,2}$",
},
Code._22F2: { # unknown_22f2, HVAC, NB: no I
Expand Down Expand Up @@ -1060,7 +1061,7 @@
Code._1470: {RP: {}},
Code._1F09: {I_: {}, RP: {}},
Code._1FC9: {W_: {}},
Code._22F1: {},
Code._22F1: {RP: {}},
Code._22F3: {},
Code._22F7: {I_: {}, RP: {}},
Code._2411: {I_: {}, RP: {}},
Expand Down Expand Up @@ -1228,11 +1229,12 @@
"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",
_22F1_MODE_VASCO: dict[str, str] = { # for VASCO D60 AND ClimaRad Minibox fanS/remotes
"01": "away", # 000106, not completely off, more like minimum
"02": "low", # 000206
"03": "medium", # 000306
"04": "high", # 000406, aka boost with 22F3
"05": "auto", #
}

_22F1_SCHEMES: dict[str, dict[str, str]] = {
Expand Down
17 changes: 10 additions & 7 deletions tests/tests/parsers/code_22f1.log
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
2021-02-12T17:28:57.122037 071 I 016 --:------ --:------ 39:159057 22F1 003 000304 # {'fan_mode': 'medium', '_scheme': 'itho', '_mode_idx': '03', '_mode_max': '04', "seqx_num": "016"}
2021-02-12T17:29:02.197564 066 I 017 --:------ --:------ 39:159057 22F1 003 000404 # {'fan_mode': 'high', '_scheme': 'itho', '_mode_idx': '04', '_mode_max': '04', "seqx_num": "017"}

# Scheme 06 - seen with Vasco : 000[234]06 (sent as set of 5)
# Scheme 06 - seen with Vasco and ClimaRad fans: 000[234]06 (sent as set of 5)
2024-10-10T18:10:21.527295 073 I --- 29:123150 29:099029 --:------ 22F1 003 000306 #

2024-10-10T22:26:38.421878 041 I --- 29:091138 32:022222 --:------ 22F1 003 000206 #
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
# 000006 # (faked) not responding
2024-10-10T22:26:28.420378 041 I --- 29:091138 32:022222 --:------ 22F1 003 000106 # {'fan_mode': 'away', '_scheme': 'vasco', '_mode_idx': '01', '_mode_max': '06'}
2024-10-10T22:26:38.421878 041 I --- 29:091138 32:022222 --:------ 22F1 003 000206 # {'fan_mode': 'low', '_scheme': 'vasco', '_mode_idx': '02', '_mode_max': '06'}
2024-10-10T23:31:09.943782 042 I --- 29:091138 32:022222 --:------ 22F1 003 000306 # {'fan_mode': 'medium', '_scheme': 'vasco', '_mode_idx': '03', '_mode_max': '06'}
2024-10-10T23:36:03.885268 042 I --- 29:091138 32:022222 --:------ 22F1 003 000406 # {'fan_mode': 'high', '_scheme': 'vasco', '_mode_idx': '04', '_mode_max': '06'}
2024-10-15T13:09:39.141223 000 I --- 29:123150 29:099029 --:------ 22F1 003 000506 # {'fan_mode': 'auto', '_scheme': 'vasco', '_mode_idx': '05', '_mode_max': '06'}

2024-10-14T19:40:40.840473 056 RQ --- 37:117647 32:022222 --:------ 22F1 001 00 # {}
2024-10-15T12:32:30.550000 082 RP --- 32:022222 18:130140 --:------ 22F1 003 000306 # {'fan_mode': 'medium', '_scheme': 'vasco', '_mode_idx': '03', '_mode_max': '06'}

# 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'}
Expand Down

0 comments on commit 0dc17c8

Please sign in to comment.