Hi,
Have a chrome cast connected to a TV and powered via the TV’s USB port, hence if the TV is off the chrome cast is not powered.
In the power offline state, there is no visual indication in HA chrome cast is offline.
If attempting to then switch on the Chrome cast the following error is recorded via the home-assistant.log.
Not a big issue as I can see the TV is off, just something worth mentioning.
First two logs reports the chrome cast is offline at 2018-02-25 22:03:11 I then attempt to switch on the chrome cast.
018-02-25 20:50:13 ERROR (Thread-16) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
2018-02-25 20:50:15 ERROR (Thread-17) [pychromecast.socket_client] Failed to connect, retrying in 5.0s
2018-02-25 22:03:11 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall media_player.turn_on: entity_id=[‘media_player.tv’]>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py”, line 1010, in _event_to_service_call
yield from service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/init.py”, line 403, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/cast.py”, line 272, in turn_on
self.cast.quit_app()
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/init.py”, line 270, in quit_app
self.socket_client.receiver_controller.stop_app()
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 844, in stop_app
inc_session_id=True, callback_function=callback_function_param)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 605, in send_platform_message
inc_session_id, callback_function_param)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 556, in send_message
self._ensure_channel_connected(destination_id)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 642, in _ensure_channel_connected
no_add_request_id=True)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 599, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…
2018-02-25 22:03:28 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall media_player.turn_on: entity_id=[‘media_player.tv’]>
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/core.py”, line 1010, in _event_to_service_call
yield from service_handler.func(service_call)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/init.py”, line 403, in async_service_handler
yield from getattr(player, method[‘method’])(**params)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/media_player/cast.py”, line 272, in turn_on
self.cast.quit_app()
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/init.py”, line 270, in quit_app
self.socket_client.receiver_controller.stop_app()
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 844, in stop_app
inc_session_id=True, callback_function=callback_function_param)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/controllers/init.py”, line 84, in send_message
self.namespace, data, inc_session_id, callback_function)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 605, in send_platform_message
inc_session_id, callback_function_param)
File “/srv/homeassistant/lib/python3.4/site-packages/pychromecast/socket_client.py”, line 599, in send_message
raise NotConnected(“Chromecast is connecting…”)
pychromecast.error.NotConnected: Chromecast is connecting…