Skip to content

Commit 42b4856

Browse files
committed
improve docs
1 parent b1e88df commit 42b4856

7 files changed

Lines changed: 123 additions & 9 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Start here if this is your first time setting up the stack:
4949
2. [Home Assistant](docs/home_assistant.md) if you want to install the stack as a Home Assistant add-on instead of Docker Compose.
5050
3. [Cloudflare setup](docs/cloudflare_setup.md) if you want Cloudflare DNS-01 auto-renew for certificates.
5151
4. [Onboarding](docs/onboarding.md) to pair a vacuum from a second machine after the server is running.
52+
5. [Updating](docs/updating.md) if you already have an install and are moving to a newer stable release.
5253

5354
Before choosing a certificate path, check [Tested vacuums](docs/tested_vacuums.md). Different models do not all accept the same certificate chains. For most users, start with ZeroSSL. Use Actalis mainly for older vacuums or models that are already known to trust that chain more reliably.
5455

@@ -59,6 +60,7 @@ Additional docs:
5960
- [Tested vacuums](docs/tested_vacuums.md)
6061
- [Home Assistant](docs/home_assistant.md) for the add-on install path and Home Assistant integration rewiring
6162
- [Using the Roborock App](docs/roborock_app.md)
63+
- [Updating](docs/updating.md)
6264
- [Custom MQTT](docs/custom_mqtt.md)
6365
- [Custom certificate management](docs/custom_cert_management.md)
6466

docs/home_assistant.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,27 @@ If you need the MITM protocol sync secret for the Roborock app flow, sign in to
7171

7272
This applies whether your local stack is running via Docker Compose or via the Home Assistant add-on.
7373

74-
1. Open your Home Assistant configuration directory and locate `.storage/core.config_entries`.
74+
### Existing Roborock Integration
7575

76-
On many Home Assistant systems this file is at `/config/.storage/core.config_entries`.
76+
Use this flow when the Roborock integration already exists in Home Assistant.
7777

78-
2. Find the Roborock entry and replace the endpoint values with your local stack URLs:
78+
1. Make sure the local stack is running and has a cloud import snapshot from the same Roborock account used by the Home Assistant integration.
79+
80+
2. OPTIONAL but useful: confirm the local protocol login works from a shell on the Home Assistant host or another machine that can reach the stack:
81+
82+
```bash
83+
curl -sk -X POST "https://api-roborock.example.com:555/api/v5/auth/email/login/code" \
84+
-H "Content-Type: application/json" \
85+
-d '{"email":"you@example.com","code":"123456"}'
86+
```
87+
88+
Replace `you@example.com` with `protocol_login_email` and `123456` with `protocol_login_pin`. A successful response includes `data.rriot.r.a`, `data.rriot.r.l`, and `data.rriot.r.m` pointing at your local stack.
89+
90+
3. Disable the Roborock integration in Home Assistant.
91+
92+
On many Home Assistant systems this file is at `/config/.storage/core.config_entries`. The file is rewritten while Home Assistant is running, so make the edit while the Roborock integration is stopped.
93+
94+
5. Find the Roborock entry and replace the endpoint values with your local stack URLs:
7995

