ramses-rf 0.51.7__py3-none-any.whl → 0.51.8__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.
ramses_rf/entity_base.py CHANGED
@@ -220,7 +220,7 @@ class _MessageDB(_Entity):
220
220
  self._msgz_[msg.code][msg.verb][msg._pkt._ctx] = msg
221
221
 
222
222
  @property
223
- def _msg_db(self) -> list[Message]: # flattened version of _msgz[code][verb][indx]
223
+ def _msg_db(self) -> list[Message]: # flattened version of _msgz[code][verb][index]
224
224
  """Return a flattened version of _msgz[code][verb][index].
225
225
 
226
226
  The idx is one of:
ramses_rf/exceptions.py CHANGED
@@ -72,11 +72,45 @@ class DeviceNotFaked(SystemInconsistent):
72
72
  HINT = "faking is configured in the known_list"
73
73
 
74
74
 
75
- class ForeignGatewayError(_RamsesUpperError):
75
+ class ForeignGatewayError(SystemInconsistent):
76
76
  """Raised when a foreign gateway is detected.
77
77
 
78
78
  These devices may not be gateways (set a class), or belong to a neighbour (exclude
79
- via block_list/known_list), or should be allowed (known_list).
80
- """
79
+ via block_list/known_list), or should be allowed (known_list)."""
81
80
 
82
81
  HINT = "consider enforcing a known_list"
82
+
83
+
84
+ class DeviceNotRecognised(_RamsesUpperError):
85
+ """Raised when a device is not recognized.
86
+
87
+ This typically happens when trying to interact with a device that doesn't exist
88
+ or is not properly configured in the system."""
89
+
90
+ HINT = "check the device ID and ensure the device is properly configured"
91
+
92
+
93
+ class CommandInvalid(_RamsesUpperError):
94
+ """Raised when an invalid command is sent to a device.
95
+
96
+ This can happen if the command format is incorrect or if the command is not
97
+ supported by the target device."""
98
+
99
+ HINT = "verify the command format and ensure it's supported by the device"
100
+
101
+
102
+ class SendFailure(_RamsesUpperError):
103
+ """Raised when a command fails to be sent to a device.
104
+
105
+ This typically indicates a communication issue with the device or gateway."""
106
+
107
+ HINT = "check the device connection and try again"
108
+
109
+
110
+ class SendPriority(_RamsesUpperError):
111
+ """Raised when the command queue is full.
112
+
113
+ This happens when too many commands are queued for sending and the queue
114
+ has reached its maximum capacity."""
115
+
116
+ HINT = "wait for pending commands to complete and try again"
ramses_rf/gateway.py CHANGED
@@ -306,7 +306,7 @@ class Gateway(Engine):
306
306
  enforce_include_list = bool(
307
307
  self._enforce_known_list
308
308
  and extract_known_hgi_id(
309
- self._include, disable_warnings=True, strick_checking=True
309
+ self._include, disable_warnings=True, strict_checking=True
310
310
  )
311
311
  )
312
312
 
