Emulated Roku for Harmony


#163

Awesome, this worked! Thank you so much, my Harmony is way more useful now :grinning:
Could you please add this to the documentation?

Another question unrelated to emulated_roku, since the firmware update of the harmony and the problems it caused I’m afraid that it will stop working altogether with a future firmware upgrade. Can I block internet access for the harmony without losing any critical functionalities?


#164

As long as Harmony supports Roku players and the Roku API is open it should continue to work. Unfortunately I don’t know any ways without crippling the app.

I’ve already pushed the changes to the Home Assistant docs here. The code has changed quite a lot over time since I’ve submitted the PR and I haven’t updated the gitlab repo since.


#165

I’m more interested in the “harmony” side of things like does controlling devices with the harmony need an internet connection? Does the android app need internet connection?

I’m not so familiar with the harmony, I bought it years ago and only used it to control some devices with the remote and with the android app for configurations.


#166

Controlling devices, I don’t think so, but I’m pretty sure adding devices / modifying activities needs internet access, that’s why I said “crippling the app”.


#167

Ah now I understand. How do you handle this? As far as I know there is no way to block firmware updates except for blocking the internet connection right?


#168

I don’t use the Harmony API at all, so I just let it be. I have an activity that’s perpetually on, and everything pretty much goes through emulated roku. I just use the physical remote and hope to never touch the app. (Logitech should make a companion remote that works with the unifying receiver like a keyboard)


#169

Good news everyone! emulated_roku has been merged and should be available in the next release.
There have been couple of changes to the configuration syntax and it’s also available via the Integrations page so you can set up the component more easily.

If you want let Harmony auto-find the Roku if your Home Assistant IP changes, you can either set the name property to your already used auto-generated name, or re-add the component in Harmony. This step is completely optional, and the component will keep working whatever name you specify.

emulated_roku:
  host_ip: 192.168.1.67
  listen_ports:
    - 8060:8060

becomes:

emulated_roku:
  servers:
    - name: Home Assistant
      listen_port: 8060
      advertise_port: 8060
      host_ip: 192.168.1.67

#170

@mindigmarton, thanks so much! This component is quite essential if you own a harmony. I love that it has made its way into home assistant. Cheers!


#172

The custom component was working but the new integrated version will not start

I am getting the following los message:

2019-02-03 21:11:26 DEBUG (MainThread) [homeassistant.components.emulated_roku] Intializing emulated_roku Home Assistant 2 on 192.168.1.100:8061
2019-02-03 21:11:26 DEBUG (MainThread) [homeassistant.components.emulated_roku] Starting emulated_roku Home Assistant 2
2019-02-03 21:11:26 ERROR (MainThread) [homeassistant.components.emulated_roku] Failed to start Emulated Roku Home Assistant 2 on 192.168.1.100:8061
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/emulated_roku/binding.py", line 112, in emulated_roku_start
    await self._api_server.start()
  File "/config/deps/lib/python3.6/site-packages/emulated_roku/__init__.py", line 424, in start
    reuse_address=True)
  File "uvloop/loop.pyx", line 2893, in create_datagram_endpoint
  File "uvloop/loop.pyx", line 2878, in uvloop.loop.Loop.create_datagram_endpoint
OSError: [Errno 98] Address in use
2019-02-03 21:11:26 DEBUG (MainThread) [homeassistant.components.emulated_roku] Stopping emulated_roku Home Assistant 2

Any idea?

[EDIT]

Solved, I think it was a port which was already in use… Now it is working :slight_smile:

Thanks!


#173

I’m trying to connect the roku android app with emulated_roku.

emulated_roku:
  servers:
    - name: Studio Remote
      listen_port: 8060
    - name: TV Remote
      listen_port: 8061

They appear in the roku app on my phone but when I try to connect I get:

“Connection Error” : “Error connecting to Studio Remote. Please try again”.

Tried quite a few times with home assistant restarts. There is nothing in the home assistant logs. Any ideas?


#174

Looks like they’re using an undocumented API endpoint (/ecp-session) which is missing from emulated_roku. Unfortunately I don’t have a Roku and I can’t find any info on it.