ramses-rf 0.22.2__py3-none-any.whl → 0.51.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. ramses_cli/__init__.py +18 -0
  2. ramses_cli/client.py +597 -0
  3. ramses_cli/debug.py +20 -0
  4. ramses_cli/discovery.py +405 -0
  5. ramses_cli/utils/cat_slow.py +17 -0
  6. ramses_cli/utils/convert.py +60 -0
  7. ramses_rf/__init__.py +31 -10
  8. ramses_rf/binding_fsm.py +787 -0
  9. ramses_rf/const.py +124 -105
  10. ramses_rf/database.py +297 -0
  11. ramses_rf/device/__init__.py +69 -39
  12. ramses_rf/device/base.py +187 -376
  13. ramses_rf/device/heat.py +540 -552
  14. ramses_rf/device/hvac.py +286 -171
  15. ramses_rf/dispatcher.py +153 -177
  16. ramses_rf/entity_base.py +478 -361
  17. ramses_rf/exceptions.py +82 -0
  18. ramses_rf/gateway.py +378 -514
  19. ramses_rf/helpers.py +57 -19
  20. ramses_rf/py.typed +0 -0
  21. ramses_rf/schemas.py +148 -194
  22. ramses_rf/system/__init__.py +16 -23
  23. ramses_rf/system/faultlog.py +363 -0
  24. ramses_rf/system/heat.py +295 -302
  25. ramses_rf/system/schedule.py +312 -198
  26. ramses_rf/system/zones.py +318 -238
  27. ramses_rf/version.py +2 -8
  28. ramses_rf-0.51.1.dist-info/METADATA +72 -0
  29. ramses_rf-0.51.1.dist-info/RECORD +55 -0
  30. {ramses_rf-0.22.2.dist-info → ramses_rf-0.51.1.dist-info}/WHEEL +1 -2
  31. ramses_rf-0.51.1.dist-info/entry_points.txt +2 -0
  32. {ramses_rf-0.22.2.dist-info → ramses_rf-0.51.1.dist-info/licenses}/LICENSE +1 -1
  33. ramses_tx/__init__.py +160 -0
  34. {ramses_rf/protocol → ramses_tx}/address.py +65 -59
  35. ramses_tx/command.py +1454 -0
  36. ramses_tx/const.py +903 -0
  37. ramses_tx/exceptions.py +92 -0
  38. {ramses_rf/protocol → ramses_tx}/fingerprints.py +56 -15
  39. {ramses_rf/protocol → ramses_tx}/frame.py +132 -131
  40. ramses_tx/gateway.py +338 -0
  41. ramses_tx/helpers.py +883 -0
  42. {ramses_rf/protocol → ramses_tx}/logger.py +67 -53
  43. {ramses_rf/protocol → ramses_tx}/message.py +155 -191
  44. ramses_tx/opentherm.py +1260 -0
  45. ramses_tx/packet.py +210 -0
  46. ramses_tx/parsers.py +2957 -0
  47. ramses_tx/protocol.py +801 -0
  48. ramses_tx/protocol_fsm.py +672 -0
  49. ramses_tx/py.typed +0 -0
  50. {ramses_rf/protocol → ramses_tx}/ramses.py +262 -185
  51. {ramses_rf/protocol → ramses_tx}/schemas.py +150 -133
  52. ramses_tx/transport.py +1471 -0
  53. ramses_tx/typed_dicts.py +492 -0
  54. ramses_tx/typing.py +181 -0
  55. ramses_tx/version.py +4 -0
  56. ramses_rf/discovery.py +0 -398
  57. ramses_rf/protocol/__init__.py +0 -59
  58. ramses_rf/protocol/backports.py +0 -42
  59. ramses_rf/protocol/command.py +0 -1561
  60. ramses_rf/protocol/const.py +0 -697
  61. ramses_rf/protocol/exceptions.py +0 -111
  62. ramses_rf/protocol/helpers.py +0 -390
  63. ramses_rf/protocol/opentherm.py +0 -1170
  64. ramses_rf/protocol/packet.py +0 -235
  65. ramses_rf/protocol/parsers.py +0 -2673
  66. ramses_rf/protocol/protocol.py +0 -613
  67. ramses_rf/protocol/transport.py +0 -1011
  68. ramses_rf/protocol/version.py +0 -10
  69. ramses_rf/system/hvac.py +0 -82
  70. ramses_rf-0.22.2.dist-info/METADATA +0 -64
  71. ramses_rf-0.22.2.dist-info/RECORD +0 -42
  72. ramses_rf-0.22.2.dist-info/top_level.txt +0 -1
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/env python3
2
+ """RAMSES RF - exceptions within the packet/protocol/transport layer."""
3
+
4
+ from __future__ import annotations
5
+
6
+
7
+ class _RamsesBaseException(Exception):
8
+ """Base class for all ramses_tx exceptions."""
9
+
10
+ pass
11
+
12
+
13
+ class RamsesException(_RamsesBaseException):
14
+ """Base class for all ramses_tx exceptions."""
15
+
16
+ HINT: None | str = None
17
+
18
+ def __init__(self, *args: object):
19
+ super().__init__(*args)
20
+ self.message: str | None = args[0] if args else None # type: ignore[assignment]
21
+
22
+ def __str__(self) -> str:
23
+ if self.message and self.HINT:
24
+ return f"{self.message} (hint: {self.HINT})"
25
+ if self.message:
26
+ return self.message
27
+ if self.HINT:
28
+ return f"Hint: {self.HINT}"
29
+ return ""
30
+
31
+
32
+ class _RamsesLowerError(RamsesException):
33
+ """A failure in the lower layer (parser, protocol, transport, serial)."""
34
+
35
+
36
+ ########################################################################################
37
+ # Errors at/below the protocol/transport layer, incl. packet processing
38
+
39
+
40
+ class ProtocolError(_RamsesLowerError):
41
+ """An error occurred when sending, receiving or exchanging packets."""
42
+
43
+
44
+ class ProtocolFsmError(ProtocolError):
45
+ """The protocol FSM was/became inconsistent (this shouldn't happen)."""
46
+
47
+
48
+ class ProtocolSendFailed(ProtocolFsmError):
49
+ """The Command failed to elicit an echo or (if any) the expected response."""
50
+
51
+
52
+ class TransportError(ProtocolError): # derived from ProtocolBaseError
53
+ """An error when sending or receiving frames (bytes)."""
54
+
55
+
56
+ class TransportSerialError(TransportError):
57
+ """The transport's serial port has thrown an error."""
58
+
59
+
60
+ class TransportSourceInvalid(TransportError):
61
+ """The source of packets (frames) is not valid type/configuration."""
62
+
63
+
64
+ ########################################################################################
65
+ # Errors at/below the protocol/transport layer, incl. packet processing
66
+
67
+
68
+ class ParserBaseError(_RamsesLowerError):
69
+ """The packet is corrupt/not internally consistent, or cannot be parsed."""
70
+
71
+
72
+ class PacketInvalid(ParserBaseError):
73
+ """The packet is corrupt/not internally consistent."""
74
+
75
+
76
+ class PacketAddrSetInvalid(PacketInvalid):
77
+ """The packet's address set is inconsistent."""
78
+
79
+
80
+ class PacketPayloadInvalid(PacketInvalid):
81
+ """The packet's payload is inconsistent."""
82
+
83
+
84
+ # Errors at/below the protocol/transport layer, incl. packet processing
85
+
86
+
87
+ class ParserError(ParserBaseError):
88
+ """The packet cannot be parsed without error."""
89
+
90
+
91
+ class CommandInvalid(ParserError):
92
+ """The command is corrupt/not internally consistent."""
@@ -1,30 +1,33 @@
1
1
  #!/usr/bin/env python3
