Roku 9.3 Connection Error

I have 3 TCL Roku TVs
They all have been working for a while but one of them stopped responding to HA commands to it

The 2 working TVs are on Roku 9.2 and the non working one is on 9.3

If i send a remote.rokuname power off the command seems to work and the TV goes off, but the state stays to ON and I get the error in the logs.

Below is the Log error I get
2020-05-25 12:57:52 ERROR (MainThread) [homeassistant.components.roku] Error fetching roku data: Invalid response from API: Error occurred while communicating with device

Mine is on 9.2 , but I am getting the same error message and the state of the TV in HA is not updated. HA restart seems to fix it for a while. This problem appeared with 0.110, before I didn’t have any issues

Same here. Everything worked fine until HA 110.
Mike

I’m seeing this as well. Appears it may be occurring when the devices are powered off.

Is there a way to configured how often it is checked? I have a few sticks that are only powered on once or twice a week.

My devices are up when I get it. They respond to ping as well as respond to my remote.roku commands

I’m also having issues with what seems to be an upgrade to HA 0.110 (currently running HA 0.110.3 in docker on ubuntu). Roku streaming stick is timing out when calling the media_player.turn_on/off services. the weird thing is that the turn on and off is actually working on to turn on and off the roku stick but it’s throwing a time out error which is breaking my NodeRED flows… anyone know what’s up?

node Annotation 2020-05-29 152629

latest entry in my HA log file:

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 130, in handle_call_service
    connection.context(msg),
  File "/usr/src/homeassistant/homeassistant/core.py", line 1253, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1288, in _execute_service
    await handler.func(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    self._platforms.values(), func, call, required_features
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 454, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 597, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 485, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/roku/media_player.py", line 166, in async_turn_on
    await self.coordinator.roku.remote("poweron")
  File "/usr/local/lib/python3.7/site-packages/rokuecp/rokuecp.py", line 203, in remote
    await self._request(f"keypress/{VALID_REMOTE_KEYS[key_lower]}", method="POST")
  File "/usr/local/lib/python3.7/site-packages/rokuecp/rokuecp.py", line 77, in _request
    ) from exception
rokuecp.exceptions.RokuConnectionError: Timeout occurred while connecting to device

Did anyone manage to get to the bottom of this and fix it?

Thanks

yeah, this issue went away for me by upgrading HA past 0.110.

Thanks, I still have this issue and I’m on 0.114.4 - I’ll see if the update to 0.115.0 fixes it as there are some Roku improvements in that release.

Not fixed in 115.0. Same thing every time.

ERROR (MainThread) [homeassistant.components.roku] Error fetching roku data: Invalid response from API: Error occurred while communicating with device

v0.117.4

:frowning:

Error fetching roku data: Invalid response from API: Error occurred while communicating with device

This is super noisy, I’m seeing it as well on the latest 0.117.6

observations so far…
With this error logging, ha eventually crashes quite often.
Roku devices are mostly unavailable.

Removing the integration and starting fresh has helped. Re added the three roku and been better for about a week now.

I suspect something changed on the roku api and reading them means ha has no knowledge of whatever endpoint it was trying to access.

As an update on this topic I was still getting this error every about 90 seconds from a Roku device very rarely used. I removed it and the error is gone, so if this is still being looked into or if there was a solution I would love to hear it.

[homeassistant.components.roku.coordinator] Error fetching roku data: Invalid response from API: Timeout occurred while connecting to device

Still getting this.