shaonianzhentan / xiaomi_tv

在HA里使用的小米电视
https://gitee.com/shaonianzhentan/xiaomi_tv
MIT License
75 stars 31 forks source link

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

Closed axelburks closed 1 year ago

axelburks commented 2 years ago

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 _createconnection , 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 statuscode, , 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)

shaonianzhentan commented 2 years ago

目前这个DLNA的功能还不完善,正常能用但不稳定😂