Skip to content

Commit 615aa3d

Browse files
authored
Merge branch 'main' into chore/qrevo2-pro-device-data
2 parents 3503e25 + c245569 commit 615aa3d

20 files changed

Lines changed: 1034 additions & 32 deletions

‎CHANGELOG.md‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,46 @@
22

33
<!-- version list -->
44

5+
## v7.23.1 (2026-11-15)
6+
7+
### Bug Fixes
8+
9+
- Correct unknown model families in device catalogue
10+
([#1029](https://github.com/Python-roborock/python-roborock/pull/1029),
11+
[`fe38922`](https://github.com/Python-roborock/python-roborock/commit/fe38922a0b98635398ee7879564f3dc5cc44f8ba))
12+
13+
- Report unknown product families in device info
14+
([#1029](https://github.com/Python-roborock/python-roborock/pull/1029),
15+
[`fe38922`](https://github.com/Python-roborock/python-roborock/commit/fe38922a0b98635398ee7879564f3dc5cc44f8ba))
16+
17+
18+
## v7.23.0 (2026-11-15)
19+
20+
### Features
21+
22+
- **camera**: Expose V1 camera signaling commands
23+
([#1023](https://github.com/Python-roborock/python-roborock/pull/1023),
24+
[`b77c102`](https://github.com/Python-roborock/python-roborock/commit/b77c1026d54b99d338f27dd611fb2915612ea97f))
25+
26+
27+
## v7.22.2 (2026-11-15)
28+
29+
### Bug Fixes
30+
31+
- **b01**: Reassemble fragmented B01/Q7 live map responses
32+
([#1048](https://github.com/Python-roborock/python-roborock/pull/1048),
33+
[`1fd6b5e`](https://github.com/Python-roborock/python-roborock/commit/1fd6b5efdf071ace9738866b18e2343c2beb0bee))
34+
35+
36+
## v7.22.1 (2026-11-14)
37+
38+
### Bug Fixes
39+
40+
- Wrap empty cleaning record responses as parsing errors
41+
([#1034](https://github.com/Python-roborock/python-roborock/pull/1034),
42+
[`590ba8c`](https://github.com/Python-roborock/python-roborock/commit/590ba8cc0e94350e3c2a12c28ab26d50730e897b))
43+
44+
545
## v7.22.0 (2026-11-09)
646

747
### Bug Fixes

‎device_info.yaml‎

Lines changed: 129 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1277,7 +1277,7 @@ roborock.vacuum.s5e:
12771277
- 125
12781278
roborock.vacuum.sc05:
12791279
protocol_version: B01
1280-
product_nickname: PEARLPLUS
1280+
product_nickname: Unknown
12811281
product:
12821282
id: 5ayEx3aKgStqZZ0v5IpMBP
12831283
name: Roborock Q7 Series
@@ -1455,7 +1455,7 @@ roborock.vacuum.sc05:
14551455
property: 'null'
14561456
roborock.vacuum.a288:
14571457
protocol_version: '1.0'
1458-
product_nickname: PEARLPLUS
1458+
product_nickname: Unknown
14591459
new_feature_info: 4499197267967999
14601460
new_feature_info_str: 0000000000099518CCFF7EFDA8E93EDDDBFF8F7F7EFEFFFF
14611461
feature_info:
@@ -1608,7 +1608,7 @@ roborock.vacuum.a288:
16081608

16091609
roborock.vacuum.ss07:
16101610
protocol_version: B01
1611-
product_nickname: PEARLPLUS
1611+
product_nickname: Unknown
16121612
product:
16131613
id: 3gKDz7BnDrjXOVBAEXj4uw
16141614
name: Roborock Q10 Series
@@ -1766,3 +1766,129 @@ roborock.vacuum.ss07:
17661766
mode: rw
17671767
type: ENUM
17681768
property: '{"range": ["0,1"]}'
1769+
roborock.vacuum.a144:
1770+
protocol_version: '1.0'
1771+
product_nickname: CORALPRO
1772+
new_feature_info: 4499197267967999
1773+
new_feature_info_str: 0005075028ED3EDDCFFF8F7F7EFEFFFF
1774+
feature_info:
1775+
- 111
1776+
- 112
1777+
- 113
1778+
- 114
1779+
- 115
1780+
- 116
1781+
- 117
1782+
- 118
1783+
- 119
1784+
- 120
1785+
- 121
1786+
- 122
1787+
- 123
1788+
- 124
1789+
- 125
1790+
product:
1791+
id: 2p7GFUkE4SOOSIO5HfDQpS
1792+
name: Saros 10R
1793+
model: roborock.vacuum.a144
1794+
category: robot.vacuum.cleaner
1795+
capability: 0
1796+
schema:
1797+
- id: 101
1798+
name: rpc_request
1799+
code: rpc_request
1800+
mode: rw
1801+
type: RAW
1802+
- id: 102
1803+
name: rpc_response
1804+
code: rpc_response
1805+
mode: rw
1806+
type: RAW
1807+
- id: 120
1808+
name: "\u9519\u8BEF\u4EE3\u7801"
1809+
code: error_code
1810+
mode: ro
1811+
type: ENUM
1812+
property: '{"range": [""]}'
1813+
- id: 121
1814+
name: "\u8BBE\u5907\u72B6\u6001"
1815+
code: state
1816+
mode: ro
1817+
type: ENUM
1818+
property: '{"range": [""]}'
1819+
- id: 122
1820+
name: "\u8BBE\u5907\u7535\u91CF"
1821+
code: battery
1822+
mode: ro
1823+
type: ENUM
1824+
property: '{"range": [""]}'
1825+
- id: 123
1826+
name: "\u6E05\u626B\u6A21\u5F0F"
1827+
code: fan_power
1828+
mode: rw
1829+
type: ENUM
1830+
property: '{"range": [""]}'
1831+
- id: 124
1832+
name: "\u62D6\u5730\u6A21\u5F0F"
1833+
code: water_box_mode
1834+
mode: rw
1835+
type: ENUM
1836+
property: '{"range": [""]}'
1837+
- id: 125
1838+
name: "\u4E3B\u5237\u5BFF\u547D"
1839+
code: main_brush_life
1840+
mode: rw
1841+
type: VALUE
1842+
property: '{"max": 100, "min": 0, "step": 1, "unit": "null", "scale": 1}'
1843+
- id: 126
1844+
name: "\u8FB9\u5237\u5BFF\u547D"
1845+
code: side_brush_life
1846+
mode: rw
1847+
type: VALUE
1848+
property: '{"max": 100, "min": 0, "step": 1, "unit": "null", "scale": 1}'
1849+
- id: 127
1850+
name: "\u6EE4\u7F51\u5BFF\u547D"
1851+
code: filter_life
1852+
mode: rw
1853+
type: VALUE
1854+
property: '{"max": 100, "min": 0, "step": 1, "unit": "null", "scale": 1}'
1855+
- id: 128
1856+
name: "\u989D\u5916\u72B6\u6001"
1857+
code: additional_props
1858+
mode: ro
1859+
type: RAW
1860+
- id: 130
1861+
name: "\u5B8C\u6210\u4E8B\u4EF6"
1862+
code: task_complete
1863+
mode: ro
1864+
type: RAW
1865+
- id: 131
1866+
name: "\u7535\u91CF\u4E0D\u8DB3\u4EFB\u52A1\u53D6\u6D88"
1867+
code: task_cancel_low_power
1868+
mode: ro
1869+
type: RAW
1870+
- id: 132
1871+
name: "\u8FD0\u52A8\u4E2D\u4EFB\u52A1\u53D6\u6D88"
1872+
code: task_cancel_in_motion
1873+
mode: ro
1874+
type: RAW
1875+
- id: 133
1876+
name: "\u5145\u7535\u72B6\u6001"
1877+
code: charge_status
1878+
mode: ro
1879+
type: RAW
1880+
- id: 134
1881+
name: "\u70D8\u5E72\u72B6\u6001"
1882+
code: drying_status
1883+
mode: ro
1884+
type: RAW
1885+
- id: 135
1886+
name: "\u79BB\u7EBF\u539F\u56E0\u7EC6\u5206"
1887+
code: offline_status
1888+
mode: ro
1889+
type: RAW
1890+
- id: 139
1891+
name: "\u56DE\u57FA\u7AD9\u76EE\u7684"
1892+
code: back_type
1893+
mode: ro
1894+
type: RAW

‎docs/CAMERA_PROTOCOL.md‎

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,51 @@ Camera viewing is protected by a separate PIN / pattern lock configured in the m
129129

130130
## Commands Reference
131131

132+
### Library command interface
133+
134+
Camera-equipped V1 vacuums expose `device.v1_properties.camera` after feature
135+
discovery, gated by `is_video_monitor_supported`. It is `None` on unsupported
136+
devices. The device manager also restricts V1 traits to V1 vacuum products.
137+
138+
`CameraTrait` sends preview control, quality selection, TURN requests, SDP/ICE
139+
exchange, and voice chat control through the existing cloud MQTT channel.
140+
Cloud connectivity is required even when the robot is reachable locally.
141+
PIN hashes and WebRTC signaling therefore pass through Roborock's cloud.
142+
A single channel strategy prevents a PIN attempt that fails or times out on
143+
one connection from being sent again through local/cloud fallback.
144+
145+
It adds no WebRTC dependency and does not open a media connection. Callers
146+
provide PIN/pattern digits, not a precomputed hash. Use a unique caller-owned
147+
`client_id` for the session, and close any other viewer first.
148+
149+
```python
150+
from contextlib import suppress
151+
152+
from roborock.exceptions import RoborockException
153+
154+
camera = device.v1_properties.camera
155+
if camera is not None:
156+
await camera.start_preview(client_id="my-viewer", password=camera_pin)
157+
try:
158+
turn_server = await camera.get_turn_server()
159+
# Create a WebRTC peer using turn_server, then exchange SDP and ICE.
160+
# get_sdp_answer() returns None for "retry"; bound polling in the caller.
161+
finally:
162+
# Best-effort cleanup must not mask an earlier signaling failure.
163+
with suppress(RoborockException):
164+
await camera.stop_preview()
165+
```
166+
167+
`stop_preview()` is not scoped to a client ID. Call it after a successful
168+
start, rather than automatically stopping after an explicit start rejection.
169+
If starting times out, the robot may already have activated the camera;
170+
the caller must decide how to reconcile or clean up that ambiguous session.
171+
172+
The caller owns polling deadlines, ICE deduplication and session teardown.
173+
If voice chat is started, stop it before stopping preview. No polling tasks,
174+
listeners, media objects or session credentials are retained by the trait.
175+
The streaming/session manager is a separate layer to be added later.
176+
132177
See also [V1_API_COMMANDS.md](V1_API_COMMANDS.md) for general V1 device RPC references.
133178

134179
> [!NOTE]

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-roborock"
3-
version = "7.22.0"
3+
version = "7.23.1"
44
description = "A package to control Roborock vacuums."
55
authors = [{ name = "humbertogontijo", email = "humbertogontijo@users.noreply.github.com" }, {name="Lash-L"}, {name="allenporter"}]
66
requires-python = ">=3.11, <4"

‎roborock/callbacks.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,11 @@ def decoder_callback(
121121

122122
def wrapper(data: K) -> None:
123123
if not (messages := decoder(data)):
124-
logger.debug("Failed to decode message: %s", data)
124+
logger.debug("Failed to decode message of type %s", type(data).__name__)
125125
return
126126
for message in messages:
127-
logger.debug("Decoded message: %s", message)
127+
# Decrypted payloads can contain credentials; log only their shape.
128+
logger.debug("Decoded message of type %s", type(message).__name__)
128129
safe_cb(message)
129130

130131
return wrapper

‎roborock/cli.py‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,11 +1203,10 @@ async def get_device_info(ctx: click.Context, record: bool, device_info_file: st
12031203
click.echo(f" - Skipping duplicate model {model}")
12041204
continue
12051205

1206+
product_nickname = SHORT_MODEL_TO_ENUM.get(model.split(".")[-1])
12061207
current_product_data = {
12071208
"protocol_version": device.device_info.pv,
1208-
"product_nickname": device.product.product_nickname.name
1209-
if device.product.product_nickname
1210-
else "Unknown",
1209+
"product_nickname": product_nickname.name if product_nickname else "Unknown",
12111210
}
12121211
if device.v1_properties is not None:
12131212
try:

‎roborock/devices/rpc/b01_q7_channel.py‎

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
ParamsType,
1919
Q7RequestMessage,
2020
create_map_key,
21+
create_map_response_assembler,
2122
decode_map_payload,
2223
decode_rpc_response,
2324
encode_mqtt_payload,
@@ -58,15 +59,12 @@ async def subscribe_map_pushes(self, callback: Callable[[bytes], None]) -> Calla
5859
...
5960

6061

61-
def _matches_map_response(response_message: RoborockMessage, *, version: bytes | None) -> bytes | None:
62-
"""Return raw map payload bytes for matching MAP_RESPONSE messages."""
63-
if (
64-
response_message.protocol == RoborockMessageProtocol.MAP_RESPONSE
65-
and response_message.payload
66-
and response_message.version == version
67-
):
68-
return response_message.payload
69-
return None
62+
def _is_map_message(response_message: RoborockMessage) -> bool:
63+
"""Check whether a message is a B01 map response part or final part."""
64+
return response_message.protocol in (
65+
RoborockMessageProtocol.MAP_RESPONSE_PART,
66+
RoborockMessageProtocol.MAP_RESPONSE,
67+
)
7068

7169

7270
async def _send_command(
@@ -172,6 +170,19 @@ class B01Q7Channel(Channel, Q7RpcChannel, Q7MapRpcChannel):
172170
def __init__(self, mqtt_channel: MqttChannel, map_key: MapKey) -> None:
173171
self._mqtt_channel = mqtt_channel
174172
self._map_key = map_key
173+
self._map_assembler = create_map_response_assembler()
174+
175+
def _match_map_response(self, response_message: RoborockMessage) -> bytes | None:
176+
"""Return the complete raw map payload for matching map messages.
177+
178+
Large maps arrive split into several messages; the assembler buffers
179+
the parts and returns the joined payload once the frame is complete.
180+
"""
181+
if not _is_map_message(response_message):
182+
return None
183+
if not response_message.payload or response_message.version != B01_VERSION:
184+
return None
185+
return self._map_assembler(response_message)
175186

176187
@property
177188
def is_connected(self) -> bool:
@@ -205,7 +216,7 @@ async def send_map_command(
205216
raw_payload = await _send_command(
206217
self._mqtt_channel,
207218
request_message,
208-
response_matcher=lambda response_message: _matches_map_response(response_message, version=B01_VERSION),
219+
response_matcher=self._match_map_response,
209220
)
210221
except TimeoutError as ex:
211222
raise RoborockException(f"B01 map command timed out after {_TIMEOUT}s ({request_message})") from ex
@@ -217,10 +228,11 @@ async def subscribe_map_pushes(self, callback: Callable[[bytes], None]) -> Calla
217228
218229
The device streams full SCMap frames on its own during cleaning; the
219230
callback receives the decoded (inflated) SCMap bytes for each frame.
231+
Frames split across several messages are reassembled first.
220232
"""
221233

222234
def on_message(message: RoborockMessage) -> None:
223-
if (raw_payload := _matches_map_response(message, version=B01_VERSION)) is None:
235+
if (raw_payload := self._match_map_response(message)) is None:
224236
return
225237
try:
226238
decoded = decode_map_payload(raw_payload, map_key=self._map_key)

0 commit comments

Comments
 (0)