Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add wifi speaker and television as the media player entity #706

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SusanPhevos
Copy link
Contributor

To solve #305 #558

Verified

This commit was signed with the committer’s verified signature.
edmorley Ed Morley
@hzonz
Copy link

hzonz commented Feb 8, 2025

xiaomi.wifispeaker.s12 正确添加 media_player 实体。
8-2-2025_144036_10 10 10 12

但是:只显示播放状态 ,无其它信息(例如:歌曲封面,歌曲信息,歌手信息等)。
延迟很大,点击暂停后,音箱会暂停,但是UI需要等一段时间才能更新。
8-2-2025_14414_10 10 10 12

@hzonz hzonz mentioned this pull request Feb 8, 2025
@Victor2333
Copy link

Victor2333 commented Feb 8, 2025

media player 电视缺失遥控器的控制 无法用 homekit集成后用遥控器控制 但是 xiaomi miot auto可以

https://github.com/al-one/hass-xiaomi-miot/blob/7f1a8ba5c77db438630e4f6ebfe51228c2e57218/custom_components/xiaomi_miot/media_player.py#L627

@SusanPhevos
Copy link
Contributor Author

SusanPhevos commented Feb 14, 2025

xiaomi.wifispeaker.s12

xiaomi_home 只能根据设备的 MIoT-Spec-V2 定义生成 Home Assistant Entity,该设备的 MIoT-Spec-V2 未定义歌曲封面、歌曲信息、歌手信息,故 xiaomi_home 无法显示。
miot auto 直接访问了音箱云服务接口获取这些信息。xiaomi_home 无法这样做。
“延迟很大,点击暂停后,音箱会暂停,但是UI需要等一段时间才能更新。”这是音箱设备实现的问题。音箱播放状态的属性值改变后,不会立即上报状态改变消息,而是隔一段时间随其他属性值一同上报。xiaomi_home 采用消息订阅方法,只有当设备主动上报状态改变消息,xiaomi_home 才能接收到属性值变化的推送。miot auto 采用轮询方法,反复询问设备的属性值,询问间隔很短,因此用户感受到的延时小。

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.

None yet

3 participants