python-roborock 2.16.0__tar.gz → 2.17.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.
- {python_roborock-2.16.0 → python_roborock-2.17.0}/PKG-INFO +1 -1
- {python_roborock-2.16.0 → python_roborock-2.17.0}/pyproject.toml +1 -1
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/code_mappings.py +2 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/const.py +2 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/containers.py +2 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/web_api.py +9 -6
- {python_roborock-2.16.0 → python_roborock-2.17.0}/LICENSE +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/README.md +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/__init__.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/api.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/cli.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/cloud_api.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/command_cache.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/exceptions.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/local_api.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/protocol.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/py.typed +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/roborock_future.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/roborock_message.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/roborock_typing.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/util.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/__init__.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/roborock_client_v1.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_a01_apis/__init__.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_a01_apis/roborock_client_a01.py +0 -0
- {python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +0 -0
|
@@ -34,6 +34,7 @@ ROBOROCK_QREVO_MASTER = "roborock.vacuum.a117"
|
|
|
34
34
|
ROBOROCK_QREVO_CURV = "roborock.vacuum.a135"
|
|
35
35
|
ROBOROCK_Q8_MAX = "roborock.vacuum.a73"
|
|
36
36
|
ROBOROCK_G10S_PRO = "roborock.vacuum.a26"
|
|
37
|
+
ROBOROCK_G20S_Ultra = "roborock.vacuum.a143" # cn saros_r10
|
|
37
38
|
ROBOROCK_G10S = "roborock.vacuum.a46"
|
|
38
39
|
ROBOROCK_G10 = "roborock.vacuum.a29"
|
|
39
40
|
ROCKROBO_G10_SG = "roborock.vacuum.a30" # Variant of the G10, has similar features as S7
|
|
@@ -58,6 +59,7 @@ ROBOROCK_DYAD_PRO = "roborock.wetdryvac.a56"
|
|
|
58
59
|
SUPPORTED_VACUUMS = [
|
|
59
60
|
ROBOROCK_G10,
|
|
60
61
|
ROBOROCK_G10S_PRO,
|
|
62
|
+
ROBOROCK_G20S_Ultra,
|
|
61
63
|
ROBOROCK_Q5,
|
|
62
64
|
ROBOROCK_Q7,
|
|
63
65
|
ROBOROCK_Q7_MAX,
|
|
@@ -73,6 +73,7 @@ from .const import (
|
|
|
73
73
|
SENSOR_DIRTY_REPLACE_TIME,
|
|
74
74
|
SIDE_BRUSH_REPLACE_TIME,
|
|
75
75
|
STRAINER_REPLACE_TIME,
|
|
76
|
+
ROBOROCK_G20S_Ultra,
|
|
76
77
|
)
|
|
77
78
|
from .exceptions import RoborockException
|
|
78
79
|
|
|
@@ -665,6 +666,7 @@ ModelStatus: dict[str, type[Status]] = {
|
|
|
665
666
|
ROBOROCK_S8: S8Status,
|
|
666
667
|
ROBOROCK_S8_PRO_ULTRA: S8ProUltraStatus,
|
|
667
668
|
ROBOROCK_G10S_PRO: S7MaxVStatus,
|
|
669
|
+
ROBOROCK_G20S_Ultra: QRevoMasterStatus,
|
|
668
670
|
ROBOROCK_P10: P10Status,
|
|
669
671
|
# These likely are not correct,
|
|
670
672
|
# but i am currently unable to do my typical reverse engineering/ get any data from users on this,
|
|
@@ -36,8 +36,6 @@ class RoborockApiClient:
|
|
|
36
36
|
self._default_url = "https://euiot.roborock.com"
|
|
37
37
|
self.base_url = base_url
|
|
38
38
|
self._device_identifier = secrets.token_urlsafe(16)
|
|
39
|
-
if session is None:
|
|
40
|
-
session = aiohttp.ClientSession()
|
|
41
39
|
self.session = session
|
|
42
40
|
|
|
43
41
|
async def _get_base_url(self) -> str:
|
|
@@ -470,7 +468,9 @@ class RoborockApiClient:
|
|
|
470
468
|
|
|
471
469
|
|
|
472
470
|
class PreparedRequest:
|
|
473
|
-
def __init__(
|
|
471
|
+
def __init__(
|
|
472
|
+
self, base_url: str, session: aiohttp.ClientSession | None = None, base_headers: dict | None = None
|
|
473
|
+
) -> None:
|
|
474
474
|
self.base_url = base_url
|
|
475
475
|
self.base_headers = base_headers or {}
|
|
476
476
|
self.session = session
|
|
@@ -478,10 +478,10 @@ class PreparedRequest:
|
|
|
478
478
|
async def request(self, method: str, url: str, params=None, data=None, headers=None, json=None) -> dict:
|
|
479
479
|
_url = "/".join(s.strip("/") for s in [self.base_url, url])
|
|
480
480
|
_headers = {**self.base_headers, **(headers or {})}
|
|
481
|
+
close_session = self.session is None
|
|
482
|
+
session = self.session if self.session is not None else aiohttp.ClientSession()
|
|
481
483
|
try:
|
|
482
|
-
async with
|
|
483
|
-
method, _url, params=params, data=data, headers=_headers, json=json
|
|
484
|
-
) as resp:
|
|
484
|
+
async with session.request(method, _url, params=params, data=data, headers=_headers, json=json) as resp:
|
|
485
485
|
return await resp.json()
|
|
486
486
|
except ContentTypeError as err:
|
|
487
487
|
"""If we get an error, lets log everything for debugging."""
|
|
@@ -494,3 +494,6 @@ class PreparedRequest:
|
|
|
494
494
|
_LOGGER.info("Resp raw: %s", resp_raw)
|
|
495
495
|
# Still raise the err so that it's clear it failed.
|
|
496
496
|
raise err
|
|
497
|
+
finally:
|
|
498
|
+
if close_session:
|
|
499
|
+
await session.close()
|
|
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.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/roborock_client_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_roborock-2.16.0 → python_roborock-2.17.0}/roborock/version_a01_apis/roborock_client_a01.py
RENAMED
|
File without changes
|
|
File without changes
|