ramses_rf/schemas.py CHANGED
@@ -39,6 +39,7 @@ from ramses_tx.schemas import ( # noqa: F401
39
39
  SCH_TRAITS as SCH_TRAITS,
40
40
  SZ_ALIAS as SZ_ALIAS,
41
41
  SZ_BLOCK_LIST,
42
+ SZ_BOUND_TO as SZ_BOUND_TO,
42
43
  SZ_CLASS as SZ_CLASS,
43
44
  SZ_DISABLE_SENDING,
44
45
  SZ_ENFORCE_KNOWN_LIST,
@@ -321,17 +322,19 @@ SCH_RESTORE_CACHE_DICT = {
321
322
  def _get_device(gwy: Gateway, dev_id: DeviceIdT, **kwargs: Any) -> Device: # , **traits
322
323
  """Get a device from the gateway.
323
324
 
324
- Raise a LookupError if a device_id is filtered out by a list.
325
+ Raise a LookupError if a device_id is filtered out by the known or block list.
325
326
 
326
327
  The underlying method is wrapped only to provide a better error message.
327
328
  """
328
329
 
329
330
  def check_filter_lists(dev_id: DeviceIdT) -> None:
330
- """Raise an LookupError if a device_id is filtered out by a list."""
331
+ """Raise a LookupError if a device_id is filtered out by a list."""
331
332
 
332
333
  err_msg = None
333
334
  if gwy._enforce_known_list and dev_id not in gwy._include:
334
335
  err_msg = f"it is in the {SZ_SCHEMA}, but not in the {SZ_KNOWN_LIST}"
336
+ # issue ramses_cc #296: if enforce_known_list is turned on, error on any "unknown" dev_id
337
+ # fix: delete from schema?
335
338
  if dev_id in gwy._exclude:
336
339
  err_msg = f"it is in the {SZ_SCHEMA}, but also in the {SZ_BLOCK_LIST}"
337
340
 
ramses_rf/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """RAMSES RF - a RAMSES-II protocol decoder & analyser (application layer)."""
2
2
 
3
- __version__ = "0.51.7"
3
+ __version__ = "0.51.8"
4
4
  VERSION = __version__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ramses_rf
3
- Version: 0.51.7
3
+ Version: 0.51.8
4
4
  Summary: A stateful RAMSES-II protocol decoder & analyser.
5
5
  Project-URL: Homepage, https://github.com/ramses-rf/ramses_rf
6
6
  Project-URL: Bug Tracker, https://github.com/ramses-rf/ramses_rf/issues
@@ -29,13 +29,13 @@ Description-Content-Type: text/markdown
29
29
  - (Heat) **evohome**, **Sundial**, **Hometronic**, **Chronotherm**
30
30
  - (HVAC) **Itho**, **Orcon**, **Nuaire**, **Vasco**, **ClimaRad**
31
31
 
32
- It requires a USB-to-RF device, either a Honeywell HGI80 (somewhat rare, expensive) or something running the [evofw3](https://github.com/ghoti57/evofw3) firmware, such as the one from [here](https://indalo-tech.onlineweb.shop/) or your own ESP32-S3-WROOM-1 N16R8 with a CC1100 transponder.
32
+ It requires a USB-to-RF device, either a Honeywell HGI80 (somewhat rare, expensive) or a USB/MQTT dongle running the [ramses_esp](https://github.com/IndaloTech/ramses_esp) or [evofw3](https://github.com/ghoti57/evofw3) firmware, such as the one from [here](https://indalo-tech.onlineweb.shop/) or your own ESP32-S3-WROOM-1 N16R8 with a CC1100 transponder.
33
33
 
34
34
  It does four things:
35
35
  - decodes RAMSES II-compatible packets and converts them into useful JSON
36
36
  - builds a picture (schema, config & state) of evohome-compatible CH/DHW systems - either passively (by eavesdropping), or actively (probing)
37
- - allows you to send commands to CH/DHW and HVAC systems, or monitor for state changes
38
- - allows you to emulate some hardware devices
37
+ - allows you to send commands to CH/DHW and HVAC systems, or monitor them for state changes
38
+ - allows you to emulate some hardware devices (remotes)
39
39
 
40
40
  > [!WARNING]
41
41
  > This library is not affiliated with Honeywell, Airios nor any final manufacturer. The developers take no responsibility for anything that may happen to your devices because of this library.
@@ -45,9 +45,9 @@ For CH/DHW, the simplest way to know if it will work with your system is to iden
45
45
  - **BDR91A**: Wireless Relay (also BDR91T)
46
46
  - **HC60NG**: Wireless Relay (older hardware)
47
47
 
48
- Other systems may well work, such as some Itho Daalderop HVAC systems, use this protocol, YMMV.
48
+ Other systems may well work, such as some Itho Daalderop HVAC systems, use this protocol. YMMV.
49
49
 
50
- It includes a CLI and can be used as a standalone tool, but also is used as a client library by:
50
+ This library includes a CLI and can be used as a standalone tool, but also is used as a client library by:
51
51
  - [ramses_cc](https://github.com/ramses-rf/ramses_cc), a Home Assistant integration
52
52
  - [evohome-Listener](https://github.com/smar000/evohome-Listener), an MQTT gateway
53
53
 
@@ -4,52 +4,52 @@ ramses_cli/debug.py,sha256=vgR0lOHoYjWarN948dI617WZZGNuqHbeq6Tc16Da7b4,608
4
4
  ramses_cli/discovery.py,sha256=81XbmpNiCpUHVZBwo2g1eRwyJG-wZhpSsc44G3hHlFA,12972
5
5
  ramses_cli/utils/cat_slow.py,sha256=AhUpM5gnegCitNKU-JGHn-DrRzSi-49ZR1Qw6lxe_t8,607
6
6
  ramses_cli/utils/convert.py,sha256=D_YiCyX5na9pgC-_NhBlW9N1dgRKUK-uLtLBfofjzZM,1804
7
- ramses_rf/__init__.py,sha256=zONFBiRdf07cPTSxzr2V3t-b3CGokZjT9SGit4JUKRA,1055
7
+ ramses_rf/__init__.py,sha256=VG3E9GHbtC6lx6E1DMQJeFitHnydMKJyPxQBethdrzg,1193
8
8
  ramses_rf/binding_fsm.py,sha256=uZAOl3i19KCXqqlaLJWkEqMMP7NJBhVPW3xTikQD1fY,25996
9
9
  ramses_rf/const.py,sha256=L3z31CZ-xqno6oZp_h-67CB_5tDDqTwSWXsqRtsjMcs,5460
10
10
  ramses_rf/database.py,sha256=ZZZgucyuU1IHsSewGukZfDg2gu8KeNaEFriWKM0TUHs,10287
11
11
  ramses_rf/dispatcher.py,sha256=JGkqSi1o-YhQ2rj8tNkXwYLLeJIC7F061xpHoH8sSsM,11201
12
- ramses_rf/entity_base.py,sha256=V9m_Q5SOLP5ko3sok0NDvyz3YdYch1QsxM6tHCIE7cA,39212
13
- ramses_rf/exceptions.py,sha256=rzVZDcYxFH7BjUAQ3U1fHWtgBpwk3BgjX1TO1L1iM8c,2538
14
- ramses_rf/gateway.py,sha256=WdIIGgs87CYfXwSCSVb2YzqOgLC7W4bkpulWQb7PFNw,20564
12
+ ramses_rf/entity_base.py,sha256=Byt8mFRUKETNiKHaL0cNaMywjLcopDG3Sldiy1Q7lAo,39213
13
+ ramses_rf/exceptions.py,sha256=mt_T7irqHSDKir6KLaf6oDglUIdrw0S40JbOrWJk5jc,3657
14
+ ramses_rf/gateway.py,sha256=s2bhkUzR42mzL4lZ1crTBsEWMOMGI8tpuHN1UZdAB74,20564
15
15
  ramses_rf/helpers.py,sha256=TNk_QkpIOB3alOp1sqnA9LOzi4fuDCeapNlW3zTzNas,4250
16
16
  ramses_rf/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- ramses_rf/schemas.py,sha256=mYOUZOH5OIDNBxRM2vd8POzDWEEmLhxh5UtqjTpFNek,13287
18
- ramses_rf/version.py,sha256=4EfbWfYC4nSL7JCP_xnhFTpV6Yt5Vc4kNosAUW-CKNs,125
17
+ ramses_rf/schemas.py,sha256=UhvRhV4nZ3kvrLLM3wwIguQUIjIgd_AKvp2wkTSpNEA,13468
18
+ ramses_rf/version.py,sha256=PUTZH-D81qyH8onRDdeZzxGwuCVDzMYTbItYAp9NKKI,125
19
19
  ramses_rf/device/__init__.py,sha256=sUbH5dhbYFXSoM_TPFRutpRutBRpup7_cQ9smPtDTy8,4858
20
20
  ramses_rf/device/base.py,sha256=WGkBTUNjRUEe-phxdtdiXVCZnTi6-i1i_YT6g689UTM,17450
21
21
  ramses_rf/device/heat.py,sha256=2sCsggySVcuTzyXDmgWy76QbhlU5MQWSejy3zgI5BDE,54242
22
- ramses_rf/device/hvac.py,sha256=H_PUfG_jrrvJgtnu6Bco6PLxHn7CHALwebZzZI1ygFo,23917
22
+ ramses_rf/device/hvac.py,sha256=uKljqweushvpHwRTiYfR26YST6--KAIp8X9zyiRv9HI,45607
23
23
  ramses_rf/system/__init__.py,sha256=uZLKio3gLlBzePa2aDQ1nxkcp1YXOGrn6iHTG8LiNIw,711
24
24
  ramses_rf/system/faultlog.py,sha256=GdGmVGT3137KsTlV_nhccgIFEmYu6DFsLTn4S-8JSok,12799
25
25
  ramses_rf/system/heat.py,sha256=3jaFEChU-HlWCRMY1y7u09s7AH4hT0pC63hnqwdmZOc,39223
26
26
  ramses_rf/system/schedule.py,sha256=Ts6tdZPTQLV5NkgwA73tPa5QUsnZNIIuYoKC-8VsXDk,18808
27
27
  ramses_rf/system/zones.py,sha256=9AH7ooN5QfiqvWuor2P1Dn8aILjQb2RWL9rWqDH1IjA,36075
28
- ramses_tx/__init__.py,sha256=4FsVOzICJ4H80LJ0MknZCN0_V-g0k1nMkHUQ0IdrJW8,3161
28
+ ramses_tx/__init__.py,sha256=qNMTe8hBkIuecvtCiekUB0pKdD8atb0SjWxVNVe3yhE,3538
29
29
  ramses_tx/address.py,sha256=5swDr_SvOs1CxBmT-iJpldf8R00mOb7gKPMiEnxLz84,8452
30
- ramses_tx/command.py,sha256=y69y9NYgQHuPbm7h6xC0osf3e1YIKY9jwmsfPiJ8N6U,58348
30
+ ramses_tx/command.py,sha256=r9dNaofjjOQXZSUrZjsNpvEukNn4rSGy0OLr2Dyd2TI,125129
31
31
  ramses_tx/const.py,sha256=QmwSS4BIN3ZFrLUiiFScP1RCUHuJ782V3ycRPQTtB_c,30297
32
32
  ramses_tx/exceptions.py,sha256=FJSU9YkvpKjs3yeTqUJX1o3TPFSe_B01gRGIh9b3PNc,2632
33
33
  ramses_tx/fingerprints.py,sha256=nfftA1E62HQnb-eLt2EqjEi_la0DAoT0wt-PtTMie0s,11974
34
34
  ramses_tx/frame.py,sha256=9lUVh8gAMXNRAolfFw2WuWANjn24AWkmscuM9Tm5imE,22036
35
35
  ramses_tx/gateway.py,sha256=TXLYwT6tFpmSokD29Qyj1ze7UGCxKidooeyP557Jfoo,11266
36
- ramses_tx/helpers.py,sha256=0VAJ505kpq4K9b9ZeskWI1o2sWwyCbdnKOKZviKFdgY,32913
36
+ ramses_tx/helpers.py,sha256=J4OCRckp3JshGQTvvqEskFjB1hPS7uA_opVsuIqmZds,32915
37
37
  ramses_tx/logger.py,sha256=qYbUoNPnPaFWKVsYvLG6uTVuPTdZ8HsMzBbGx0DpBqc,10177
38
38
  ramses_tx/message.py,sha256=hl_gLfwrF79ftUNnsgNt3XGsIhM2Pts0MtZZuGjfaxk,13169
39
39
  ramses_tx/opentherm.py,sha256=58PXz9l5x8Ou6Fm3y-R_UnGHCYahoi2RKIDdYStUMzk,42378
40
40
  ramses_tx/packet.py,sha256=NGunaGCkEjhTp9t4mARK5e7kbqT-Z_JKCH7ibMYMJXU,7357
41
- ramses_tx/parsers.py,sha256=PVTbPqcYPUko3BKDaOQoFDwIo4LWAUx5kfRb2KURAMI,109917
42
- ramses_tx/protocol.py,sha256=ifj3qwcQivjQDaQUwM94xp-U8Pmef6zwSH7mav8DLWA,28867
43
- ramses_tx/protocol_fsm.py,sha256=YhHkTqbl8w-myimsOjV50uIFgg9HiApwPU7xA_jg5nU,26827
41
+ ramses_tx/parsers.py,sha256=c6D3NB79vZfOGpVmrHc-EhSh4_N4tKljBp1J3HFfkXw,109950
42
+ ramses_tx/protocol.py,sha256=9R3aCzuiWEyXmugmB5tyR_RhBlgfnpUXj7AsMP9BzzU,28867
43
+ ramses_tx/protocol_fsm.py,sha256=ZKtehCr_4TaDdfdlfidFLJaOVTYtaEq5h4tLqNIhb9s,26827
44
44
  ramses_tx/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
- ramses_tx/ramses.py,sha256=9R-JrInORWUNMPklrAPQWwtr_2aaruQmFqQPw5mFkrE,52223
46
- ramses_tx/schemas.py,sha256=h2AcArVROy1_C4n6F0Crj4e-2BxXxH74xogFlc6nKHI,12769
45
+ ramses_tx/ramses.py,sha256=DujcZe4WelHvPNKYfoz9YWmXNoCayV5UsAkiu8Y6vms,53432
46
+ ramses_tx/schemas.py,sha256=18IPRdoCWXpcRg4v8Z1ehTnRronQPYGrf4AvRL-1OD0,12932
47
47
  ramses_tx/transport.py,sha256=MwPnkQ0L-2qJt4mIJy3-C9XmHwBDjT7Kg-1LthPByVw,58331
48
48
  ramses_tx/typed_dicts.py,sha256=w-0V5t2Q3GiNUOrRAWiW9GtSwbta_7luME6GfIb1zhI,10869
49
49
  ramses_tx/typing.py,sha256=eF2SlPWhNhEFQj6WX2AhTXiyRQVXYnFutiepllYl2rI,5042
50
- ramses_tx/version.py,sha256=hWp2I2S7p1_tlItYBqDNAFpsM7kL_J8xYU-6mC2e_Ws,123
51
- ramses_rf-0.51.7.dist-info/METADATA,sha256=w3QiOIRJncgPc3R3h1MaxjMDOjzm0NYBHFEoeAr6o6A,3909
52
- ramses_rf-0.51.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
- ramses_rf-0.51.7.dist-info/entry_points.txt,sha256=NnyK29baOCNg8DinPYiZ368h7MTH7bgTW26z2A1NeIE,50
54
- ramses_rf-0.51.7.dist-info/licenses/LICENSE,sha256=-Kc35W7l1UkdiQ4314_yVWv7vDDrg7IrJfMLUiq6Nfs,1074
55
- ramses_rf-0.51.7.dist-info/RECORD,,
50
+ ramses_tx/version.py,sha256=kLXw7G-2GHtLEZnlOm_5jj8TGeibQYmH_NZ9F7FVHAU,123
51
+ ramses_rf-0.51.8.dist-info/METADATA,sha256=JmxHDvvXI3gRkt2zHELxS9G3ZaMyOn8bOvaraq5_0Ro,4000
52
+ ramses_rf-0.51.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
53
+ ramses_rf-0.51.8.dist-info/entry_points.txt,sha256=NnyK29baOCNg8DinPYiZ368h7MTH7bgTW26z2A1NeIE,50
54
+ ramses_rf-0.51.8.dist-info/licenses/LICENSE,sha256=-Kc35W7l1UkdiQ4314_yVWv7vDDrg7IrJfMLUiq6Nfs,1074
55
+ ramses_rf-0.51.8.dist-info/RECORD,,
ramses_tx/__init__.py CHANGED
@@ -43,8 +43,18 @@ from .logger import set_pkt_logging
43
43
  from .message import Message
44
44
  from .packet import PKT_LOGGER, Packet
45
45
  from .protocol import PortProtocol, ReadProtocol, protocol_factory
46
- from .ramses import CODES_BY_DEV_SLUG, CODES_SCHEMA
47
- from .schemas import SZ_SERIAL_PORT, DeviceIdT, DeviceListT
46
+ from .ramses import (
47
+ _2411_PARAMS_SCHEMA,
48
+ CODES_BY_DEV_SLUG,
49
+ CODES_SCHEMA,
50
+ SZ_DATA_TYPE,
51
+ SZ_DATA_UNIT,
52
+ SZ_DESCRIPTION,
53
+ SZ_MAX_VALUE,
54
+ SZ_MIN_VALUE,
55
+ SZ_PRECISION,
56
+ )
57
+ from .schemas import SZ_BOUND_TO, SZ_SERIAL_PORT, DeviceIdT, DeviceListT
48
58
  from .transport import (
49
59
  FileTransport,
50
60
  PortTransport,
@@ -76,6 +86,15 @@ __all__ = [
76
86
  "SZ_ZONE_IDX",
77
87
  "SZ_ZONE_MASK",
78
88
  "SZ_ZONE_TYPE",
89
+ "SZ_BOUND_TO",
90
+ # Schema-related constants
91
+ "SZ_DATA_UNIT",
92
+ "SZ_DESCRIPTION",
93
+ "SZ_DATA_TYPE",
94
+ "SZ_MAX_VALUE",
95
+ "SZ_MIN_VALUE",
96
+ "SZ_PRECISION",
97
+ "_2411_PARAMS_SCHEMA",
79
98
  #
80
99
  "ALL_DEV_ADDR",
81
100
  "ALL_DEVICE_ID",
@@ -153,8 +172,10 @@ def extract_known_hgi_id(
153
172
  /,
154
173
  *,
155
174
  disable_warnings: bool = False,
156
- strick_checking: bool = False,
175
+ strict_checking: bool = False,
157
176
  ) -> DeviceIdT | None:
158
177
  return PortProtocol._extract_known_hgi_id(
159
- include_list, disable_warnings=disable_warnings, strick_checking=strick_checking
178
+ include_list,
179
+ disable_warnings=disable_warnings,
180
+ strict_checking=strict_checking,
160
181
  )