python-roborock 2.9.3__tar.gz → 2.9.4__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.
- {python_roborock-2.9.3 → python_roborock-2.9.4}/PKG-INFO +2 -2
- {python_roborock-2.9.3 → python_roborock-2.9.4}/pyproject.toml +6 -2
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/cloud_api.py +5 -4
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/roborock_message.py +4 -4
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_a01_apis/roborock_client_a01.py +1 -1
- {python_roborock-2.9.3 → python_roborock-2.9.4}/LICENSE +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/README.md +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/__init__.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/api.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/cli.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/code_mappings.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/command_cache.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/const.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/containers.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/exceptions.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/local_api.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/protocol.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/py.typed +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/roborock_future.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/roborock_typing.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/util.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/__init__.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_client_v1.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_mqtt_client_v1.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_a01_apis/__init__.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +0 -0
- {python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/web_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-roborock
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.4
|
|
4
4
|
Summary: A package to control Roborock vacuums.
|
|
5
5
|
License: GPL-3.0-only
|
|
6
6
|
Keywords: roborock,vacuum,homeassistant
|
|
@@ -21,7 +21,7 @@ Requires-Dist: aiohttp (>=3.8.2,<4.0.0)
|
|
|
21
21
|
Requires-Dist: async-timeout
|
|
22
22
|
Requires-Dist: click (>=8)
|
|
23
23
|
Requires-Dist: construct (>=2.10.57,<3.0.0)
|
|
24
|
-
Requires-Dist: paho-mqtt (>=1.6.1,<
|
|
24
|
+
Requires-Dist: paho-mqtt (>=1.6.1,<3.0.0)
|
|
25
25
|
Requires-Dist: pycryptodome (>=3.18,<4.0)
|
|
26
26
|
Requires-Dist: pycryptodomex (>=3.18,<4.0) ; sys_platform == "darwin"
|
|
27
27
|
Requires-Dist: vacuum-map-parser-roborock
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "python-roborock"
|
|
3
|
-
version = "2.9.
|
|
3
|
+
version = "2.9.4"
|
|
4
4
|
description = "A package to control Roborock vacuums."
|
|
5
5
|
authors = ["humbertogontijo <humbertogontijo@users.noreply.github.com>"]
|
|
6
6
|
license = "GPL-3.0-only"
|
|
@@ -27,7 +27,7 @@ aiohttp = "^3.8.2"
|
|
|
27
27
|
async-timeout = "*"
|
|
28
28
|
pycryptodome = "^3.18"
|
|
29
29
|
pycryptodomex = {version = "^3.18", markers = "sys_platform == 'darwin'"}
|
|
30
|
-
paho-mqtt = "
|
|
30
|
+
paho-mqtt = ">=1.6.1,<3.0.0"
|
|
31
31
|
construct = "^2.10.57"
|
|
32
32
|
vacuum-map-parser-roborock = "*"
|
|
33
33
|
|
|
@@ -45,6 +45,8 @@ ruff = "*"
|
|
|
45
45
|
codespell = "*"
|
|
46
46
|
pyshark = "^0.6"
|
|
47
47
|
aioresponses = "^0.7.7"
|
|
48
|
+
freezegun = "^1.5.1"
|
|
49
|
+
pytest-timeout = "^2.3.1"
|
|
48
50
|
|
|
49
51
|
[tool.semantic_release]
|
|
50
52
|
branch = "main"
|
|
@@ -70,3 +72,5 @@ select=["E", "F", "UP", "I"]
|
|
|
70
72
|
|
|
71
73
|
[tool.pytest.ini_options]
|
|
72
74
|
asyncio_mode = "auto"
|
|
75
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
76
|
+
timeout = 20
|
|
@@ -82,6 +82,8 @@ class RoborockMqttClient(RoborockClient, ABC):
|
|
|
82
82
|
self._logger.error(message)
|
|
83
83
|
if connection_queue:
|
|
84
84
|
connection_queue.set_exception(VacuumError(message))
|
|
85
|
+
else:
|
|
86
|
+
self._logger.debug("Failed to notify connect future, not in queue")
|
|
85
87
|
return
|
|
86
88
|
self._logger.info(f"Connected to mqtt {self._mqtt_host}:{self._mqtt_port}")
|
|
87
89
|
topic = f"rr/m/o/{self._mqtt_user}/{self._hashed_user}/{self.device_info.device.duid}"
|
|
@@ -154,10 +156,9 @@ class RoborockMqttClient(RoborockClient, ABC):
|
|
|
154
156
|
async def async_disconnect(self) -> None:
|
|
155
157
|
async with self._mutex:
|
|
156
158
|
if disconnected_future := self.sync_disconnect():
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
raise RoborockException(err) from err
|
|
159
|
+
# There are no errors set on this future
|
|
160
|
+
await disconnected_future
|
|
161
|
+
await self.event_loop.run_in_executor(None, self._mqtt_client.loop_stop)
|
|
161
162
|
|
|
162
163
|
async def async_connect(self) -> None:
|
|
163
164
|
async with self._mutex:
|
|
@@ -3,7 +3,7 @@ from __future__ import annotations
|
|
|
3
3
|
import json
|
|
4
4
|
import math
|
|
5
5
|
import time
|
|
6
|
-
from dataclasses import dataclass
|
|
6
|
+
from dataclasses import dataclass, field
|
|
7
7
|
|
|
8
8
|
from roborock import RoborockEnum
|
|
9
9
|
from roborock.util import get_next_int
|
|
@@ -155,10 +155,10 @@ class MessageRetry:
|
|
|
155
155
|
class RoborockMessage:
|
|
156
156
|
protocol: RoborockMessageProtocol
|
|
157
157
|
payload: bytes | None = None
|
|
158
|
-
seq: int = get_next_int(100000, 999999)
|
|
158
|
+
seq: int = field(default_factory=lambda: get_next_int(100000, 999999))
|
|
159
159
|
version: bytes = b"1.0"
|
|
160
|
-
random: int = get_next_int(10000, 99999)
|
|
161
|
-
timestamp: int = math.floor(time.time())
|
|
160
|
+
random: int = field(default_factory=lambda: get_next_int(10000, 99999))
|
|
161
|
+
timestamp: int = field(default_factory=lambda: math.floor(time.time()))
|
|
162
162
|
message_retry: MessageRetry | None = None
|
|
163
163
|
|
|
164
164
|
def get_request_id(self) -> int | None:
|
{python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_a01_apis/roborock_client_a01.py
RENAMED
|
@@ -128,8 +128,8 @@ class RoborockClientA01(RoborockClient, ABC):
|
|
|
128
128
|
continue
|
|
129
129
|
payload_json = json.loads(payload.decode())
|
|
130
130
|
for data_point_number, data_point in payload_json.get("dps").items():
|
|
131
|
-
self._logger.debug("data point number=%s", data_point_number)
|
|
132
131
|
data_point_protocol: RoborockDyadDataProtocol | RoborockZeoProtocol
|
|
132
|
+
self._logger.debug("received msg with dps, protocol: %s, %s", data_point_number, protocol)
|
|
133
133
|
entries: dict
|
|
134
134
|
if self.category == RoborockCategory.WET_DRY_VAC:
|
|
135
135
|
data_point_protocol = RoborockDyadDataProtocol(int(data_point_number))
|
|
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
|
{python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_client_v1.py
RENAMED
|
File without changes
|
{python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_local_client_v1.py
RENAMED
|
File without changes
|
{python_roborock-2.9.3 → python_roborock-2.9.4}/roborock/version_1_apis/roborock_mqtt_client_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|