Current best practice to discover Roku

I have several Roku devices but some don’t show up on my network (asus router - latest firmware).

I’ve read conflicting advice on settings for discovery, media_player, and roku. I think I’ve tried every combination of turning on/off (ignore) each, but none of them recognize all of my rokus.

What is the current best practice to discover all rokus?

Cheers, Richard

discovery:
#  ignore:
#    - roku

media_player:
#  - platform: roku

roku:
  - host: 192.168.2.111
  - host: 192.168.2.186
  - host: 192.168.2.195
  - host: 192.168.2.126
  - host: 192.168.2.158
  - host: 192.168.2.125

You should use start with the documentation instead of reading the forums. The forums have out of date information everywhere. Go to the forums for information when the docs aren’t working.

This will be needed to turn off discovery for roku. But this will no-longer work if roku gets moved into the UI. Either way, uncomment it.

Thats old configuration, ingore those posts.

This is the correct configuration. If that’s not working, you could have network issues. At a minimum, just try that configuration with 1 roku, not 6. The integration might have issues with multiple rokus and you may want to rule that out.

1 Like

Thanks @petro I did consult the documentation which says “Roku, which will be automatically discovered if you enable the discovery component” That didn’t work.

It also says “The Roku integration can also be forced to load by adding the following lines to your …” That also didn’t work.

(The documentation does not include your suggestion to ignore roku in discovery. If that ends up working, I will submit a PR change to the documentation.)

In the meanwhile, I noticed and fixed a mistake in my initial post. Discovery does discover some rokus, but not all.

Importantly, the rokus that discovery can’t find, will be found if I ignore roku in discovery and force roku. That tells me HA can reach them through my network but just fails during discovery.

Unfortunately, I can only force one at a time. If I and try to force more than one roku, I get this notification:

The following components and platforms could not be set up:

* [roku](https://home-assistant.io/integrations/roku/)
* roku.media_player
* roku.remote

Please check your config.

Any ideas?
Thanks, Richard

I’m on .100.3 currently and using this:

discovery:

media_player:
  - platform: roku

This seems to have created the remotes and media_player entities correctly for me. I just changed some of these around (deleting the entities I no longer wanted in HA from the core.entity_registry file) and then rebooting to find the newly setup / renamed Rokus.

I’m running Google Wifi mesh network pucks as my router configuration - and they’re all on the same network as my HA.

FWIW. I do have some TP-Link outlets and such setup on my GUEST network and I unfortunately can’t integrate these directly into HA b/c they’re on another network and Google doesn’t have the config to open up visibility across these regular/guest networks. Anyhow, hope it helps.

Hi RichardU,

Are you powering any of the Rokus from the USB port built into the TV? If yes that might be the problem.

  1. Some TVs cannot provide enough power to reliably run them.
  2. Some TVs cut power to the USB ports when the TV is off or in sleep mode

Nickolaos

Thanks @Markus99 and @Nickolaos

Everything is on the same network with a factory power supply. Two are wired and four are wireless. The two wired are discovered (Ultras). One of the weakest wireless connections is discovered, while one of the strongest is not.

I tried Markus99’s configuration and it was no different. The fact that I can force a connection to a roku that can’t be discovered must be significant. I’m just wondering if anyone else is forcing more than one roku. Maybe there is a different command format to do that.

This configuration is completely unrelated to roku, it’s the discovery component. And that has it’s own documentation that covers ignoring specific discoveries. It just so happens that you are trying to ignore discovery for roku.

When you get this error, what does your config look like?

This produces that error. But if I do either roku by itself, it works.

discovery:
  ignore:
    - roku

media_player:

roku:
  - host: 192.168.2.111
  - host: 192.168.2.186

I didn’t see anybody suggest this, but just as a sanity check, are all these Roku devices set to have their IP address reserved on your router? Maybe they’re just getting different addresses from DHCP every once in a while.

That’s really weird, because I don’t think your config is supposed to work. Or, the discovery component is working and you don’t need the media_player part of the config. The Roku component should be set up like this (if you’re not using discovery):

roku:
  - host: IP_ADDRESS

There is no need to define a Roku under the media_player: section of your config anymore.
I previously set up my Roku like your old config (listing under media_player:), and it stopped detecting in HA because the discovery: component wasn’t working properly on a recent Google Wifi update.

Good question @SteveDinn. They are all reserved.

Thanks @dwinnn. I only included media_player: to show that I don’t have any entries under it. They are under roku: as are yours.

The problem is specifying multiple rokus under roku: I wonder if anyone else has done that.

Also, the rokus that aren’t discovered still have entries in the Entity Registry, but clicking on them tells me: This entity is not currently available.

I’m wondering if there is any way to clear them out to start fresh?

Maybe list model # of working vs nonworking Roku.

Does this list ever change?

Are the ON when starting HA?(not sure this asked before)

EDIT:
So most you may get connected is (x3) and always same unit connecting? What if you disable (x2) working, are the replaced by others?

It seems the roku integration is not set up for manually specifying multiple rokus. I put in a feature request on GitHub.

Thanks everyone. Richard

If that’s not working it’s a bug. The configuration and code definitely is built towards accepting multiple hosts.

I too am unable to use multiple hosts. Only one is accepted; anymore and I get an error.

I enabled discovery for the time being.

@majorsl Thanks for the confirmation. It might help if you add your comments to this GitHub issue: https://github.com/home-assistant/home-assistant/issues/28631

I’ve also enabled discovery for now, but it doesn’t discover my TLC TV and it takes a while to re-discover after each reboot. Also, for some reason my roku remotes have stopped working so I have disabled them too.