python-roborock 0.4.8__tar.gz → 0.4.9__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-0.4.8 → python_roborock-0.4.9}/PKG-INFO +1 -1
- {python_roborock-0.4.8 → python_roborock-0.4.9}/pyproject.toml +1 -1
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/cloud_api.py +5 -5
- {python_roborock-0.4.8 → python_roborock-0.4.9}/LICENSE +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/README.md +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/__init__.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/api.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/cli.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/code_mappings.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/containers.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/exceptions.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/local_api.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/offline/offline.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/roborock_queue.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/typing.py +0 -0
- {python_roborock-0.4.8 → python_roborock-0.4.9}/roborock/util.py +0 -0
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
import secrets
|
|
6
6
|
import threading
|
|
7
7
|
from asyncio import Lock
|
|
8
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
9
9
|
from urllib.parse import urlparse
|
|
10
10
|
|
|
11
11
|
import paho.mqtt.client as mqtt
|
|
@@ -22,7 +22,7 @@ from .containers import (
|
|
|
22
22
|
)
|
|
23
23
|
from .roborock_queue import RoborockQueue
|
|
24
24
|
from .typing import (
|
|
25
|
-
RoborockCommand, RoborockDeviceProp,
|
|
25
|
+
RoborockCommand, RoborockDeviceProp, RoborockDeviceInfo,
|
|
26
26
|
)
|
|
27
27
|
from .util import run_in_executor
|
|
28
28
|
|
|
@@ -34,10 +34,10 @@ MQTT_KEEPALIVE = 60
|
|
|
34
34
|
class RoborockMqttClient(RoborockClient, mqtt.Client):
|
|
35
35
|
_thread: threading.Thread
|
|
36
36
|
|
|
37
|
-
def __init__(self, user_data: UserData,
|
|
37
|
+
def __init__(self, user_data: UserData, devices_info: dict[str, RoborockDeviceInfo]) -> None:
|
|
38
38
|
rriot = user_data.rriot
|
|
39
39
|
endpoint = base64.b64encode(md5bin(rriot.endpoint)[8:14]).decode()
|
|
40
|
-
RoborockClient.__init__(self, endpoint,
|
|
40
|
+
RoborockClient.__init__(self, endpoint, devices_info)
|
|
41
41
|
mqtt.Client.__init__(self, protocol=mqtt.MQTTv5)
|
|
42
42
|
self._mqtt_user = rriot.user
|
|
43
43
|
self._hashed_user = md5hex(self._mqtt_user + ":" + rriot.endpoint)[2:10]
|
|
@@ -192,7 +192,7 @@ class RoborockMqttClient(RoborockClient, mqtt.Client):
|
|
|
192
192
|
_LOGGER.debug(f"id={request_id} Requesting method {method} with {params}")
|
|
193
193
|
request_protocol = 101
|
|
194
194
|
response_protocol = 301 if method in SPECIAL_COMMANDS else 102
|
|
195
|
-
msg = super()._encode_msg(device_id, request_protocol, timestamp, payload)
|
|
195
|
+
msg = super()._encode_msg(device_id, request_id, request_protocol, timestamp, payload)
|
|
196
196
|
self._send_msg_raw(device_id, msg)
|
|
197
197
|
(response, err) = await self._async_response(request_id, response_protocol)
|
|
198
198
|
if 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
|