python-roborock 2.2.3__tar.gz → 2.3.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.2.3 → python_roborock-2.3.0}/PKG-INFO +1 -1
- {python_roborock-2.2.3 → python_roborock-2.3.0}/pyproject.toml +1 -1
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/code_mappings.py +5 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/web_api.py +24 -8
- {python_roborock-2.2.3 → python_roborock-2.3.0}/LICENSE +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/README.md +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/__init__.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/api.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/cli.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/cloud_api.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/command_cache.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/const.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/containers.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/exceptions.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/local_api.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/protocol.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/py.typed +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/roborock_future.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/roborock_message.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/roborock_typing.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/util.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/__init__.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_client_v1.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_a01_apis/__init__.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_a01_apis/roborock_client_a01.py +0 -0
- {python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +0 -0
|
@@ -248,7 +248,10 @@ class RoborockFanSpeedP10(RoborockFanPowerCode):
|
|
|
248
248
|
|
|
249
249
|
class RoborockFanSpeedS8MaxVUltra(RoborockFanPowerCode):
|
|
250
250
|
off = 105
|
|
251
|
+
quiet = 101
|
|
251
252
|
balanced = 102
|
|
253
|
+
turbo = 103
|
|
254
|
+
max = 104
|
|
252
255
|
custom = 106
|
|
253
256
|
max_plus = 108
|
|
254
257
|
smart_mode = 110
|
|
@@ -324,6 +327,7 @@ class RoborockMopIntensityS8MaxVUltra(RoborockMopIntensityCode):
|
|
|
324
327
|
low = 201
|
|
325
328
|
medium = 202
|
|
326
329
|
high = 203
|
|
330
|
+
custom = 204
|
|
327
331
|
max = 208
|
|
328
332
|
smart_mode = 209
|
|
329
333
|
custom_water_flow = 207
|
|
@@ -395,6 +399,7 @@ class RoborockDockWashTowelModeCode(RoborockEnum):
|
|
|
395
399
|
light = 0
|
|
396
400
|
balanced = 1
|
|
397
401
|
deep = 2
|
|
402
|
+
smart = 10
|
|
398
403
|
|
|
399
404
|
|
|
400
405
|
class RoborockCategory(Enum):
|
|
@@ -3,11 +3,13 @@ from __future__ import annotations
|
|
|
3
3
|
import base64
|
|
4
4
|
import hashlib
|
|
5
5
|
import hmac
|
|
6
|
+
import logging
|
|
6
7
|
import math
|
|
7
8
|
import secrets
|
|
8
9
|
import time
|
|
9
10
|
|
|
10
11
|
import aiohttp
|
|
12
|
+
from aiohttp import ContentTypeError
|
|
11
13
|
|
|
12
14
|
from roborock.containers import HomeData, HomeDataRoom, ProductResponse, RRiot, UserData
|
|
13
15
|
from roborock.exceptions import (
|
|
@@ -23,6 +25,8 @@ from roborock.exceptions import (
|
|
|
23
25
|
RoborockUrlException,
|
|
24
26
|
)
|
|
25
27
|
|
|
28
|
+
_LOGGER = logging.getLogger(__name__)
|
|
29
|
+
|
|
26
30
|
|
|
27
31
|
class RoborockApiClient:
|
|
28
32
|
def __init__(self, username: str, base_url=None) -> None:
|
|
@@ -294,11 +298,23 @@ class PreparedRequest:
|
|
|
294
298
|
_url = "/".join(s.strip("/") for s in [self.base_url, url])
|
|
295
299
|
_headers = {**self.base_headers, **(headers or {})}
|
|
296
300
|
async with aiohttp.ClientSession() as session:
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
301
|
+
try:
|
|
302
|
+
async with session.request(
|
|
303
|
+
method,
|
|
304
|
+
_url,
|
|
305
|
+
params=params,
|
|
306
|
+
data=data,
|
|
307
|
+
headers=_headers,
|
|
308
|
+
) as resp:
|
|
309
|
+
return await resp.json()
|
|
310
|
+
except ContentTypeError as err:
|
|
311
|
+
"""If we get an error, lets log everything for debugging."""
|
|
312
|
+
try:
|
|
313
|
+
resp_json = await resp.json(content_type=None)
|
|
314
|
+
_LOGGER.info("Resp: %s", resp_json)
|
|
315
|
+
except ContentTypeError as err_2:
|
|
316
|
+
_LOGGER.info(err_2)
|
|
317
|
+
resp_raw = await resp.read()
|
|
318
|
+
_LOGGER.info("Resp raw: %s", resp_raw)
|
|
319
|
+
# Still raise the err so that it's clear it failed.
|
|
320
|
+
raise err
|
|
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
|
{python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_client_v1.py
RENAMED
|
File without changes
|
{python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_local_client_v1.py
RENAMED
|
File without changes
|
{python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_1_apis/roborock_mqtt_client_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_roborock-2.2.3 → python_roborock-2.3.0}/roborock/version_a01_apis/roborock_client_a01.py
RENAMED
|
File without changes
|
|
File without changes
|