Skip to content

docs: cloud-free provisioning (stable local token via country_domain) - #2095

Open
SahajJain01 wants to merge 1 commit into
rytilahti:masterfrom
SahajJain01:docs/cloud-free-provisioning
Open

SahajJain01 wants to merge 1 commit into
rytilahti:masterfrom
SahajJain01:docs/cloud-free-provisioning

Conversation

@SahajJain01

Copy link
Copy Markdown

Summary

Adds a documentation page describing cloud-free provisioning for miIO Wi-Fi devices.

During pairing, passing a bogus country_domain to miIO.config_router makes the
firmware build a cloud server name <country_domain>.ot.io.mi.com that is
NXDOMAIN (there is no wildcard record). The device then can never reach Xiaomi's
cloud on any network, so the token disclosed at pairing is never re-keyed and
stays usable for local control — with no cloud account and no router-level firewall
rules. The page is wired into the docs toctree.

Why

On current firmware the pairing token is re-keyed the first time the device reaches
Xiaomi's cloud, which is the usual reason a captured token stops working shortly
after setup. This documents a reliable, account-free alternative.

Testing / evidence

Verified on chuangmi.plug.m1 (Marvell MW300, firmware 1.4.5_2):

  • With a normal internet uplink the plug contacted *.ot.io.mi.com:8053 and its
    captured token was rejected within ~2 minutes.
  • Provisioned with country_domain=zz on the same uplink, a packet capture showed
    only failing DNS lookups and no connection to port 8053, and the token kept
    authenticating.

Reference implementation (pairing + control): https://github.com/SahajJain01/miio-cloudfree

Docs-only change; happy to adjust wording or placement. Refs #2094.

🤖 Generated with Claude Code

…y_domain)

Documents how passing a bogus country_domain to miIO.config_router pins the device's
cloud server name to an NXDOMAIN address, so it never reaches Xiaomi and the pairing
token is never re-keyed -- enabling account-free local control with no router rules.
Wired into the docs toctree. Refs rytilahti#2094.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.31%. Comparing base (9a00e08) to head (55ca920).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2095   +/-   ##
=======================================
  Coverage   84.31%   84.31%           
=======================================
  Files         201      201           
  Lines       20656    20656           
  Branches     1121     1121           
=======================================
  Hits        17417    17417           
  Misses       3047     3047           
  Partials      192      192           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant