1
0
mirror of https://github.com/hanxi/xiaomusic.git synced 2026-05-20 11:15:46 +08:00

update doc

This commit is contained in:
涵曦
2026-03-19 23:16:25 +08:00
parent f4a50722d9
commit b0f3f3c67c
39 changed files with 220 additions and 1390 deletions

View File

@@ -1,9 +1,7 @@
---
title: 使用cookie登陆
---
# 使用cookie登陆
> 使用 cookie 登录时不要写填账号密码
## 步骤
@@ -20,66 +18,49 @@ title: 使用cookie登陆
![Image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/681a027f-2007-4e2b-9dda-9046ae79c263)
<img width="758" height="166" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/b53de6d9-d4fd-4cfc-8dd3-6f8f4f63de69" />
## 评论
### 评论 1 - seryte
0.4.12版本测试了使用cookie也无效是不是cookie还未正确读取
<img width="1017" height="374" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/8556270f-b2f3-4b07-a951-656a9b76743c" />
<img width="1263" height="309" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/9bd7be41-df3d-4870-a879-66e2a3ce9575" />
---
### 评论 2 - WGKER
局域网内电脑获取完整cookie填入并且也填写账户密码仍然无法获取设备。
可行的话还是换成跳转小米账户授权登录的方式吧类似小米官方HA插件目前太折腾了。
---
### 评论 3 - gdzjy
0.4.12登录无效,找不到音箱设备。
<img width="1875" height="697" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/4d5c8bd6-fe00-4dca-b4bc-f9539f16790b" />
---
### 评论 4 - swxk521
0.4.12一样不行
---
### 评论 5 - gdzjy
发现回到旧版本也找不到设备了不知是不是小米有ban账号的机制日志如下
<img width="1621" height="523" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/848b635d-34d2-458b-b9b8-3d382ef8a52c" />
<img width="3029" height="1256" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/06cecd23-58ca-426b-86f3-465b04515b9e" />
---
### 评论 6 - hanxi
文档更新了,截图还没更新,可以先看。
---
### 评论 7 - hanxi
下个版本可以不用填账号密码目前0.4.12版本有点bug需要填。
---
### 评论 8 - seryte
> 文档更新了,截图还没更新,可以先看。
也还是不行 😂
@@ -87,17 +68,13 @@ title: 使用cookie登陆
<img width="1896" height="529" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/b3eb56bd-a22f-4664-848d-95ae87262528" />
<img width="983" height="769" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/1669bdf3-f5b5-4285-a5c0-d8b9d9c21cff" />
---
### 评论 9 - hanxi
需要填账号,或者用测试版本。
---
### 评论 10 - seryte
> 需要填账号,或者用测试版本。
`hanxi/xiaomusic main d1d275ae0e98 About an hour ago 341MB`
@@ -108,64 +85,46 @@ title: 使用cookie登陆
<img width="1894" height="947" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/c075364e-9624-4a04-9486-208e246d00ac" />
<img width="1539" height="127" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/3ca27f19-f317-4f69-b723-7ea624db78ff" />
---
### 评论 11 - sam0773
填写cookies时候要加上_utm_data={""}吗?直接复制进去保存时候会弹出[object object]
---
### 评论 12 - figsong
![Image](https://gproxy.hanxi.cc/proxy/user-attachments/assets/b52cb3ca-ffb2-4c85-92be-0803ebb2d252)
0.4.13版单用cookies、cookies加上账号密码依然不能发现设备
---
### 评论 13 - hanxi
需要确保复制的 cookie 中有 userId 和 passToken 两个值。
---
### 评论 14 - hanxi
需要确保复制的 cookie 中有 userId 和 passToken 两个值。
---
### 评论 15 - dyz312
仅使用cookie找的设备了感谢
---
### 评论 16 - xpeagle
4.14也是显示不能找到设备不知道咋回事cookie也是填了的 cookie 中有 userId 和 passToken 两个值的,但是还是不能找到设备哦
<img width="1045" height="702" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/c4cf7f46-3391-44b6-bd6b-cc6b24948857" />
---
### 评论 17 - xpeagle
> 仅使用cookie找的设备了感谢
我也是试了下仅用cookie但是还是找不到设备郁闷了
---
### 评论 18 - zzfca
使用仅cookie登陆,终于链接到小爱音箱了! 谢谢谢谢
---
### 评论 19 - TangTang0812
有个问题大概播放几首歌后会触发账号安全机制控制台会提示“验证码输入错误”然后就需要再次去官网过下人机验证再到xiaomusic中重新配置cookie是不是cookie容易被Mi ban 导致生命周期挂了,总的来说还是不错,能正常识别设备了;感谢大佬的倾情奉献 ❤
---------------------------------
。。。。。。。。。
@@ -235,17 +194,13 @@ title: 使用cookie登陆
<img width="499" height="808" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/49123fe0-9a42-4595-8c6c-cf6cc06bb032" />
<img width="1357" height="1291" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/9d930d4c-36bb-45f3-8ac3-a11033027962" />
---
### 评论 20 - hanxi
@TangTang0812 把对话记录关掉会好一点。
---
### 评论 21 - ideajoker
<img width="2260" height="1173" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/275debe0-9058-48ad-8c6a-a3ba3eaf5105" />
<img width="1236" height="701" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/80f152fa-1b1c-4130-8a4e-c40e8cbe2ef6" />
@@ -259,19 +214,15 @@ title: 使用cookie登陆
3、cookie也填入了
群辉NAS里面不知道怎么把网络由bridge改为host这个还没试。 有没有类似的情况?
---
### 评论 22 - zmz163
试了很多次都不能查找设备局域网内电脑获取完整cookie填入并且也填写账户密码仍然无法获取设备。
[xiaomusic (1).txt](https://github.com/user-attachments/files/24761966/xiaomusic.1.txt)
---
### 评论 23 - sam0773
如果用cookies就不要填写账号和密码
@@ -303,31 +254,25 @@ xiaomusic (1).txt
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***&gt;
---
### 评论 24 - zmz163
> 如果用cookies就不要填写账号和密码
> […](#)
只用cookie登录也不行
---
### 评论 25 - w0000dy
> > 如果用cookies就不要填写账号和密码
> > […](#)
>
> 只用cookie登录也不行
填账号密码 账号别用手机号,我一开始手机号不行 使用ID号 然后去网页登录验证 刷新就有了,可以的话 先去你docker配置的config文件夹下东西都删除 登陆账号后再重新配置下
---
### 评论 26 - zmz163
> > > 如果用cookies就不要填写账号和密码
> > > […](#)
> >
@@ -337,35 +282,27 @@ You are receiving this because you commented.Message ID: ***@***.***&gt;
> 填账号密码 账号别用手机号,我一开始手机号不行 使用ID号 然后去网页登录验证 刷新就有了,可以的话 先去你docker配置的config文件夹下东西都删除 登陆账号后再重新配置下
试了很多次,还是不行
---
### 评论 27 - ideajoker
<img width="1600" height="896" alt="Image" src="https://gproxy.hanxi.cc/proxy/user-attachments/assets/69ff2cb0-f09f-4390-8aee-9743ee608f6f" />
2026年1月22日12:30测试反馈
群辉NAS把项目docker配置目录config文件夹下的内容全都删除
重新拉取最新版本构建一下再登录后台可以先Ctrl+F5一下刷新出新版后台。
账号登录页面删掉手机号换成ID密码留空。
然后使用cookie登录保存之后就能识别到设备了。
---
### 评论 28 - yangjianxun36
大佬现在有个新问题不知道是我的个例还是设备问题。家里有两台小米设备一台米家音箱一台触屏音箱都是初版。米家音箱各项功能都正常包括用风花雪月app控制播放暂停。但是触屏音箱有问题在网页后台控制点击播放暂停都可以正常用但是停止的时候音箱没有停止语音反馈米家音箱是有的但是用着也还是没问题用风花雪月app就有问题了点播放可以放歌但是一点就没反应而且点了以后再网页后台也无法控制了播放时间会开始一直跳后台两个音箱都无法被发现只能重启容器后正常。但是一通过风花雪月控制就会重复出现上面的问题。只能再次重启容器
---
### 评论 29 - b2522
用这个网址的token可以登录 里面的userid换成自己的
https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
---
### 评论 30 - chenxixian
我用的pip instal方式安装和更新xiaomusic在Mac上的之前帐号密码也是时不时有问题改用cookie登录会正常但Mac的IP有时会变所以又加了个启动脚本IP没变直接启动xiaomusicIP变了修改好conf/setting.json后再启动xiaomusic。
start_xiaomusic.sh
@@ -518,19 +455,15 @@ trap 'log_info "脚本被中断"; exit 130' INT TERM
# 执行主程序
main "$@"
```
---
### 评论 31 - zhagn4
> 用这个网址的token可以登录 里面的userid换成自己的 https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
亲测可用,谢谢
---
### 评论 32 - zhagn4
> > 用这个网址的token可以登录 里面的userid换成自己的 https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
>
> 亲测可用,谢谢
@@ -538,11 +471,9 @@ main "$@"
可用一天后,失效
---
### 评论 33 - b2522
> > > 用这个网址的token可以登录 里面的userid换成自己的 https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
> >
> >
@@ -551,11 +482,9 @@ main "$@"
> 可用一天后,失效
重启一下容器~如果不行就更新下ck再重启下容器
---
### 评论 34 - zhagn4
> > > > 用这个网址的token可以登录 里面的userid换成自己的 https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
> > >
> > >
@@ -567,11 +496,9 @@ main "$@"
> 重启一下容器~如果不行就更新下ck再重启下容器
重启可以了,但今天又不行了,我让容器每天定时重启试试
---
### 评论 35 - ideajoker
> > > > > 用这个网址的token可以登录 里面的userid换成自己的 https://account.xiaomi.com/fe/service/account?userId=11111&_locale=zh_CN
> > > >
> > > >
@@ -586,18 +513,14 @@ main "$@"
> 重启可以了,但今天又不行了,我让容器每天定时重启试试
我现在也是每天定时重启才行,找不到规律啥时候就掉了登录。。。
---
### 评论 36 - wyyang1978-debug
我的也是需要重启,一般一到两天就会找不到设备,重启就好了
---
### 评论 37 - JasonSupertramp
还有一个就是需要把账号的二次验证关掉,不然连不上
---
[链接到 GitHub Issue](https://github.com/hanxi/xiaomusic/issues/688)
[Issue 链接](https://github.com/hanxi/xiaomusic/issues/688)