HAP-python 4.9.2__tar.gz → 5.0.0__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.
- hap_python-5.0.0/AUTHORS +6 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/PKG-INFO +12 -12
- {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/SOURCES.txt +1 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/requires.txt +3 -1
- hap_python-5.0.0/MANIFEST.in +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/PKG-INFO +12 -12
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/accessory.py +3 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/accessory_driver.py +8 -3
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/camera.py +390 -308
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/characteristic.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/const.py +4 -4
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/encoder.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_crypto.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_handler.py +11 -5
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_protocol.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/iid_manager.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/loader.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/state.py +2 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/tlv.py +2 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/util.py +9 -3
- {hap_python-4.9.2 → hap_python-5.0.0}/pyproject.toml +53 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/setup.cfg +0 -3
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_accessory.py +9 -11
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_accessory_driver.py +49 -67
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_camera.py +3 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_characteristic.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_encoder.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_crypto.py +0 -1
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_handler.py +15 -15
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_protocol.py +20 -24
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hap_server.py +8 -13
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_iid_manager.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_loader.py +1 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_service.py +18 -12
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_state.py +23 -14
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_util.py +1 -0
- hap_python-4.9.2/MANIFEST.in +0 -2
- hap_python-4.9.2/setup.py +0 -68
- {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/dependency_links.txt +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/HAP_python.egg-info/top_level.txt +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/LICENSE +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/README.md +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/__init__.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_event.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hap_server.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/hsrp.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/params.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/characteristics.json +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/services.json +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/resources/snapshot.jpg +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/pyhap/service.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_hsrp.py +0 -0
- {hap_python-4.9.2 → hap_python-5.0.0}/tests/test_tlv.py +0 -0
hap_python-5.0.0/AUTHORS
ADDED
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: HAP-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: HomeKit Accessory Protocol implementation in python
|
|
5
|
-
|
|
6
|
-
License: Apache
|
|
5
|
+
Author: Ivan Kalchev
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Source, https://github.com/ikalchev/HAP-python
|
|
7
8
|
Project-URL: Bug Reports, https://github.com/ikalchev/HAP-python/issues
|
|
8
9
|
Project-URL: Documentation, http://hap-python.readthedocs.io/en/latest/
|
|
9
|
-
Project-URL: Source, https://github.com/ikalchev/HAP-python/tree/master
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
13
|
Classifier: Natural Language :: English
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
20
|
Classifier: Topic :: Home Automation
|
|
23
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.9
|
|
25
23
|
Description-Content-Type: text/markdown
|
|
26
24
|
License-File: LICENSE
|
|
27
|
-
|
|
25
|
+
License-File: AUTHORS
|
|
26
|
+
Requires-Dist: async_timeout; python_version < "3.11"
|
|
28
27
|
Requires-Dist: cryptography
|
|
29
28
|
Requires-Dist: chacha20poly1305-reuseable
|
|
30
29
|
Requires-Dist: orjson>=3.7.2
|
|
@@ -33,6 +32,7 @@ Requires-Dist: h11
|
|
|
33
32
|
Provides-Extra: qrcode
|
|
34
33
|
Requires-Dist: base36; extra == "qrcode"
|
|
35
34
|
Requires-Dist: pyqrcode; extra == "qrcode"
|
|
35
|
+
Dynamic: license-file
|
|
36
36
|
|
|
37
37
|
[](https://badge.fury.io/py/HAP-python) [](https://github.com/ikalchev/HAP-python) [](https://codecov.io/gh/ikalchev/HAP-python) [](https://pypi.python.org/pypi/HAP-python/) [](http://hap-python.readthedocs.io/en/latest/?badge=latest) [](https://pepy.tech/project/hap-python)
|
|
38
38
|
# HAP-python
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
recursive-include pyhap/resources *
|
|
@@ -1,30 +1,29 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: HAP-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 5.0.0
|
|
4
4
|
Summary: HomeKit Accessory Protocol implementation in python
|
|
5
|
-
|
|
6
|
-
License: Apache
|
|
5
|
+
Author: Ivan Kalchev
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Source, https://github.com/ikalchev/HAP-python
|
|
7
8
|
Project-URL: Bug Reports, https://github.com/ikalchev/HAP-python/issues
|
|
8
9
|
Project-URL: Documentation, http://hap-python.readthedocs.io/en/latest/
|
|
9
|
-
Project-URL: Source, https://github.com/ikalchev/HAP-python/tree/master
|
|
10
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
11
|
Classifier: Intended Audience :: Developers
|
|
12
12
|
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
13
|
Classifier: Natural Language :: English
|
|
15
14
|
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
20
15
|
Classifier: Programming Language :: Python :: 3.9
|
|
21
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
20
|
Classifier: Topic :: Home Automation
|
|
23
21
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
-
Requires-Python: >=3.
|
|
22
|
+
Requires-Python: >=3.9
|
|
25
23
|
Description-Content-Type: text/markdown
|
|
26
24
|
License-File: LICENSE
|
|
27
|
-
|
|
25
|
+
License-File: AUTHORS
|
|
26
|
+
Requires-Dist: async_timeout; python_version < "3.11"
|
|
28
27
|
Requires-Dist: cryptography
|
|
29
28
|
Requires-Dist: chacha20poly1305-reuseable
|
|
30
29
|
Requires-Dist: orjson>=3.7.2
|
|
@@ -33,6 +32,7 @@ Requires-Dist: h11
|
|
|
33
32
|
Provides-Extra: qrcode
|
|
34
33
|
Requires-Dist: base36; extra == "qrcode"
|
|
35
34
|
Requires-Dist: pyqrcode; extra == "qrcode"
|
|
35
|
+
Dynamic: license-file
|
|
36
36
|
|
|
37
37
|
[](https://badge.fury.io/py/HAP-python) [](https://github.com/ikalchev/HAP-python) [](https://codecov.io/gh/ikalchev/HAP-python) [](https://pypi.python.org/pypi/HAP-python/) [](http://hap-python.readthedocs.io/en/latest/?badge=latest) [](https://pepy.tech/project/hap-python)
|
|
38
38
|
# HAP-python
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"""Module for the Accessory classes."""
|
|
2
|
+
|
|
2
3
|
import itertools
|
|
3
4
|
import logging
|
|
4
5
|
from typing import TYPE_CHECKING, Any, Callable, Dict, Iterable, List, Optional
|
|
@@ -207,7 +208,8 @@ class Accessory:
|
|
|
207
208
|
int(self.driver.state.pincode.replace(b"-", b""), 10) & 0x7FFFFFFF
|
|
208
209
|
) # pincode
|
|
209
210
|
|
|
210
|
-
|
|
211
|
+
# pylint: disable-next=possibly-used-before-assignment
|
|
212
|
+
encoded_payload = base36.dumps(payload).upper()
|
|
211
213
|
encoded_payload = encoded_payload.rjust(9, "0")
|
|
212
214
|
|
|
213
215
|
return "X-HM://" + encoded_payload + self.driver.state.setup_id
|
|
@@ -15,6 +15,7 @@ one Accessory in it). If so, a task is created to send the event to the subscrib
|
|
|
15
15
|
terminates the call chain and concludes the publishing process from the Characteristic,
|
|
16
16
|
the Characteristic does not block waiting for the actual send to happen.
|
|
17
17
|
"""
|
|
18
|
+
|
|
18
19
|
import asyncio
|
|
19
20
|
import base64
|
|
20
21
|
from collections import defaultdict
|
|
@@ -212,7 +213,7 @@ class AccessoryDriver:
|
|
|
212
213
|
advertised_address=None,
|
|
213
214
|
interface_choice=None,
|
|
214
215
|
async_zeroconf_instance=None,
|
|
215
|
-
zeroconf_server=None
|
|
216
|
+
zeroconf_server=None,
|
|
216
217
|
):
|
|
217
218
|
"""
|
|
218
219
|
Initialize a new AccessoryDriver object.
|
|
@@ -323,7 +324,7 @@ class AccessoryDriver:
|
|
|
323
324
|
and os.name != "nt"
|
|
324
325
|
):
|
|
325
326
|
logger.debug("Setting child watcher")
|
|
326
|
-
watcher = asyncio.SafeChildWatcher()
|
|
327
|
+
watcher = asyncio.SafeChildWatcher() # pylint: disable=deprecated-class
|
|
327
328
|
watcher.attach_loop(self.loop)
|
|
328
329
|
asyncio.set_child_watcher(watcher)
|
|
329
330
|
else:
|
|
@@ -647,7 +648,11 @@ class AccessoryDriver:
|
|
|
647
648
|
mode="w", dir=temp_dir, delete=False
|
|
648
649
|
) as file_handle:
|
|
649
650
|
tmp_filename = file_handle.name
|
|
650
|
-
logger.debug(
|
|
651
|
+
logger.debug(
|
|
652
|
+
"Created temp persist file '%s' named '%s'",
|
|
653
|
+
file_handle,
|
|
654
|
+
tmp_filename,
|
|
655
|
+
)
|
|
651
656
|
self.encoder.persist(file_handle, self.state)
|
|
652
657
|
if (
|
|
653
658
|
os.name == "nt"
|