Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/zxdavb/ramses_rf into eb-…
Browse files Browse the repository at this point in the history
…10e0
  • Loading branch information
silverailscolo committed Oct 17, 2024
2 parents 9b36ebd + 55cfce6 commit 947b7e1
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 18 deletions.
27 changes: 10 additions & 17 deletions src/ramses_tx/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,16 +813,6 @@ def parser_0418(payload: str, msg: Message) -> PayDictT._0418 | PayDictT._0418_N

# unknown_042f, from STA, VMS
def parser_042f(payload: str, msg: Message) -> dict[str, Any]:
# .I --- 34:064023 --:------ 34:064023 042F 008 00-0000-0023-0023-F5
# .I --- 34:064023 --:------ 34:064023 042F 008 00-0000-0024-0024-F5
# .I --- 34:064023 --:------ 34:064023 042F 008 00-0000-0025-0025-F5
# .I --- 34:064023 --:------ 34:064023 042F 008 00-0000-0026-0026-F5
# .I --- 34:092243 --:------ 34:092243 042F 008 00-0001-0021-0022-01
# .I --- 34:011469 --:------ 34:011469 042F 008 00-0001-0003-0004-BC

# .I --- 32:168090 --:------ 32:168090 042F 009 00-0000100F00105050
# .I --- 32:166025 --:------ 32:166025 042F 009 00-050E0B0C00111470

return {
"counter_1": f"0x{payload[2:6]}",
"counter_3": f"0x{payload[6:10]}",
Expand Down Expand Up @@ -985,14 +975,17 @@ def parser_10d0(payload: str, msg: Message) -> dict[str, Any]:
result: dict[str, bool | float | None]

if msg.verb == W_:
result = {"reset_counter": payload[2:4] == "FF"}
else:
result = {"days_remaining": int(payload[2:4], 16)}
return {"reset_counter": payload[2:4] != "00"}

if msg.len >= 3:
result.update({"days_lifetime": int(payload[4:6], 16)})
if msg.len >= 4:
result.update({"percent_remaining": hex_to_percent(payload[6:8])})
result = {}

if payload[2:4] not in ("FF", "FE"):
result["days_remaining"] = int(payload[2:4], 16)

if payload[4:6] not in ("FF", "FE"):
result["days_lifetime"] = int(payload[4:6], 16)

result["percent_remaining"] = hex_to_percent(payload[6:8])

return result

Expand Down
3 changes: 2 additions & 1 deletion src/ramses_tx/ramses.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
},
Code._10D0: { # filter_change - polling interval should be 1/day
SZ_NAME: "filter_change",
I_: r"^00[0-9A-F]{6}(0000)?$",
I_: r"^00[0-9A-F]{6}(0000|FFFF)?$",
RQ: r"^00(00)?$",
W_: r"^00FF$",
},
Expand Down Expand Up @@ -1094,6 +1094,7 @@
Code._0001: {RQ: {}}, # from a VMI (only?)
Code._042F: {I_: {}}, # from a VMI (only?)
Code._1060: {I_: {}},
Code._10D0: {W_: {}}, # reset filter count from REM
Code._10E0: {I_: {}, RQ: {}}, # RQ from a VMI (only?)
Code._1470: {RQ: {}}, # from a VMI (only?)
Code._1FC9: {I_: {}},
Expand Down
39 changes: 39 additions & 0 deletions tests/tests/parsers/code_042f.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
### Heat
2024-01-01T12:00:00.000000 --- I --- 34:064023 --:------ 34:064023 042F 008 00000000230023F5
2024-01-01T12:00:00.000000 --- I --- 34:064023 --:------ 34:064023 042F 008 00000000240024F5
2024-01-01T12:00:00.000000 --- I --- 34:064023 --:------ 34:064023 042F 008 00000000250025F5
2024-01-01T12:00:00.000000 --- I --- 34:064023 --:------ 34:064023 042F 008 00000000260026F5
2024-01-01T12:00:00.000000 --- I --- 34:092243 --:------ 34:092243 042F 008 0000010021002201
2024-01-01T12:00:00.000000 --- I --- 34:011469 --:------ 34:011469 042F 008 00000100030004BC

2024-01-01T12:00:00.000000 --- I --- 32:168090 --:------ 32:168090 042F 009 000000100F00105050
2024-01-01T12:00:00.000000 --- I --- 32:166025 --:------ 32:166025 042F 009 00050E0B0C00111470



### HVAC, see: https://github.com/zxdavb/ramses_rf/pull/135

