Home Assistant
June 12, 2026 ยท View on GitHub
This page covers two separate Home Assistant tasks:
- installing the local stack as a Home Assistant add-on
- repointing Home Assistant's Roborock integration to a local stack that is already running
Install As A Home Assistant Add-on
This is an installation method, not a post-install integration step. The add-on uses the same container image as the Docker deployment:
ghcr.io/python-roborock/local_roborock_server
Before configuring the add-on, check Tested Vacuums.
Different vacuums do not all trust the same certificate chains. Use that page to decide whether this install should use:
tls_mode = cloudflare_acmewithacme_server = zerossltls_mode = cloudflare_acmewithacme_server = actalistls_mode = providedwith your owncert_fileandkey_file
For most users, prefer acme_server = zerossl. Use actalis mainly for older vacuums or when the tested-vacuum guidance for your model specifically points to it.
Install Steps
-
Open the Home Assistant Add-on Store.
-
Add this repository under Repositories:
https://github.com/Python-roborock/local_roborock_server
-
Install Roborock Local Server.
-
Fill the add-on options:
stack_fqdnhttps_portmqtt_tls_portregionadmin_passwordprotocol_login_emailprotocol_login_pin- TLS settings:
tls_mode = providedwith explicitcert_fileandkey_file- or
tls_mode = cloudflare_acmewithtls_base_domain,tls_email, andcloudflare_token - optional ACME CA selection with
acme_server(zerosslis the preferred default for most users) - if
acme_server = actalis, also setacme_eab_kidandacme_eab_hmac_key.
-
Start the add-on.
Then open the admin dashboard at your configured stack hostname, for example:
https://api-roborock.example.com:555/admin
Do not use the Home Assistant UI hostname unless it is the same hostname covered by the TLS certificate you configured for stack_fqdn.
After the dashboard opens, complete the same post-start steps as the Docker install:
- Use the admin dashboard cloud import to fetch your Roborock account data.
- Confirm the expected vacuum appears in the inventory.
- Run Onboarding from a second machine to pair the vacuum to the local stack.
If you need the MITM protocol sync secret for the Roborock app flow, sign in to the admin page and open Protocol Auth. The dashboard shows the active admin.session_secret, so you do not need to inspect /data/config.toml manually.
Add-on Behavior
- The add-on always runs the embedded MQTT broker and keeps the topic bridge enabled.
- The add-on terminates TLS itself and publishes two ports: HTTPS on
https_portand MQTT/TLS onmqtt_tls_port. - If you already manage certificates in another Home Assistant add-on such as Nginx Proxy Manager, you can point
cert_fileandkey_fileat those PEM files through/all_addon_configs/.... Nginx Proxy Manager is mainly useful here as a certificate source or admin/API HTTPS convenience; it does not remove the need for a reachable MQTT/TLS port. See Reverse Proxy. - Installing the add-on does not automatically rewrite Home Assistant's Roborock integration entry.
Repoint The Home Assistant Roborock Integration
This applies whether your local stack is running via Docker Compose or via the Home Assistant add-on.
Existing Roborock Integration
Use this flow when the Roborock integration already exists in Home Assistant.
-
Make sure the local stack is running and has a cloud import snapshot from the same Roborock account used by the Home Assistant integration.
-
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:
curl -sk -X POST "https://api-roborock.example.com:555/api/v5/auth/email/login/code" \ -H "Content-Type: application/json" \ -d '{"email":"you@example.com","code":"123456"}'Replace
you@example.comwithprotocol_login_emailand123456withprotocol_login_pin. A successful response includesdata.rriot.r.a,data.rriot.r.l, anddata.rriot.r.mpointing at your local stack. -
Disable the Roborock integration in Home Assistant.
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. -
Find the Roborock entry and replace the endpoint values with your local stack URLs:
username-> the email configured asprotocol_login_email(you likely don't need to change this)base_url->https://api-roborock.example.com:555"a"->https://api-roborock.example.com:555"l"->https://api-roborock.example.com:555"m"->ssl://api-roborock.example.com:8881
The current server advertises the same hostname for HTTPS and MQTT/TLS, so
"m"should normally use the samestack_fqdn, not a separatemqtt-...hostname. -
If you changed
https_portormqtt_tls_port, use those values instead. -
Restart Home Assistant (Or start it if you had it stopped).
-
Enable the Roborock integration.
-
Reconfigure the Roborock integration and complete the code login:
- The account email must be the value configured as
protocol_login_email. - Use the 6 digit
protocol_login_pinas the code.
Reauth updates the stored Roborock
user_data, including the MQTT credentials derived fromrriot. - The account email must be the value configured as
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.
First Time Home Assistant Setup
Home Assistant currently creates a Roborock config entry through the official Roborock login flow. If you have never added the Roborock integration before:
- Add the Roborock integration once with the official Roborock API.
- Disable the integration.
- Edit
.storage/core.config_entriesas described above. - Start Home Assistant, enable the integration, then run Reconfigure 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:
rejected MQTT CONNECT reason=invalid_mqtt_credentials
If you see that message after reauth, check that:
- the local server has a cloud import snapshot from the same Roborock account as the Home Assistant entry
base_url,rriot.r.a,rriot.r.l, andrriot.r.mall point at the local stack- Home Assistant was fully restarted after editing
.storage/core.config_entries - Reconfigure completed with
protocol_login_emailandprotocol_login_pin