go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Unable to log in to Xiaomi account

Open dest16 opened this issue 1 month ago • 9 comments

Unable to log in to my Xiaomi account; after entering my username and password, I'm stuck in an infinite loop of entering a verification code.

Image

dest16 avatar Dec 16 '25 03:12 dest16

I can verify that this issue exists; it's the same on my end.

ptbsare avatar Dec 16 '25 03:12 ptbsare

My tests didn't have captcha, so I wrote the code blind. You can contact me via Telegram and send me your login/password.

This code works in my other python component. You can use it to get a token: https://github.com/AlexxIT/XiaomiGateway3

After logging into your Xiaomi account, you can find the token here: /config/.storage/core.config_entries line: "token":"1234567890:V1:***"

and add to go2rtc.yaml (add space after userID):

xiaomi:
  1234567890: V1:***

PS. But of course it would be better to fix the authorization in this project.

AlexxIT avatar Dec 16 '25 04:12 AlexxIT

I can verify that this issue exists; it's the same on my end.

me too

Liujinliang0803 avatar Dec 16 '25 07:12 Liujinliang0803

try switch the country to Singapore instead of China.

jchenny7 avatar Dec 16 '25 08:12 jchenny7

My tests didn't have captcha, so I wrote the code blind. You can contact me via Telegram and send me your login/password.

This code works in my other python component. You can use it to get a token: https://github.com/AlexxIT/XiaomiGateway3

After logging into your Xiaomi account, you can find the token here: /config/.storage/core.config_entries line: "token":"1234567890:V1:***"

and add to go2rtc.yaml (add space after userID):

xiaomi: 1234567890: V1:*** PS. But of course it would be better to fix the authorization in this project.

After pasting the ID and token obtained from xiaomigateway3 into the go2rtc config file, saving and restarting, I can see the Xiaomi account with the corresponding ID. However, clicking "load devices" results in a 401 error.

dest16 avatar Dec 16 '25 09:12 dest16

You don't need to select a server to log in! The server is used only to retrieve the list of devices.

AlexxIT avatar Dec 16 '25 09:12 AlexxIT

@dest16 Perhaps you copied something incorrectly. I'm sure the tokens are fully compatible. But the format is slightly different (separated by space).

AlexxIT avatar Dec 16 '25 09:12 AlexxIT

@dest16 Perhaps you copied something incorrectly. I'm sure the tokens are fully compatible. But the format is slightly different (separated by space).也许你抄错了什么。我相信这些代币是完全兼容的。但格式稍有不同(被空格分隔)。

My bad, I didn't notice the newline character in the token. This method works.

dest16 avatar Dec 16 '25 09:12 dest16

streams:
  camera_outdoor:
    - rtsp://************@10.10.10.200:554/Streaming/Channels/101
  outdoor_preview:
    - rtsp://*********@10.10.10.200:554/Streaming/Channels/102
  xiaomi_c200:
    - xiaomi://4258882842:[email protected]?did=1148772601&model=chuangmi.camera.046c04

Then the token. If I open the camera stream, I get an error. Where is my mistake?

mse: streams: miss: read auth: {"result":"failed","code":3}

vector-co-uz avatar Dec 16 '25 15:12 vector-co-uz

it's the same with me

gujiangjiang avatar Dec 23 '25 12:12 gujiangjiang

It won't be fixed until I have an account where I can replicate the issue.

AlexxIT avatar Dec 23 '25 14:12 AlexxIT