File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def message_handler(payload: bytes) -> None:
6969 return
7070 for message in messages :
7171 _LOGGER .debug ("Received message: %s" , message )
72- if message .version == b"1.0 " :
72+ if message .version != b"B01 " :
7373 asyncio .create_task (self ._resolve_future_with_lock (message ))
7474 try :
7575 callback (message )
Original file line number Diff line number Diff line change 1313 RoborockMessage ,
1414 RoborockMessageProtocol ,
1515)
16+ from roborock .util import get_next_int
1617
1718_LOGGER = logging .getLogger (__name__ )
1819
2324
2425def encode_mqtt_payload (dps : int , command : CommandType , params : ParamsType ) -> RoborockMessage :
2526 """Encode payload for B01 commands over MQTT."""
26- dps_data = {"dps" : {dps : {"method" : str (command ), "msgId" : "1751755654575" , "params" : params or []}}}
27+ dps_data = {
28+ "dps" : {
29+ dps : {
30+ "method" : str (command ),
31+ "msgId" : str (get_next_int (100000000000 , 999999999999 )),
32+ "params" : params or [],
33+ }
34+ }
35+ }
2736 payload = pad (json .dumps (dps_data ).encode ("utf-8" ), AES .block_size )
2837 return RoborockMessage (
2938 protocol = RoborockMessageProtocol .RPC_REQUEST ,
You can’t perform that action at this time.
0 commit comments