2
- # -*- coding: utf-8 -*-
3
- #
4
2
  """RAMSES RF - RAMSES-II compatible Packet processor."""
5
- from __future__ import annotations
6
3
 
7
- from typing import Dict, List, Tuple
4
+ from __future__ import annotations
8
5
 
9
6
  __all__ = ["check_signature"]
10
7
 
11
8
  # incl. date_1. NB: date_2 can vary (firmware date), and _unknown_1 can vary for R8810A
12
9
  # fmt: off
13
- __DEVICE_INFO_RAW: Dict[str, Tuple[str, str, str, str]] = {
10
+ __DEVICE_INFO_RAW: dict[str, tuple[str, str, str, str]] = {
14
11
  # Heating (device type implies a slug only for these)...
15
12
  "0002FF0119FFFFFFFF": ("CTL", "01", "2014-01-16", "EvoTouch Colour"), # . ATC928-G3-0xx Evo Mk3 - EvoTouch Colour (WiFi, 12 zones)
16
13
  "0002FF0163FFFFFFFF": ("CTL", "01", "2013-08-01", "Evo Color"), # . ATP928-G2-080 Evo Mk2 - Color (no WiFi)
17
14
  "0002FFFF17FFFFFFFF": ("CTL", "01", "2012-05-11", "IONA RAI Prototype"), # . ATC928-G1-000 Evo Mk1 - Monochrone (?prototype, 8 zones)
18
15
  "0003FF0203FFFF0001": ("UFC", "02", "2017-11-06", "HCE80 V3.10 061117"),
16
+ "0001C89D6E0600FEFF": ("UFC", "02", "2022-12-01", "HCE100-RADIO"),
19
17
  "0002FF0412FFFFFFFF": ("TRV", "04", "2014-03-13", "HR92 Radiator Ctrl."),
20
18
  "0002FF050BFFFFFFFF": ("TRV", "04", "2017-03-07", "HR91 Radiator Ctrl."),
21
19
  "0001C8810B0700FEFF": ("OTB", "10", "2019-08-20", "R8820"),
22
20
  "0002FF0A0CFFFFFFFF": ("OTB", "10", "2014-07-31", "R8810A Bridge"),
21
+ "0002FF1F00FFFFFFFF": ("DTS", "22", "0000-00-00", "DT4 22"),
23
22
  "0002FF1E01FFFFFFFF": ("RFG", "30", "2013-12-04", "Internet Gateway"),
23
+ "0002FF1E02FFFFFFFF": ("RFG", "30", "2014-10-17", "Internet Gateway"),
24
24
  "0002FF1E03FFFFFFFF": ("RFG", "30", "2017-04-21", "Internet Gateway"),
25
25
  "0001C8380A0100F1FF": ("RND", "34", "2014-11-03", "T87RF2025"), # . Round
26
26
  "0001C8380F0100F1FF": ("RND", "34", "2017-05-03", "T87RF2025"), # . Round
27
+ # Odd - Vasco CTL/RFG
28
+ "0001C848260066FEFE": ("CTL", "30", "2019-11-28", "BRDG-02EM23"), # . Vasco Gateway (CTL/RFG/RFS?)
27
29
  # Odd - Jasper kit (device type implies a slug here too)
30
+ "0002FF0801FFFFFFFE": ("JIM", "08", "2016-11-28", "Jasper EIM"),
28
31
  "0002FF0802FFFFFFFE": ("JIM", "08", "2017-11-10", "Jasper EIM"),
29
32
  "0002FF1F02FFFFFFFF": ("JST", "31", "2016-08-04", "Jasper Stat TXXX"),
30
33
  # FAN - some are HRUs, others extraction only
@@ -39,17 +42,28 @@ __DEVICE_INFO_RAW: Dict[str, Tuple[str, str, str, str]] = {
39
42
  "0001001B361B01FEFF": ("FAN", "37", "2019-04-11", "CVE-RF"), # . 31D9, 31DA, and 12C8
40
43
  "0001001B371B01FEFF": ("FAN", "37", "2019-08-29", "CVE-RF"), # . 31D9, 31DA
41
44
  "0001001B381B01FEFF": ("FAN", "37", "2020-02-14", "CVE-RF"), # . 31D9, 31DA (and I|042F, I|3120)
45
+ "0001001B391B01FEFF": ("FAN", "37", "2021-11-04", "CVE-RF"),
46
+ "0001C8830C0A65FEFF": ("FAN", "37", "2020-12-17", "VMD-07RPS13"), # . ClimaRad VenturaV1x
47
+ "0001C81C090466FEFF": ("FAN", "29", "0000-00-00", "VMC-17RP01"), # . appears to be an EXT
42
48
  "0001C8260A0367FFFF": ("FAN", "29", "0000-00-00", "VMC-15RP01"),
43
- "0001C8260D0467FFFF": ("FAN", "29", "0000-00-00", "VMC-15RP01"), # . 31D9
49
+ "0001C8260D0467FFFF": ("FAN", "29", "0000-00-00", "VMC-15RP01"), # . 31D9
44
50
  "0001C83A0F0866FFFF": ("FAN", "32", "0000-00-00", "VMD-17RPS01"), # . 31D9, 31DA
51
+ "0001C85F0E0267FFFF": ("FAN", "32", "0000-00-00", "VMC-15RPS34"), # . Orcon MVS-15
52
+ "0001C87D130D67FEFF": ("FAN", "32", "2019-02-28", "VMD-15RMS64"), # . Orcon HRC-300-EcoMax
45
53
  "0001C87D140D67FEFF": ("FAN", "32", "2019-12-23", "VMD-15RMS64"), # . 31D9, 31DA (and I|042F)
46
54
  "0001C895050567FEFF": ("FAN", "32", "2020-07-01", "VMD-15RMS86"), # . 31DA, 12A0, 22F7, 2411 (and I|042F, I|313F, I|3120)
47
55
  "0001C8950B0A67FEFF": ("FAN", "32", "2021-01-21", "VMD-15RMS86"), # . 31D9, 31DA, 12A0, 313F (and I|042F, I|3120)
56
+ "0001C81D150765FFFF": ("FAN", "29", "0000-00-00", "VMC-07RP01"), # . ClimaRad MiniBox
57
+ "0001C83A190F66FFFF": ("FAN", "32", "0000-00-00", "VMD-17RPS01"), # . Vasco D60Vasco D60
58
+
59
+ # PIV - usu. Nuaire
48
60
  "0001C90011006CFEFF": ("FAN", "30", "2016-09-09", "BRDG-02JAS01"), # . NOTE: 30: 31D9, 31DA, 1F09 (a PIV)
61
+ "0001C9001D006CFEFE": ("FAN", "30", "2019-07-18", "BRDG-02JAS01"), # . 31D9
49
62
  # CO2 - some have PIR
50
63
  "00010028080101FEFF": ("CO2", "37", "2019-04-29", "VMS-12C39"), # . 1298, 31E0, 2E10, 3120, and I|22F1!
51
64
  "00010028090101FEFF": ("CO2", "37", "2021-01-20", "VMS-12C39"), # . 1298, 31E0, 2E10, 3120 (and I|042F)
52
- "0001C822060166FEFF": ("CO2", "37", "2016-12-22", "VMS-17C01"), # . 1298, 31E0
65
+ "0001C822030166FEFF": ("CO2", "29", "2015-05-07", "VMS-17C01"), # . 1298, 31E0
66
+ "0001C822060166FEFF": ("CO2", "37", "2016-12-22", "VMS-17C01"), # . 1298, 31E0 (Vasco RF includes REM buttons TODO)
53
67
  "0001C8500B0167FEFF": ("CO2", "29", "2017-03-09", "VMS-15C16"), # . CO2 sensor (no remote)
54
68
  "0001C85701016CFFFF": ("CO2", "32", "2016-06-17", "VMS-23C33"), # . 1298, 31E0 (and I|042F)
55
69
  # HUM
@@ -60,28 +74,32 @@ __DEVICE_INFO_RAW: Dict[str, Tuple[str, str, str, str]] = {
60
74
  "0001C827050167FFFF": ("REM", "29", "0000-00-00", "VMN-15LF01"), # . 22F1, 22F3
61
75
  "0001C827070167FFFF": ("REM", "29", "0000-00-00", "VMN-15LF01"), # . 22F1, 22F3
62
76
  "0001C827090167FFFF": ("REM", "29", "2019-02-13", "VMN-15LF01"), # . 22F1, 22F3 (and I|042F)
77
+ "0001C8400F0166FFFF": ("REM", "29", "2021-11-01", "VMN-17LMP01"), # . Vasco remote 4-way
78
+ "0001C85901016CFFFF": ("REM", "32", "2016-05-31", "VMN-23LMH23"), # . zxdavb 22F1, 1060, 4-way?
63
79
  "0001C85A01016CFFFF": ("REM", "32", "2016-06-01", "VMN-23LMH23"), # . zxdavb 22F1, 1060, 4-way?
64
80
  # REM (display, or with CO2 sensor)
65
81
  "0001C88D020167FEFF": ("CO2", "37", "2020-04-21", "VMI-15MC01"), # . 1298, 31E0
66
82
  "0001C88D030167FEFF": ("REM", "37", "2021-07-28", "VMI-15MC01"), # . 1298/31E0, 22F1, 22F3 (with integrated CO2 sensor)
67
83
  "0001C894030167FFFF": ("REM", "37", "2020-08-27", "VMI-15WSJ53"), # . 22F1, 22F3? (HRC Display recessed 15RF)
68
84
  # RFS...
69
- "000100222B0001FEFF": ("RFS", "21", "2019-07-10", "CCU-12T20"), # . Itho spIDer 1060, 12C0, 22C9, 2E10, 30C9, 3110, 3120, 3EF0
85
+ "000100220B0001FEFF": ("RFS", "21", "2015-01-20", "CCU-12T20"), # . Itho spIDer 1060, 12C0, 22C9, 30C9, 3110, 3120, 3EF0, 01FF
86
+ "000100222B0001FEFF": ("RFS", "21", "2019-07-10", "CCU-12T20"), # . Itho spIDer 1060, 12C0, 22C9, 2E10, 30C9, 3110, 3120, 3EF0
70
87
  "00010022340001FEFF": ("RFS", "21", "2020-08-05", "CCU-12T20"), # . spIDer 1060, 12C0, 22C9, 22F1, 22F3, 2E10, 30C9, 3110, 3120, 3EF0
71
- "00010022370101F1FB": ("RFS", "21", "2021-05-21", "CCU-12T20"), # . spIDer 1060, 12C0, 22C9, 30C9, 3110, 3120, 3EF0
72
- "00010022370101FEFF": ("RFS", "21", "2021-05-21", "CCU-12T20"), # . spIDer 1060, 1290, 12C0, 22C9, 30C9, 3110, 3120 (maybe incomplete)
88
+ "00010022370101F1FB": ("RFS", "21", "2021-05-21", "CCU-12T20"), # . spIDer 1060, 12C0, 22C9, 30C9, 3110, 3120, 3EF0
89
+ "00010022370101FEFF": ("RFS", "21", "2021-05-21", "CCU-12T20"), # . spIDer 1060, 1290, 12C0, 22C9, 30C9, 3110, 3120 (maybe incomplete)
90
+
73
91
  # TBA - broken as 18:...
74
92
  "0001FA100A0001FEFE": ("FAN", "18", "2019-04-11", "BRDG-02A55"), # . NOTE: 18: 31D9, 31DA, 1F09
75
93
  "0001FA100B0001FEFE": ("FAN", "18", "2019-07-22", "BRDG-02A55"), # . NOTE: 18: 31D9, 31DA, 1F09
76
94
  "0001C8820C006AFEFF": ("FAN", "18", "2019-08-20", "HRA82"), # . NOTE: 18: (only I|042F, I|10E0)
77
95
  #
78
- "00010021030200FFFF": ("CO2", "37", "0000-00-00", "VMS-02J52"), # . 1298, 22F3, 31E0
96
+ "00010021030200FFFF": ("CO2", "37", "0000-00-00", "VMS-02J52"), # . 1298, 22F3, 31E0
79
97
  "0001C8930A0967FEFF": ("FAN", "32", "2020-10-06", "VMZ-15V13"), # . *Zone Valve* 1298, 22F3, 31E0
80
98
  "0001C893090867FEFF": ("FAN", "32", "2020-06-19", "VMZ-15V13"), # . *Zone Valve* 1298, 22F3, 31E0
81
99
  }
82
100
  # fmt: on
83
101
 
84
- __DEVICE_INFO: Dict[str, List[str]] = {
102
+ __DEVICE_INFO: dict[str, list[str]] = {
85
103
  t: [k for k, v in __DEVICE_INFO_RAW.items() if v[1] == t]
86
104
  for t in sorted(dict.fromkeys(v[1] for v in __DEVICE_INFO_RAW.values()))
87
105
  } # convert to {dev_type: [signature, ...]}
@@ -105,18 +123,22 @@ def check_signature(dev_type: str, signature: str) -> None:
105
123
  # VMD - Heat recovery unit
106
124
  # VMC - Mechanical extraction: To integrate in a single fan system
107
125
  # VMI - User interface with display
108
- # VMN -
126
+ # VMN - Remote
109
127
  # VMS - Sensors platform: CO2, humidity and temperature (and PIR?)
110
128
 
111
129
  # BRDG-02A55 - Fan of some description
130
+ # BRDG-02EM23 - Vasco
112
131
  # BRDG-02JAS01 - PIV - Nuaire DriMaster PIV
113
132
  # BRDG-02M11 - Itho Honeywell RF-repeater
114
133
 
115
134
  # CCU-12T20 - RFS - RF gateway (spIDer, Fifthplay Home Area Manager)
116
135
  # CVE-RF - FAN -
117
136
  # HRA82 -
137
+ # VMC-15RPS34 -
118
138
  # VMC-15RP01 - Orcon unit (senseair.com)
139
+ # VMC-17RP01 - Vasco C400RF (fan)
119
140
 
141
+ # VMD-07RPS13 - FAN - ClimaRad VenturaV1x
120
142
  # VMD-15RMS64 - FAN - Orcon HRC-350 (Ventiline) / Orcon MVS 15RHB
121
143
  # VMD-15RMS86 -
122
144
  # VMD-17RPS01 -
@@ -125,7 +147,8 @@ def check_signature(dev_type: str, signature: str) -> None:
125
147
  # VMI-15MC01 - REM - Orcon 15RF with integrated CO2
126
148
 
127
149
  # VMN-15LF01 - REM - Orcon 15RF 6 button remote
128
- # VMN-23LM33 -
150
+ # VMN-17LMP01 - REM - Vasco 4 button remote (NL 2021)
151
+ # VMN-23LM33 - REM?
129
152
  # VMN-23LMH23 - REM - 4 button RF Switch
130
153
 
131
154
  # VMS-02J52 - ???
@@ -133,7 +156,7 @@ def check_signature(dev_type: str, signature: str) -> None:
133
156
  # VMS-15C16 - CO2 - CO2 Sensor (no remote)
134
157
  # VMS-12C39 - CO2 - CO2 Sensor, incl. integrated control, PIR?
135
158
  # VMS-15CM17 - CO2 - CO2 Sensor
136
- # VMS-17C01 -
159
+ # VMS-17C01 - CO2 - CO2 Sensor, incl. integrated control Vasco
137
160
  # VMS-17HB01 -
138
161
  # VMS-23C33 - CO2 - CO2 Sensor (no PIR) (e.g. Nuaire DRI-ECO-CO2)
139
162
  # VMS-23HB33 - HUM - RH/Temp Sensor (e.g. Nuaire DRI-ECO-RH)
@@ -150,3 +173,21 @@ def check_signature(dev_type: str, signature: str) -> None:
150
173
  # HRA
151
174
  # RFT - RF
152
175
  # HRU heat recovery unit (MVHR), aka WTW (in. dutch)
176
+
177
+
178
+ # manufacturer group: 0001
179
+ # manufacturer sub_id: C8
180
+ # product id: 95/7D/50/51/8D/etc.
181
+ __ORCON_WIP = {
182
+ "0001C84F": ("VMD-02RPS54", ""),
183
+ "0001C850": ("VMS-15C16 ", "CO2 Room sensor"),
184
+ "0001C851": ("VMS-15CM17 ", "CO2 Control sensor"),
185
+ "0001C87D": ("VMD-15RMS64", "HRC-EcoMax/Comfort (2018-2019)"),
186
+ "0001C88C": ("VMD-02RPS14", ""),
187
+ "0001C88D": (" ", "CO2 Built-in control sensor"),
188
+ "0001C88E": ("VMD-02RPS66", ""),
189
+ "0001C88F": ("VMD-02RPS07", ""),
190
+ "0001C892": ("VMD-02RPS78", ""),
191
+ "0001C895": ("VMD-15RMS86", "HRC-EcoSmart/Comfort, HRC-EcoMax/Comfort (from 2021)"),
192
+ "0001C897": ("VMD-02RMS37", ""),
193
+ }