11from __future__ import annotations
22
3- import typing
3+ from typing import Optional
44from dataclasses import dataclass
55from enum import Enum
66
@@ -117,6 +117,12 @@ class RoborockCommand(str, Enum):
117117 GET_ROOM_MAPPING = "get_room_mapping"
118118 NAME_SEGMENT = "name_segment"
119119 SET_TIMEZONE = "set_timezone"
120+ GET_HOMESEC_CONNECT_STATUS = "get_homesec_connect_status"
121+ START_CAMERA_PREVIEW = "start_camera_preview"
122+ GET_TURN_SERVER = "get_turn_server"
123+ GET_DEVICE_ICE = "get_device_ice"
124+ START_VOICE_CHAT = "start_voice_chat"
125+ SEND_SDP_TO_ROBOT = "send_sdp_to_robot"
120126
121127
122128@dataclass
@@ -200,7 +206,11 @@ class CommandInfo:
200206 RoborockCommand .SET_SERVER_TIMER : CommandInfo (prefix = b"\x00 \x00 \x00 \xc7 " ),
201207 RoborockCommand .GET_ROOM_MAPPING : CommandInfo (prefix = b"\x00 \x00 \x00 w" ),
202208 RoborockCommand .NAME_SEGMENT : CommandInfo (prefix = b"\x00 \x00 \x02 7" ),
203- RoborockCommand .SET_TIMEZONE : CommandInfo (prefix = b"\x00 \x00 \x00 \x97 " )
209+ RoborockCommand .SET_TIMEZONE : CommandInfo (prefix = b"\x00 \x00 \x00 \x97 " ),
210+ RoborockCommand .GET_HOMESEC_CONNECT_STATUS : CommandInfo (prefix = b"\x00 \x00 \x00 \x87 " ),
211+ RoborockCommand .START_CAMERA_PREVIEW : CommandInfo (prefix = b"\x00 \x00 \x00 \x87 " ),
212+ RoborockCommand .GET_TURN_SERVER : CommandInfo (prefix = b"\x00 \x00 \x00 \x77 " ),
213+ RoborockCommand .GET_DEVICE_ICE : CommandInfo (prefix = b"\x00 \x00 \x00 \x77 " ),
204214 # TODO discover prefix for following commands
205215 # RoborockCommand.APP_GET_DRYER_SETTING: CommandInfo(prefix=b'\x00\x00\x00w'),
206216 # RoborockCommand.APP_SET_DRYER_SETTING: CommandInfo(prefix=b'\x00\x00\x00w'),
@@ -214,26 +224,21 @@ class CommandInfo:
214224}
215225
216226
227+ @dataclass
217228class RoborockDockSummary :
218- def __init__ (
219- self ,
220- dust_collection_mode : DustCollectionMode ,
221- wash_towel_mode : WashTowelMode ,
222- smart_wash_params : SmartWashParams ,
223- ) -> None :
224- self .dust_collection_mode = dust_collection_mode
225- self .wash_towel_mode = wash_towel_mode
226- self .smart_wash_params = smart_wash_params
229+ dust_collection_mode : Optional [DustCollectionMode ] = None
230+ wash_towel_mode : Optional [WashTowelMode ] = None
231+ smart_wash_params : Optional [SmartWashParams ] = None
227232
228233
229234@dataclass
230235class RoborockDeviceProp :
231- status : typing . Optional [Status ] = None
232- dnd_timer : typing . Optional [DNDTimer ] = None
233- clean_summary : typing . Optional [CleanSummary ] = None
234- consumable : typing . Optional [Consumable ] = None
235- last_clean_record : typing . Optional [CleanRecord ] = None
236- dock_summary : typing . Optional [RoborockDockSummary ] = None
236+ status : Optional [Status ] = None
237+ dnd_timer : Optional [DNDTimer ] = None
238+ clean_summary : Optional [CleanSummary ] = None
239+ consumable : Optional [Consumable ] = None
240+ last_clean_record : Optional [CleanRecord ] = None
241+ dock_summary : Optional [RoborockDockSummary ] = None
237242
238243 def update (self , device_prop : "RoborockDeviceProp" ):
239244 if device_prop .status :
0 commit comments