Repository navigation
Forward a robot's Matter key request to Roborock's cloud (opt-in) - #252
Open
virtitnerd wants to merge 2 commits into
Open
virtitnerd wants to merge 2 commits into
virtitnerd wants to merge 2 commits into
Conversation
A robot paired to this server asks it for its Matter key, which only Roborock's cloud issues. With [matter] key_proxy = true (or ROBOROCK_SERVER_MATTER_KEY_PROXY=true) the request is passed on to the regional cloud host with the robot's own headers and the answer is returned unchanged. Off by default. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A robot can only join a Matter controller once it has a Matter key, which Roborock's cloud issues. A robot paired to
the local server asks the local server for it, and nothing answers, so Matter setup fails.
What
When the robot is told to download its key, it calls
GET /iot.roborock.com/fwapi/matter/keyon the server it waspaired to, using the server name with the
api-prefix removed (the same rule the camera follows). With[matter] key_proxy = true(orROBOROCK_SERVER_MATTER_KEY_PROXY=true, which wins) the server passes that request,with the robot's own headers, to the regional cloud host and returns the answer unchanged. Off by default. The log
records header and query names, the answer's status and size, and never values or the key.
The stripped name also needs a DNS record and a certificate. Without the record the robot fails within seconds and no
request ever reaches the server; the new
docs/matter.mdexplains it.Testing
Tests cover the path match, the regional host, the setting and the environment override, and a forwarded request.
Full suite: 462 passed. On a Qrevo Curv 2 Flow the robot went from
KeyNotExitthroughKeyDownloadingtoReadywith a setup code, and a Matter controller (UniFi Network) added it.
Related
#68 (documentation on Matter versus this integration). #229 (the same stripped-hostname mechanism for the camera).