Emulated Roku for Harmony

Yep, that’s what I did (stupidly). I re-download from github and it seems to be working now, as I am able to connect at myip:8060, and my Harmony was able to discover it. So I should be able to use roku_command as a trigger type now?

1 Like

You create automations for whatever you want to control as per the examples above and all should now work a treat :+1:

Awesome! Thanks so much for all the help!

Don’t know if it’s relevant to what you’re trying to do but one thing to bear in mind, unlike with emulated_hue, Harmony won’t know whether a light is on or off so you’ll need to set the automation to toggle or have a separate on and off one which you can then add to the short and long presses on your remote to create the same effect.

I also have a dim and bright scene in HA for the lounge lights I use most and these are set to the up and down brightness buttons on the remote, to do this with two sets of lights you could set different scenes to the long press for those buttons too.

Good to know! Was actually just working on the automations. I am trying to control the volume for my Yamaha Amp, which isn’t line of sight to my Harmony, so I need to use the wifi control.

Daft question before I try and use this (got my Hub yesterday)…

But first - wow! Thanks! This looks awesome.

I dropped the ha-emulated-roku.py file into /config/custom_components
WHen I restart I see:

Error during setup of component emulated_roku
Traceback (most recent call last):
File “/usr/src/app/homeassistant/setup.py”, line 142, in _async_setup_component
result = await component.async_setup(hass, processed_config)
File “/usr/local/lib/python3.6/asyncio/coroutines.py”, line 212, in coro
res = func(*args, **kw)
File “/config/custom_components/emulated_roku.py”, line 51, in async_setup
from emulated_roku import RokuCommandHandler, make_roku_api
ModuleNotFoundError: No module named ‘emulated_roku’

Any assistance would be greatly appreciated :slight_smile:

And, disregard. It worked after another restart…?

Anyway, awesome! I can control my lights with my Harmony One :smiley: thank you so much!

1 Like

After recently upgrading my python version and hass, I’m getting conflicts with this component:

2018-04-25 21:25:41 ERROR (SyncWorker_9) [homeassistant.util.package] Unable to install package netdisco==1.3.0: emulated-roku 0.1.2 has requirement aiohttp==2.3.5, but you'll have aiohttp 3.1.1 which is incompatible.

Is there a workaround for this or is my virtualenv mucked up?

@mindigmarton Perhaps https://gitlab.com/mindig.marton/emulated_roku/blob/master/setup.py#L16 should be aiohttp>=2.3.5?

I’ve updated emulated_roku to 0.1.4 in the component so it requires a broader aiohttp version (>2,<4).
The aiohttp API should remain unchanged so it probably won’t break when it is updated in home assistant.

1 Like

Quick question, I just updgraded a few components and got this error.

emulated-roku 0.1.3 has requirement aiohttp==2.3.6, but you’ll have aiohttp 3.1.1 which is incompatible.

I know it says its incompatable, but is it really? What can I do if it is?

Thanks

It’s not. Just update the component’s requirement to emulated_roku==0.1.4 (or download the new file), nothing changed except the dependency range.

I’m still learning a bit. Can you tell me where to change that? Thanks

Does anybody know if this will stil work if the Harmony Hub cannot access the internet? afaik the harmony hub is pretty much useless when internet access is missing :frowning:

I’m not sure what you mean about requiring internet for Harmony Hub. It only requires wifi. Internet is not used unless you are connecting remotely.

I will say this has been working great for me, but I have not tested without internet, but again, not a single reason why it should not work

thanks for the input @ptdalen. I’ve never had reliable long term success with Harmony Hub when it can’t see the internet, that’s all.

Seeking assistance please. Really want this to work, but unsure what I’m doing wrong. Do I need to edit the .py script or does it work as-is?

I’ve copied the emulated_roku.py file to \config\custom_compoments, and I’ve got the emulated portion added to my config.yaml, but not sure if I need to add something else?

 emulated_roku:
  host_ip: 192.168.0.117 
  upnp_bind_multicast: True
  listen_ports:
    - 8060

This is the error I get in the log:

starting version 3.2.4
Testing configuration at /config
Fatal error while loading config: invalid syntax (emulated_roku.py, line 1)
Failed config
General Errors:
- invalid syntax (emulated_roku.py, line 1)
Successful config (partial)

The first time I put it all in, there were no log errors, but I could not see the device from Harmony, so I rebooted HA, and since then it’s been log errors ever since.

@mindigmarton do you want any help to complete this to deliver this to HASS?

Check the file you’ve downloaded. There’s been previous discussions in the thread about downloading with the wrong link. When downloading from GitLab or GitHub, always download the raw file (“Open Raw” or “Raw” button).

@Robban Thanks, I should have some time this week to open the PR! My hass setup was non-functional the last month, waiting for components to be shipped and then setting it all up again took a while.

I’d be happy to review it when you’re ready.

What would be totally awesome was if you exposed it as a config entry from the start.

That worked, thanks!