8096
- `username` -> the email configured as `protocol_login_email` (you likely don't need to change this)
8197
- `base_url` -> `https://api-roborock.example.com:555`
@@ -85,22 +101,31 @@ This applies whether your local stack is running via Docker Compose or via the H
85101

86102
The current server advertises the same hostname for HTTPS and MQTT/TLS, so `"m"` should normally use the same `stack_fqdn`, not a separate `mqtt-...` hostname.
87103

88-
3. If you changed `https_port` or `mqtt_tls_port`, use those values instead.
104+
6. If you changed `https_port` or `mqtt_tls_port`, use those values instead.
105+
106+
7. Restart Home Assistant (Or start it if you had it stopped).
89107

90-
4. Restart Home Assistant so the integration reloads the updated endpoints.
108+
8. Enable the Roborock integration.
91109

92-
5. Reconfigure the Roborock integration in Home Assistant and complete the code login:
110+
9. Reconfigure the Roborock integration and complete the code login:
93111

94112
- The account email must be the value configured as `protocol_login_email`.
95113
- Use the 6 digit `protocol_login_pin` as the code.
96114

97115
Reauth updates the stored Roborock `user_data`, including the MQTT credentials derived from `rriot`.
98116

117+
The **Reconfigure** action may not appear until Home Assistant has loaded the edited local endpoint data. If you do not see it, check that the integration was stopped while editing `.storage/core.config_entries`, then restart Home Assistant and open the integration again.
118+
99119
### First Time Home Assistant Setup
100120

101-
Home Assistant currently creates a Roborock config entry through the official Roborock login flow. If you have never added the Roborock integration before, create the integration once with the official Roborock API, then stop the integration and edit `.storage/core.config_entries` as described above.
121+
Home Assistant currently creates a Roborock config entry through the official Roborock login flow. If you have never added the Roborock integration before:
122+
123+
1. Add the Roborock integration once with the official Roborock API.
124+
2. Disable the integration.
125+
3. Edit `.storage/core.config_entries` as described above.
126+
4. Start Home Assistant, enable the integration, then run **Reconfigure** and enter your local PIN.
102127

103-
After editing the endpoints and restarting Home Assistant, run **Reconfigure** on the Roborock integration and enter your local PIN. Home Assistant derives the MQTT username and password from `rriot.u`, `rriot.s`, and `rriot.k`; stale values commonly show up in the local server logs as:
128+
Home Assistant derives the MQTT username and password from `rriot.u`, `rriot.s`, and `rriot.k`; stale values commonly show up in the local server logs as:
104129

105130
```text
106131
rejected MQTT CONNECT reason=invalid_mqtt_credentials

docs/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Use this page as the main docs hub for setup, onboarding, and follow-up guides.
1010
- or use [Home Assistant](home_assistant.md) to install the stack as a Home Assistant add-on
1111
3. Use [Cloudflare setup](cloudflare_setup.md) if you want Cloudflare DNS-01 auto-renew for certificates.
1212
4. Run [Onboarding](onboarding.md) from a second machine after the server is running.
13+
5. Use [Updating](updating.md) when moving an existing install to a newer stable release.
1314

1415
## Support This Project
1516

@@ -20,6 +21,7 @@ If you want to support this project, next time you buy a Roborock, use one of my
2021
- [Known limitations](known_limitations.md)
2122
- [Home Assistant](home_assistant.md)
2223
- [Using the Roborock App](roborock_app.md)
24+
- [Updating](updating.md)
2325
- [Tested vacuums](tested_vacuums.md)
2426
- [Custom MQTT](custom_mqtt.md)
2527
- [Custom certificate management](custom_cert_management.md)

docs/installation.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,5 @@ Use [Home Assistant](home_assistant.md) as the installation guide if you want to
159159
- [Onboarding](onboarding.md) for pairing a new vacuum
160160
- [Home Assistant](home_assistant.md) if you want to repoint Home Assistant's Roborock integration to your local stack
161161
- [Using the Roborock App](roborock_app.md) if you want to point the official app at your local stack
162+
- [Updating](updating.md) for upgrading an existing install
162163
- [Docs index](index.md) for the rest of the guides

docs/updating.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Updating
2+
3+
Use this page when moving an existing install to a newer stable release.
4+
5+
## Before Updating
6+
7+
1. Back up your config and data directory.
8+
9+
For Docker Compose installs, this usually means `config.toml`, `secrets/`, and `data/`.
10+
11+
For the Home Assistant add-on, take a Home Assistant backup or copy the add-on config and any certificate files you mounted through `/all_addon_configs/...`.
12+
13+
2. Check the release notes or changelog for the version you are installing.
14+
15+
3. Keep your current `stack_fqdn`, HTTPS port, MQTT/TLS port, certificate mode, and `protocol_login_email` stable unless you intentionally want to repoint clients again.
16+
17+
## Updating From A Stable Or RC Release
18+
19+
If you were already on a stable release such as `0.0.5`, `0.0.6`, `1.0.0`, or a late release candidate, updating should usually not require manual migration.
20+
21+
After updating:
22+
23+
1. Start the stack.
24+
2. Open `/admin`.
25+
3. Confirm the expected vacuums are still listed.
26+
4. Confirm Home Assistant or the Roborock app can still connect.
27+
28+
If Home Assistant reports MQTT credential failures after the update, run **Reconfigure** on the Roborock integration and enter your local `protocol_login_pin` again.
29+
30+
## Updating From An Older Main-Branch Build
31+
32+
If you ran an early development build from `main`, compare your config with the current `config.example.toml` in the repository root. The stable stack expects the current config shape.
33+
34+
In particular, check that:
35+
36+
- `network.stack_fqdn` is your `api-...` hostname.
37+
- `network.https_port` and `network.mqtt_tls_port` match the ports you publish.
38+
- `broker.mode` is either `embedded` or `external`.
39+
- `tls.mode` is either `cloudflare_acme` or `provided`.
40+
- `admin.password_hash`, `admin.session_secret`, `admin.protocol_login_email`, and `admin.protocol_login_pin_hash` are present.
41+
42+
If your config is missing required fields, the safest path is to rerun:
43+
44+
```bash
45+
uv run roborock-local-server configure
46+
```
47+
48+
Then copy over only the settings you intentionally want to preserve, such as the hostname, ports, certificate mode, and data directory. But I would honestly recommend starting from scratch. (you may just want to copy over the signature samples to save yourself some time)
49+
50+
## Docker Compose
51+
52+
Pull the current image or rebuild from the updated checkout:
53+
54+
```bash
55+
docker compose pull
56+
docker compose up -d
57+
```
58+
59+
If you build locally instead of pulling the published image:
60+
61+
```bash
62+
git pull
63+
docker compose up -d --build
64+
```
65+
66+
## Home Assistant Add-on
67+
68+
Update the add-on from the Home Assistant Add-on Store, then restart the add-on.
69+
70+
The add-on does not automatically rewrite Home Assistant's Roborock integration entry. If you changed the stack hostname or ports during the update, repeat the endpoint edit in [Home Assistant](home_assistant.md).
71+
72+
## After Updating
73+
74+
Open the admin dashboard and check:
75+
76+
- the server health status
77+
- certificate status
78+
- known vacuums
79+
- recent HTTP and MQTT activity
80+
81+
If routines with zones stop behaving as expected, re-save those routines in the Roborock app so the server refreshes the zone data.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ nav:
5353
- Home Assistant: home_assistant.md
5454
- Cloudflare Setup: cloudflare_setup.md
5555
- Onboarding: onboarding.md
56+
- Updating: updating.md
5657
- Integrations:
5758
- Using the Roborock App: roborock_app.md
5859
- Reference:

roborock_local_server_addon/DOCS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ After the dashboard opens:
3030

3131
This add-on does not auto-edit Home Assistant's Roborock config entry. You still need to update `.storage/core.config_entries` so Home Assistant points at your local stack.
3232

33-
After updating `username`, `base_url`, `rriot.r.a`, `rriot.r.l`, and `rriot.r.m`, restart Home Assistant and use **Reconfigure** on the Roborock integration. Enter `protocol_login_email` as the account and `protocol_login_pin` as the code.
33+
Disable the Roborock integration before editing `.storage/core.config_entries`. Update `username`, `base_url`, `rriot.r.a`, `rriot.r.l`, and `rriot.r.m`, then restart home assistant and enable the integration.
34+
35+
Use **Reconfigure** on the Roborock integration after Home Assistant has loaded the local endpoint data. Enter `protocol_login_email` as the account and `protocol_login_pin` as the code. If **Reconfigure** is not available yet, restart Home Assistant and reopen the integration.
3436

3537
## Notes
3638

0 commit comments

Comments
 (0)