Hi! I’m trying to get a token for the Xiaomi Air Purifier component.
I’ve reviewed the options in the Home Assistant docs and in the linked doc, and I successfully obtained a working token from an unencrypted iPhone backup using iExplorer. However, after reconfiguring my network, the token no longer works. I assume I could obtain another by the same method, but I’d prefer a simpler approach.
I set up mitmproxy
and I can view all traffic sent by the Mi Home app. Does anyone know if it’s possible to obtain a token by inspecting these requests? POST /app/home/rpc/12345678
, for example, includes a serverToken
in the cookie and an accessKey
in the body—I suspect one of these is an encrypted version of the token.