Description
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version
):
0.35.3
Python release (python3 --version
):
3.4.2
Component/platform:
- media_player.webostv
Description of problem:
HA cannot render a preview image for media_player.webostv component and an error appears in the log on every page refresh. The preview block is rendered on a dashboard but is blank.
Expected:
Preview is rendered correctly or not shown at all if not supported.
Problem-relevant configuration.yaml
entries and steps to reproduce:
- Add webostv platform to the list of media players:
- platform: webostv
name: Living Room TV
host: 192.168.1.190
Traceback (if applicable):
aiohttp.server: Error handling request
Traceback (most recent call last):
File "/home/homeassistant/.homeassistant/deps/aiohttp/web_server.py", line 61, in handle_request
resp = yield from self._handler(request)
File "/home/homeassistant/.homeassistant/deps/aiohttp/web.py", line 249, in _handle
resp = yield from handler(request)
File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
res = yield from res
File "/usr/lib/python3.4/asyncio/coroutines.py", line 143, in coro
res = yield from res
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/http/__init__.py", line 427, in handle
result = yield from result
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py", line 783, in get
request.app['hass'], player.media_image_url)
File "/srv/homeassistant/homeassistant_venv/lib/python3.4/site-packages/homeassistant/components/media_player/__init__.py
7006
", line 729, in _async_fetch_image
response = yield from websession.get(url)
File "/home/homeassistant/.homeassistant/deps/aiohttp/client.py", line 530, in __iter__
resp = yield from self._coro
File "/home/homeassistant/.homeassistant/deps/aiohttp/client.py", line 173, in _request
proxy=proxy, proxy_auth=proxy_auth, timeout=timeout)
File "/home/homeassistant/.homeassistant/deps/aiohttp/client_reqrep.py", line 95, in __init__
self.update_host(url)
File "/home/homeassistant/.homeassistant/deps/aiohttp/client_reqrep.py", line 119, in update_host
raise ValueError('Host could not be detected.')
ValueError: Host could not be detected.
Additional info:
I tried to debug the issue and added a logging of an image URL to the homeassistant/components/media_player/webostv.py
:
@property
def media_image_url(self):
"""Image url of current playing media."""
if self._current_source_id in self._app_list:
_LOGGER.error("'" + self._app_list[self._current_source_id]['largeIcon'] + "'")
return self._app_list[self._current_source_id]['largeIcon']
return None
Log entries:
16-12-30 21:48:21 homeassistant.components.media_player.webostv: '/media/cryptofs/apps/usr/palm/applications/youtube.leanback.v4/youtube_leanback_v4_130x130.png' 16-12-30 21:51:01 homeassistant.components.media_player.webostv: '/usr/palm/plugins/inputapps/assets/medium/launcher/streamingbox.png'
There is no such path in my system but looks like there is a reason why it throws the exception: HTTP client cannot resolve a host of the local path. However, I don't know why does it resolve the path which does not exist in a system.
TV firmware:
- version 05.05.55
- webOS 1.4.0-2504 (afro-ashley)