Coder Social home page Coder Social logo

xiaomi_tv's Introduction

小米电视

视频介绍:https://www.bilibili.com/read/cv12067446

hacs_badge hacs_badge visit

badge

使用方式

安装完成重启HA,刷新一下页面,在集成里搜索小米电视即可

Add Integration

HomeKit遥控器

导入蓝图

开机/关闭电视事件

导入蓝图

遥控器按键命令

  • 关机:power
  • 上:up
  • 下:down
  • 左:left
  • 右: right
  • 首页:home
  • 音量加:volumeup
  • 音量减:volumedown
  • 菜单:menu
  • 确定:enter
  • 返回:back

发送按键

service: xiaomi_tv.send_key
data:
  command: left

ADB服务

打开ADB(注意:必须先打开开发者模式

service: xiaomi_tv.send_key
data:
  key: adb
  entity_id: media_player.xiao_mi_dian_shi

腾讯视频搜索

service: xiaomi_tv.adb_command
data:
  command: am start -a com.tencent.qqlivetv.open -d "tenvideo2://?action=9&search_key=扫黑风暴"
  entity_id: media_player.xiao_mi_dian_shi

腾讯视频播放

service: xiaomi_tv.adb_command
data:
  command: am start -a com.tencent.qqlivetv.open -d "tenvideo2://?action=7&cover_id=mzc00200lxzhhqz"
  entity_id: media_player.xiao_mi_dian_shi

酷喵搜索

service: xiaomi_tv.adb_command
data:
  command: am start -a android.intent.action.VIEW -d "ykott://tv/search?url=tv/v3/search?from_app=cn.cibntv.ott"
  entity_id: media_player.xiao_mi_dian_shi

酷喵视频播放

service: xiaomi_tv.adb_command
data:
  command: am start -a android.intent.action.VIEW -d "ykott://tv/detail?url=tv/v3/show/detail?id=175957&fullscreen=true&fullback=true&from=cn.cibntv.ott"
  entity_id: media_player.xiao_mi_dian_shi

如果这个项目对你有帮助,请我喝杯咖啡奶茶吧😘

支付宝 微信
支付宝 微信支付

关注我的微信订阅号,了解更多HomeAssistant相关知识

HomeAssistant家庭助理


在使用的过程之中,如果遇到无法解决的问题,付费咨询请加Q635147515

xiaomi_tv's People

Contributors

shaonianzhentan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xiaomi_tv's Issues

HA更新到5.0不能用了

此错误来自自定义集成。

Logger: homeassistant.config_entries
Source: custom_components/xiaomi_tv/init.py:11
Integration: 小米电视 (documentation)
First occurred: 15:18:52 (2 occurrences)
Last logged: 15:18:52

Error setting up entry 192.168.1.231 for xiaomi_tv
Error setting up entry 192.168.1.233 for xiaomi_tv
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/xiaomi_tv/init.py", line 11, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

电视在开机状态并播放视频时,重启 HA,较高概率出现 xiaomi_tv 不可用,直到下次重启 HA

xiaomi.tv.rmh1
制造商:xiaomi
固件:4.2.4_257

日志:
Logger: homeassistant.components.media_player
Source: custom_components/xiaomi_tv/media_player.py:394
Integration: 播放器 (documentation, issues)
First occurred: 17:02:02 (1 occurrences)
Last logged: 17:02:02

xiaomi_tv: Error on device update!
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/aiohttp.py", line 62, in async_http_request
async with session.request(
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/client.py", line 1138, in aenter
self._resp = await self._coro
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/client.py", line 535, in _request
conn = await self._connector.connect(
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/connector.py", line 542, in connect
proto = await self._create_connection(req, traces, timeout)
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/connector.py", line 907, in _create_connection
_, proto = await self._create_direct_connection(req, traces, timeout)
File "/srv/homeassistant/lib/python3.8/site-packages/aiohttp/connector.py", line 1154, in _create_direct_connection
hosts = await asyncio.shield(host_resolved)
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/aiohttp.py", line 81, in async_http_request
resp_body_text = await response.text()
File "/srv/homeassistant/lib/python3.8/site-packages/async_timeout/init.py", line 128, in aexit
self._do_exit(exc_type)
File "/srv/homeassistant/lib/python3.8/site-packages/async_timeout/init.py", line 203, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
await entity.async_device_update(warning=False)
File "/srv/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 684, in async_device_update
await task
File "/home/pi/.homeassistant/custom_components/xiaomi_tv/media_player.py", line 202, in async_update
await self.create_dlna_device()
File "/home/pi/.homeassistant/custom_components/xiaomi_tv/media_player.py", line 394, in create_dlna_device
device = await factory.async_create_device(url)
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 75, in async_create_device
return await self._async_create_device(device_el, description_url)
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 88, in _async_create_device
service = await self._async_create_service(service_desc_el, description_url)
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 142, in _async_create_service
scpd_el = await self._async_get(scpd_url)
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/client_factory.py", line 370, in _async_get
status_code, _, response_body = await self.requester.async_http_request(
File "/srv/homeassistant/lib/python3.8/site-packages/async_upnp_client/aiohttp.py", line 83, in async_http_request
raise UpnpConnectionTimeoutError(str(err)) from err
async_upnp_client.exceptions.UpnpConnectionTimeoutError: ('', None)

在配置里安装报错

Error setting up entry 192.168.0.103 for xiaomi_tv
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 387, in async_setup
result = await component.async_setup_entry(hass, self)
File "/config/custom_components/xiaomi_tv/init.py", line 10, in async_setup_entry
hass.config_entries.async_setup_platforms(entry, PLATFORMS)
AttributeError: 'ConfigEntries' object has no attribute 'async_setup_platforms'

博联红外线开机接入

你好,这个走的互联网api吧,开机无法达到。我可以用博联红外开机小米电视,
但是不知道怎么写入那个卡片,lovelace-remote-card,请教如何写入。

iOS 遥控器问题

你好,请教个问题。看你教程添加了 ios 遥控器
我每次进去ios 遥控器界面 电视如果是关机状态 点击任何按键 电视都会开机。 如果电视是开机状态,进入ios遥控器 点击任何操作,电视会关机

关于语音控制(语音通知功能)

xiaomi miot添加的电视是支持语音控制的(我是当成通知用的),但是大佬你这个不行,我两个集成都添加了,两个都用有点膈应,希望大佬优化一下,把语音指令这个实体或者开发调用加上,感激不尽。

请问 youku 的视频id从哪里找的?

command: am start -a android.intent.action.VIEW -d "ykott://tv/detail?url=tv/v3/show/detail?id=175957&fullscreen=true&fullback=true&from=cn.cibntv.ott"

请问这里面的id上哪里找的?youku的页面上的vid都是类似 XNTIwMTg3MDAxMg== 这样的ID,在页面上找到的数字ID也无法在TV上播放

能否通过 HDMI 信号判断是否关闭电视

因为电视不支持 HDMI CEC,电视盒子关机后电视并不会自动关机,所以想通过自动化判断 HDMI 信号状态决定是否关机。

想请教下插件或者项目中开/关机 Blueprint 能不能支持 HDMI 状态的监测从而实现自动化。

感谢!

HA 2023.6.3 不生成遥控器实体

Logger: homeassistant.helpers.service
Source: helpers/service.py:770
First occurred: 00:54:11 (65 occurrences)
Last logged: 00:54:30

Unable to find referenced entities remote.ke_ting_dian_shi or it is/they are currently not available

捕获

setup error in Home Assistant 2022.4.0

Unable to prepare setup for platform xiaomi_tv.media_player: Platform not found (cannot import name 'UpnpFactory' from 'async_upnp_client' (/usr/local/lib/python3.9/site-packages/async_upnp_client/init.py)).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.