You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Sync setup fails with unclear "unsupported protocol scheme" error #4
Ok, Now I found the problem.
By reinstalling XiaomiGateway3 integration I found out I had been looking at the wrong config line/token
the correct token is much longer than in my example
Solved, for anyone else who may have done the same mistake:
In order to find the correct token, you need to search for "xiaomi" inside the /config/.storage/core.config_entries file.
I added support for receiving Xiaomi token to my other application - go2rtc.
Perhaps it will be easier for someone to get a token through it.
There is no time to make changes to this application yet.
@nemetila Did you use the token or the ble token for the s400 scale? Do you have a gateway? I tried to set this up, but with no success. I have the tokens, create the json file, but I receive 401.
A device token is needed for a local connection to the device. This isn't the case with this app.
This app works with the cloud. It requires a cloud token.
I entered via go2rtc, and I'm still not sure how to get a token.
I see the config was created in the format
xiaomi:
"1527839602": V1:9d...TA=
I know that "1527839602" - is my account id, I also believe V1:9d...TA= is a token, but if I update SmartScaleConnect config, I still get the same error.
Could you send the whole config in this case?
Should I specify a password in the config?
Should I use the account number or email?
Should I use prefix {"xiaomi:alex@gmail.com":"...token..."}
I tried multiple options, and all of them returned the same error
Unfortunately, it still doesn't work.
Is it correct?
sync_xiaomihome:
from: xiaomihome {"xiaomi:myemail@gmail.com":"1234567890:V1:9d...TA="} MyPassword es yunmai.scales.ms104
to: json all_users_xiaomihome.json
I'm using es because I'm based in Spain, but I tried de,ru,cn, the result is still the same.
Did I do anything wrong?
@AlexxIT I'm using the MiHome app with the Vevs mod. In the app I'm logged in to the CN server and I can see and use the scale.
When I try to change the region to de or the type of the scale here in this tool, I always get load data error: 401 Unauthorized instead of the original 400, so I think the cn part is correct.
Hi @AlexxIT,
First of all, thank you for this awesome project!
I am trying to sync data from my Mijia Body Composition Scale S400 (yunmai.scales.ms103). The container starts, and authentication seems to be successful, but then it immediately crashes with a runtime panic.
@xiaotuzi01 More detailed error text is needed. It usually includes the section of code where the error occurred.
You probably have an incorrect configuration file with the wrong number of parameters.
Activity
AlexxIT commentedon Aug 18, 2025
Yes, you're right. I spent most of my energy on the functionality.
nemetila commentedon Aug 31, 2025
Hi,
I have the same problem with xiaomi home (scale s400). Probably xiaomi account login requires 2FA?
AlexxIT commentedon Sep 2, 2025
Yes. You right. It's about 2FA. Do you have Home Assistant?
nemetila commentedon Sep 3, 2025
Yes, I have HA.
AlexxIT commentedon Sep 3, 2025
Well.
/config/.storage/core.config_entriesand copytokenscaleconnect.json(change your username):{"xiaomi:alex@gmail.com":"...token..."}nemetila commentedon Sep 3, 2025
Thank you. It is OK now.
AlexxIT commentedon Sep 4, 2025
When I have time, I will transfer this functionality to
scaleconnect. But the problem is that the app doesn't have a GUI.henrikmaurin commentedon Oct 6, 2025
I have tried the steps mentioned here, but I get a 401. I really dont know how to troubleshoot further.
scaleconnect.yaml
scaleconnect.json
{"xiaomi:henrik@mydomain.se":"1234567890abcdef1234567890abcdef"}Edit - really having trouble formatting the file contents in this comment. But I beleive the yaml is correctly indented
henrikmaurin commentedon Oct 6, 2025
Ok, Now I found the problem.
By reinstalling XiaomiGateway3 integration I found out I had been looking at the wrong config line/token
the correct token is much longer than in my example
albertofralbe commentedon Oct 13, 2025
Done all of this but still getting the original error, how can I fix it?
AlexxIT commentedon Oct 13, 2025
The file name may be invalid. Or the contents. Or the token may be invalid. It must be very long with colons inside.
albertofralbe commentedon Oct 14, 2025
Solved, for anyone else who may have done the same mistake:
In order to find the correct token, you need to search for "xiaomi" inside the /config/.storage/core.config_entries file.
Thanks @AlexxIT
Tozapid commentedon Oct 26, 2025
Hello @AlexxIT,
I have the same error, but it looks like it is not about 2FA, as I don't have it
Scale: Mi Body Composition Scale 2 (XMTZC05HM)
Error in logs
scaleconnect.yaml
P.s.
Can you please add a debug log level?
2 remaining items
menashe21 commentedon Dec 20, 2025
Can you please add a doc for this?
It is unclear how to do it...
AlexxIT commentedon Jan 8, 2026
I added support for receiving Xiaomi token to my other application - go2rtc.
Perhaps it will be easier for someone to get a token through it.
There is no time to make changes to this application yet.
https://github.com/AlexxIT/go2rtc/blob/master/internal/xiaomi/README.md
gerpetya commentedon Jan 26, 2026
@nemetila Did you use the token or the ble token for the s400 scale? Do you have a gateway? I tried to set this up, but with no success. I have the tokens, create the json file, but I receive 401.
AlexxIT commentedon Jan 26, 2026
A device token is needed for a local connection to the device. This isn't the case with this app.
This app works with the cloud. It requires a cloud token.
gerpetya commentedon Jan 26, 2026
Thanks, sorry, I totally got confused by the Xiaomi cloud token extractor. Now it works with the XiaomiGateway3 token.
Vittt2008 commentedon Jan 27, 2026
I entered via go2rtc, and I'm still not sure how to get a token.
I see the config was created in the format
I know that
"1527839602"- is my account id, I also believeV1:9d...TA=is a token, but if I updateSmartScaleConnectconfig, I still get the same error.{"xiaomi:alex@gmail.com":"...token..."}I tried multiple options, and all of them returned the same error
AlexxIT commentedon Jan 28, 2026
{"xiaomi:email":"1527839602:V1:9d...TA="}Vittt2008 commentedon Jan 28, 2026
Unfortunately, it still doesn't work.
Is it correct?
I'm using
esbecause I'm based in Spain, but I triedde,ru,cn, the result is still the same.Did I do anything wrong?
AlexxIT commentedon Jan 28, 2026
No. It was example of
scaleconnect.jsonfile content.akostmOR commentedon Feb 4, 2026
Hi @AlexxIT ,
I try to export to csv my records from the xiaomi home app with this command.
I have 2FA enabled, so I created a
scaleconnect.jsonnext to he yaml config, which has a content:When I try to run the app on my mac I've got this error:
Can you help what can cause this error?
AlexxIT commentedon Feb 4, 2026
@akostmOR are you sure you should use cn server? You have euro scales. They should not work with the Chinese server.
akostmOR commentedon Feb 4, 2026
@AlexxIT I'm using the MiHome app with the Vevs mod. In the app I'm logged in to the CN server and I can see and use the scale.
When I try to change the region to
deor the type of the scale here in this tool, I always getload data error: 401 Unauthorizedinstead of the original 400, so I think thecnpart is correct.AlexxIT commentedon Feb 4, 2026
I suggested that it would be vevs mode. There was already such a user, but I don’t remember how it ended.
You may not be able to access data for your scales. You may only be able to access data for your user. Check docs for this.
xiaotuzi01 commentedon Oct 24, 2026
Hi @AlexxIT,
First of all, thank you for this awesome project!
I am trying to sync data from my Mijia Body Composition Scale S400 (
yunmai.scales.ms103). The container starts, and authentication seems to be successful, but then it immediately crashes with a runtime panic.Environment:
alexxit/smartscaleconnect:latest(version 0.4.2)yunmai.scales.ms103)cn)2026/10/24 03:37:54 scaleconnect version 0.4.2
panic: runtime error: index out of range [3] with length 2
AlexxIT commentedon Oct 24, 2026
@xiaotuzi01 More detailed error text is needed. It usually includes the section of code where the error occurred.
You probably have an incorrect configuration file with the wrong number of parameters.