# disconnect all - 10 sec on touch bottom right:
2024-10-09T11:50:24.287879 065 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T11:50:25.304920 063 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T11:50:26.326969 060 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T11:50:37.839476 068 I --- 37:117647 --:------ 37:117647 042F 009 00012521250026C870
2024-10-09T11:50:40.936596 071 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T11:50:41.963654 070 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
# 24-10-09T11:50:54.902520 064 W --- 37:117647 32:022222 --:------ 1FCA 009 0001FF95CB8FFFFFFF
# 24-10-09T11:50:55.918057 067 W --- 37:117647 32:022222 --:------ 1FCA 009 0001FF95CB8FFFFFFF
2024-10-09T11:50:57.755704 061 I --- 37:117647 --:------ 37:117647 042F 009 00022521250027F080
2024-10-09T11:51:49.472184 059 I --- 37:117647 63:262142 --:------ 10E0 038 000001C822060166FEFFFFFFFFFF160C07E0564D532D31374330310000000000000000000000

# connect - 3 sec on touch bottom right (D60 off):
2024-10-09T10:33:53.714590 057 I --- 37:117647 32:022222 --:------ 31E0 004 00000000
2024-10-09T10:34:50.432196 067 I --- 37:117647 --:------ 37:117647 042F 009 00012420240025C870
2024-10-09T10:34:54.556484 065 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T10:34:55.573584 063 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T10:35:02.278347 066 I --- 37:117647 63:262142 --:------ 1FC9 030 0031E095CB8F00129895CB8F0022F195CB8F6610E095CB8F001FC995CB8F
2024-10-09T10:35:04.342107 060 I --- 37:117647 63:262142 --:------ 1FC9 030 0031E095CB8F00129895CB8F0022F195CB8F6610E095CB8F001FC995CB8F
2024-10-09T10:35:09.245476 060 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T10:35:10.257671 058 RQ --- 37:117647 32:022222 --:------ 22F1 001 00
2024-10-09T10:35:11.269793 056 RQ --- 37:117647 32:022222 --:------ 22F1 001 00


6 changes: 6 additions & 0 deletions tests/tests/parsers/code_10d0.log
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
2022-07-03T22:52:34.571579 045 W --- 37:171871 32:155617 --:------ 10D0 002 00FF # {'reset_counter': True}
2022-07-03T22:52:34.596526 066 I --- 32:155617 37:171871 --:------ 10D0 006 0047B44F0000 # {'days_remaining': 71, 'days_lifetime': 180, 'percent_remaining': 0.395}

2024-10-15 12:33:55.595000 000 RQ --- 18:130140 32:022222 --:------ 10D0 001 00 # {}
2024-10-15 12:33:55.609000 --- RP --- 32:022222 18:130140 --:------ 10D0 006 00A9B6B90000 # {'days_remaining': 169, 'days_lifetime': 182, 'percent_remaining': 0.925}

2024-10-15T12:33:13.714200 000 RQ --- 18:130140 37:153226 --:------ 10D0 001 00 # {}
2024-10-15T12:33:13.731547 060 RP --- 37:153226 18:130140 --:------ 10D0 006 00FEFE79FFFF # {'percent_remaining': 0.605}

2022-07-03T23:14:23.854089 000 RQ --- 37:155617 32:155617 --:------ 10D0 002 0000 # {}
2022-07-03T23:14:23.876088 084 RP --- 32:155617 37:155617 --:------ 10D0 006 00B4B4C80000 # {'days_remaining': 180, 'days_lifetime': 180, 'percent_remaining': 1.000}

Expand Down
3 changes: 3 additions & 0 deletions tests/tests/parsers/code_3150.log
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@
2021-11-28T14:54:25.139800 ... I --- 02:123456 --:------ 02:123456 3150 002 00A2 # {"has_array": True, "has_idx": True , "has_payload": True , "is_fragment": False}
2021-05-23T04:43:12.702136 ... I --- 02:123456 --:------ 01:555555 3150 002 002C # {"has_array": False, "has_idx": '00' , "has_payload": True , "is_fragment": False}
2021-01-29T20:51:48.968664 075 I --- 02:000921 --:------ 01:191718 3150 002 06C4 # {"has_array": False, "has_idx": '06' , "has_payload": True , "is_fragment": False}

# VenturaV1x (VMD-07RPS13, no heater, only HRU)
2024-10-14T20:59:09.716874 060 I --- 37:153226 --:------ 37:153226 3150 006 00F201F202F2 # [{'zone_idx': '00', 'heat_demand_fault': 'unavailable'}, {'zone_idx': '01', 'heat_demand_fault': 'unavailable'}, {'zone_idx': '02', 'heat_demand_fault': 'unavailable'}]

0 comments on commit 947b7e1

Please sign in to comment.