pyotgw 2.2.2__tar.gz → 2.2.3__tar.gz
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.
- {pyotgw-2.2.2 → pyotgw-2.2.3}/PKG-INFO +14 -2
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/connection.py +14 -12
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/status.py +1 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw.egg-info/PKG-INFO +14 -2
- {pyotgw-2.2.2 → pyotgw-2.2.3}/setup.py +1 -1
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_messageprocessor.py +13 -19
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_status.py +2 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/LICENSE +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/README.md +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/__init__.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/commandprocessor.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/messageprocessor.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/messages.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/protocol.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/pyotgw.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw/vars.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw.egg-info/SOURCES.txt +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw.egg-info/dependency_links.txt +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw.egg-info/requires.txt +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/pyotgw.egg-info/top_level.txt +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/setup.cfg +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_commandprocessor.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_connection.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_messages.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_protocol.py +0 -0
- {pyotgw-2.2.2 → pyotgw-2.2.3}/tests/test_pyotgw.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyotgw
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: A library to interface with the opentherm gateway through serial or network connection.
|
|
5
5
|
Home-page: https://github.com/mvn23/pyotgw
|
|
6
6
|
Author: Milan van Nugteren
|
|
@@ -14,6 +14,18 @@ Requires-Python: >=3.8
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: pyserial-asyncio-fast
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: keywords
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
Dynamic: summary
|
|
17
29
|
|
|
18
30
|
[](https://travis-ci.org/mvn23/pyotgw)
|
|
19
31
|
|
|
@@ -112,18 +112,19 @@ class ConnectionManager: # pylint: disable=too-many-instance-attributes
|
|
|
112
112
|
self._retry_timeout = MIN_RETRY_TIMEOUT
|
|
113
113
|
while transport is None:
|
|
114
114
|
try:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
self.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
115
|
+
(
|
|
116
|
+
transport,
|
|
117
|
+
protocol,
|
|
118
|
+
) = await serial_asyncio_fast.create_serial_connection(
|
|
119
|
+
loop,
|
|
120
|
+
partial(
|
|
121
|
+
OpenThermProtocol,
|
|
122
|
+
self._otgw.status,
|
|
123
|
+
self.watchdog.inform,
|
|
124
|
+
),
|
|
125
|
+
self._port,
|
|
126
|
+
write_timeout=0,
|
|
127
|
+
**self._config,
|
|
127
128
|
)
|
|
128
129
|
await asyncio.wait_for(
|
|
129
130
|
protocol.init_and_wait_for_activity(),
|
|
@@ -169,6 +170,7 @@ class ConnectionManager: # pylint: disable=too-many-instance-attributes
|
|
|
169
170
|
async def _cleanup(self):
|
|
170
171
|
"""Cleanup possible leftovers from old connections"""
|
|
171
172
|
await self.watchdog.stop()
|
|
173
|
+
self._otgw.status.reset()
|
|
172
174
|
if self.protocol:
|
|
173
175
|
await self.protocol.cleanup()
|
|
174
176
|
if self._connecting_task is not None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pyotgw
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.3
|
|
4
4
|
Summary: A library to interface with the opentherm gateway through serial or network connection.
|
|
5
5
|
Home-page: https://github.com/mvn23/pyotgw
|
|
6
6
|
Author: Milan van Nugteren
|
|
@@ -14,6 +14,18 @@ Requires-Python: >=3.8
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: pyserial-asyncio-fast
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: keywords
|
|
24
|
+
Dynamic: license
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
Dynamic: summary
|
|
17
29
|
|
|
18
30
|
[](https://travis-ci.org/mvn23/pyotgw)
|
|
19
31
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Test for pyotgw/messageprocessor.py"""
|
|
2
|
+
|
|
2
3
|
import asyncio
|
|
3
4
|
import logging
|
|
4
5
|
import re
|
|
@@ -103,7 +104,7 @@ async def test_process_msgs(caplog, pygw_message_processor):
|
|
|
103
104
|
"B",
|
|
104
105
|
v.READ_ACK,
|
|
105
106
|
b"\x23",
|
|
106
|
-
b"\
|
|
107
|
+
b"\x0a",
|
|
107
108
|
b"\x01",
|
|
108
109
|
)
|
|
109
110
|
with patch.object(
|
|
@@ -155,6 +156,7 @@ async def test_process_msg(pygw_message_processor):
|
|
|
155
156
|
|
|
156
157
|
for test_case, expected_result in pygw_proto_messages:
|
|
157
158
|
pygw_message_processor.status_manager.reset()
|
|
159
|
+
pygw_message_processor.status_manager._updateq.get_nowait()
|
|
158
160
|
await pygw_message_processor._process_msg(test_case)
|
|
159
161
|
if expected_result is not None:
|
|
160
162
|
await called_once(status_callback)
|
|
@@ -304,24 +306,16 @@ async def test_quirk_trset_s2m(pygw_message_processor):
|
|
|
304
306
|
return
|
|
305
307
|
|
|
306
308
|
with patch.object(
|
|
307
|
-
pygw_message_processor.status_manager,
|
|
308
|
-
"submit_partial_update"
|
|
309
|
+
pygw_message_processor.status_manager, "submit_partial_update"
|
|
309
310
|
) as partial_update:
|
|
310
311
|
await pygw_message_processor._quirk_trset_s2m(
|
|
311
312
|
v.THERMOSTAT,
|
|
312
313
|
b"\x01",
|
|
313
314
|
b"\x02",
|
|
314
315
|
)
|
|
315
|
-
await pygw_message_processor._quirk_trset_s2m(
|
|
316
|
-
v.BOILER,
|
|
317
|
-
b"\x14",
|
|
318
|
-
b"\x80"
|
|
319
|
-
)
|
|
316
|
+
await pygw_message_processor._quirk_trset_s2m(v.BOILER, b"\x14", b"\x80")
|
|
320
317
|
|
|
321
|
-
partial_update.assert_called_once_with(
|
|
322
|
-
v.BOILER,
|
|
323
|
-
{v.DATA_ROOM_SETPOINT: 20.5}
|
|
324
|
-
)
|
|
318
|
+
partial_update.assert_called_once_with(v.BOILER, {v.DATA_ROOM_SETPOINT: 20.5})
|
|
325
319
|
|
|
326
320
|
|
|
327
321
|
def test_get_flag8(pygw_message_processor):
|
|
@@ -373,7 +367,7 @@ def test_get_u8(pygw_message_processor):
|
|
|
373
367
|
0,
|
|
374
368
|
),
|
|
375
369
|
(
|
|
376
|
-
b"\
|
|
370
|
+
b"\xff",
|
|
377
371
|
255,
|
|
378
372
|
),
|
|
379
373
|
)
|
|
@@ -390,7 +384,7 @@ def test_get_s8(pygw_message_processor):
|
|
|
390
384
|
0,
|
|
391
385
|
),
|
|
392
386
|
(
|
|
393
|
-
b"\
|
|
387
|
+
b"\xff",
|
|
394
388
|
-1,
|
|
395
389
|
),
|
|
396
390
|
)
|
|
@@ -411,7 +405,7 @@ def test_get_f8_8(pygw_message_processor):
|
|
|
411
405
|
),
|
|
412
406
|
(
|
|
413
407
|
(
|
|
414
|
-
b"\
|
|
408
|
+
b"\xff",
|
|
415
409
|
b"\x80",
|
|
416
410
|
),
|
|
417
411
|
-0.5,
|
|
@@ -434,8 +428,8 @@ def test_get_u16(pygw_message_processor):
|
|
|
434
428
|
),
|
|
435
429
|
(
|
|
436
430
|
(
|
|
437
|
-
b"\
|
|
438
|
-
b"\
|
|
431
|
+
b"\xff",
|
|
432
|
+
b"\xff",
|
|
439
433
|
),
|
|
440
434
|
65535,
|
|
441
435
|
),
|
|
@@ -457,8 +451,8 @@ def test_get_s16(pygw_message_processor):
|
|
|
457
451
|
),
|
|
458
452
|
(
|
|
459
453
|
(
|
|
460
|
-
b"\
|
|
461
|
-
b"\
|
|
454
|
+
b"\xff",
|
|
455
|
+
b"\xff",
|
|
462
456
|
),
|
|
463
457
|
-1,
|
|
464
458
|
),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Tests for pyotgw/status.py"""
|
|
2
|
+
|
|
2
3
|
import asyncio
|
|
3
4
|
import logging
|
|
4
5
|
from unittest.mock import MagicMock
|
|
@@ -21,6 +22,7 @@ def test_reset(pygw_status):
|
|
|
21
22
|
pygw_status.reset()
|
|
22
23
|
|
|
23
24
|
assert pygw_status.status == v.DEFAULT_STATUS
|
|
25
|
+
assert pygw_status._updateq.get_nowait() == v.DEFAULT_STATUS
|
|
24
26
|
assert pygw_status._updateq.empty()
|
|
25
27
|
|
|
26
28
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|