pychromecast
pychromecast copied to clipboard
issue with refactored media controllers and chromecast 1st gen
Hey,
There seems to be an issue with the refactored media controllers and my chromecast 1st gen device (firmware 1.36.159268).
My home assistant log is filled with these errors which are caused by quick_play function and specifically the timeout here https://github.com/home-assistant-libs/pychromecast/blob/aa927d3707bf49e117aacf0f2070436d6c8fa618/pychromecast/controllers/media.py#L542
Would love to get any guidance on how to deal with this.
2022-05-22 03:09:45 ERROR (MainThread) [homeassistant.core] Error executing service: <ServiceCall media_player.turn_on (c:c7c93a191f76e5ff460e4f2e5dd1c7ae): entity_id=['media_player.living_tv']>
Traceback (most recent call last):
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1652, in catch_exceptions
await coro_or_task
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/core.py", line 1671, in _execute_service
await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity_component.py", line 204, in handle_service
await service.entity_service_call(
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 677, in entity_service_call
future.result() # pop exception if have
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/entity.py", line 955, in async_request_call
await coro
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/helpers/service.py", line 714, in _handle_entity_call
await result
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/media_player/__init__.py", line 642, in async_turn_on
await self.hass.async_add_executor_job(self.turn_on)
File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/srv/homeassistant/lib/python3.9/site-packages/homeassistant/components/cast/media_player.py", line 473, in turn_on
quick_play(self._chromecast, "default_media_receiver", app_data)
File "/srv/homeassistant/lib/python3.9/site-packages/pychromecast/quick_play.py", line 77, in quick_play
controller.quick_play(**data)
File "/srv/homeassistant/lib/python3.9/site-packages/pychromecast/controllers/media.py", line 506, in quick_play
raise PyChromecastError()
pychromecast.error.PyChromecastError
anybody has any idea on how to fix? happy to submit PR if I get some guidance on what the appropriate way would be to address this issue
If this issue only affects 1st generation Chromecasts, consider that it has reached end of support, and others are on firmware version 1.56.xxx.
See: https://support.google.com/chromecast/answer/7124014#zippy=%2Ccurrent-production-firmware-version