Emulated Roku for Harmony

Thanks, fingers crossed that you can fix it! Let me know if there is any testing I can do.

Your statement makes me wonder if the issue is related to running a plex container on my docker host. That’s the only other thing I can think of that would be trying to use upnp.

Any way to add logo’s to the dummy apps in the Harmony remote? I can’t find how to edit them, now I see just numbers from 1 to 10. I would like to put a netflix, spotify, youtube logo etc instead of the numbers.

No, I don’t think you can use them anyway, as far as I remember, Harmony uses IR to launch the apps, not the API. (I’ve listed it under “Known limitations” in the official component page)

I can launch apps through home assistant when pressing dummy app 1 for example. So I can launch apps via the remote over home assistant. But I want to change logos of the ‘favorites’ / dummy apps on the remote.

That’s a new development in Harmony then, it didn’t work like that.
You can’t change the icons in emulated_roku, but I don’t think you can see them in Harmony anyway (otherwise you’d see a white icon, as all apps share the same white icon)

I use the keypress in a dummy app as a trigger to send a command via the harmony hub.

On my harmony remote I see dummy app 1 to 10, no white icons. I’ll take a picture tomorrow of it

How to change these to logos?

Watch this video to see how it works to start apps:

I have no idea, if Harmony used the picture emulated_roku sends, there’d be a white pixel or box, so I don’t think it’s possible. Does it work with a proper Roku?

What do you mean with a proper roku? I don’t have a roku. So that’s why I use the emulator

It was more of a general question to anyone. Without finding out if it works on a Roku, I can’t be sure if it’s supposed to even show icons. I don’t have that type of Harmony remote, so I can’t even test it, so the answer is no, it’s not possible to change icons.

@mindigmarton

The issue is definitely caused by having a plex container on the same docker host. If I stop my plex container and restart the emulated roku component, it works. I’ve tried using a separate host IP for plex and it still blocks emulated roku, so I suppose the services need to be separated to different hosts unless there is some way to separate their upnp advertisements.

EDIT: In case anyone else stumbles across this, the solution (for me) was to disable the dlna portion of my plex container. I closed off port 1900 and emulated roku immediately started up. So just fyi, udp 1900 is also required for this integration.

2 Likes

Thanks, not sure when I’ll be able to look at it, but that helps a lot.
I used to run Plex a year ago and didn’t have any such problems, but I’ll spin up a docker image and see what’s up.

Any progress @mindigmarton? I am facing the same issue, running HA OS in Docker, continuously failing to start Emulated Roku as described above:

Logger: homeassistant.components.emulated_roku
Source: components/emulated_roku/binding.py:142
Integration: EmulatedRoku (documentation, issues)
First occurred: 1:25:49 (1 occurrences)
Last logged: 1:25:49

Failed to start Emulated Roku Home Assistant on 192.168.1.136:8060

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/emulated_roku/binding.py”, line 142, in emulated_roku_start await self._api_server.start() File “/usr/local/lib/python3.8/site-packages/emulated_roku/init.py”, line 419, in start self.sock.bind(("", MULTICAST_PORT)) OSError: [Errno 98] Address in use

By the way, I am not using PLEX and cannot determine any other plugin or integration that causes either Emulated Hue or Rokin to start…

1 Like

It’s weird because emulated_roku starts up fine with emulated_hue, but doesn’t if Plex is started. emulated_hue works fine with Plex.
I’ve copied emulated_hue’s ssdp code (almost the same) and it still doesn’t work.
Still have some ideas, so I’ll be trying those this weekend.

My harmony hub can’t find the emulated_roku I’ve setup.

Home Assistant version 2021.2.1, available locally at 192.168.10.171, deployed using a docker container.

configuration.yml:

emulated_roku:
  servers:
    - name: Home Assistant
      host_ip: 192.168.10.171
      listen_port: 8060
      upnp_bind_multicast: True

Seems to work good enough.

  • The XML is available at: http://192.168.10.171:8060/
  • The Roku integration in HA became available automatically after setting up emulated_roku

I tested connecting using the android app called “Roku Remote: RoSpikes”. It works fine when connecting directly to the IP of emulated_roku, but it doesn’t find it using it’s built-in “Search for Roku” function.

I have also used the advertise.py script mentioned above here, but it doesn’t seem to help. I have tested running it both on the Raspberry Pi 4 which is hosting the HA docker container, and on a Windows 10 machine.

I fixed it by running the advertise.py script on my laptop which uses WiFi, that allowed the harmony hub to instantly find the emulated roku.

Both the rpi4 and the windows machine where I previously used advertise.py are using wired connections. Since of course the harmony hub uses WiFi it seems that this is important.

Yes. The app images automatically appear. Not sure on the mechanism, whether harmony downloads them from the Roku or from the internet, but there’s nowhere you can select different ones.

Out of interest, when you click on the numbers, do you see an event in home assistant?

I’m not having much luck getting anything to talk to this integration.
My setup is using docker, so I’ve defined the yaml to specify the listen IP for the avoidance of doubt, and I have run the advertise.py on my laptop to point at the Home Assistant setup.

When I search via Harmony or via the official Roku Android App I can see multicast stuff hitting the advertise.py (https://pastebin.com/CmgL6nsZ) and it’s from the IP of either my Harmony Hub or phone depending on which I’m trying.

But neither will actually find any devices, despite seemingly interacting with the multicast advertise script.

For completeness my configuration.yaml contains;

emulated_roku:
  servers:
    - name: Home Assistant
      listen_port: 8060
      host_ip: 192.168.11.252
      advertise_ip: 192.168.11.252
      upnp_bind_multicast: false

Any tips on what am I missing here?

It looks like Plex uses port 1900 in a way that blocks other apps, can’t fix it in emulated_roku unfortunately. Frenck disabled port 1900 of the Plex addon anyways because it kept conflicting with other addons too:

Add note about DLNA support to docs, cleanup port 1900 (#81) · hassio-addons/addon-plex@eec89b7 (github.com)

So I guess that fixes it:)

1 Like

FYI for anyone else finding this thread related to using Emulated Roku in a Docker container (Home-Assistant-Core) such as on an Unraid server…

I had the very same issue and errors as @pa1okz above… failing to start Emulated Roku as described above:

Logger: homeassistant.components.emulated_roku
Source: components/emulated_roku/binding.py:142
Integration: EmulatedRoku ([documentation ](https://www.home-assistant.io/integrations/emulated_roku)

Failed to start Emulated Roku Home Assistant on 192.168.1.10:8060

Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/components/emulated_roku/binding.py”, line 142, in emulated_roku_start await self._api_server.start() File “/usr/local/lib/python3.8/site-packages/emulated_roku/**init**.py”, line 419, in start self.sock.bind(("", MULTICAST_PORT)) OSError: [Errno 98] Address in use

I was able to resolve it also by validating that port 1900 was not being used on the host by another container…in my case it was also used by Unifi Controller docker container. Unifi Controller apparently uses that port for UPnP so I was able to change that port in the container configuration (thanks Linixserver.io) to a different port and restart both Unifi & HomeAssistant.

Now Emulated Roku started successfully and Harmony was able to immediately resolve the Emulated Roku and fix my integration! Phew!