Integration: emulated_roku - Sofabaton compatibility

Did you deactivate your firewall?
emulated roku opens a webserver for the apps to be parsed.

Maybe that’s the issue.

Yes, you have to see your defined “apps” in the sofabaton app.

Sorry i just have a windows PC and android devices. Cant help any further here.
Did your Mac has a firewall? Maybe deactivate it during the discovery.

You have to use “example.py” and NOT “advertise.py”!

Thanks for the quick replies. Yes, I’ve disabled the firewall on the windows machine to make sure. Also, since the webserver is accessible on the network, this is clearly working.
The only part I don’t have control over is the app on iOS, I don’t have a clue why it’s not discovering the system :disappointed:

Ok, than it seems to be an incompatibly between the emulated Roku and Mac.

Do you have any chance to get/borrow an Android device and try it there? Maybe after you have added the device to the sofabaton hub with the android device, you can use it with your Mac device?

Unfortunately I will have to find another way. No one in sight with an Android device that I know.
This is my iPhone btw, not a MacOS issue. I can see the XML on my Mac without issues.
It’s just too bad :confused: There must be differences in the apps between iOS and Android.

Hi pOpy, I tried it all again after re-pulling from git and now it is working :slight_smile:

Have 18 custom aps linked now and it all works, bit of a mess setting up the automations on the back end with that many though… Tried to use an existing blueprint to make things easier but can’t get it to work so far - link.

Yeah, sadly it seems an iOS sofabaton app issue.
Try to reach out to the support, maybe they can help.

Nice that it also works for you.
I have answered you in the linked thread with my automation (which covers all emulated roku key presses from two rooms/remotes).
Hope this helps.

pOpY

Good shout thanks!

Their support pointed me back to this thread :sweat_smile:

:sweat_smile: :thinking: Hmmm.
You are here again :sweat_smile:
Sadly, I don’t have apple devices to help you any further.

My best advice is to get an (cheap) android device to pair it to your account and then use your apple devices.

1 Like

No worries. I just wanted to let them know that was me at the end of the thread :slight_smile:

1 Like

I’ve got beta access to the Sofabaton app via their support. Now it works! Just as you Android guys, the iOS app sees the server and the rest is history :tada:

Thanks for the update and nice the issue got sorted by sofabaton.

1 Like

Cheers, much appreciated your help too! Having HA integration to me is the endgame for a universal remote, it’s the most useful feature (also I would not have bought the remote if I didn’t read this thread prior).

So, I guess PSA:
Support for Roku discovery from iOS in an upcoming firmware.

1 Like

You’re welcome :grin:

1 Like

Hi, Logitech Harmony user here, but i also want to switch to Sofabaton, that remote looks nice…
Just wondering, i dont have experience with Roku yet, but why is it needed? i though sofabaton can use an API also? (cloud) , why not use that one? whats the advantage of roku besides its local?

For me the most important stuff, is to see the current activity in HA, and offcourse send commands from the devices (tv/receiver/…) to the hub FROM HA offcourse

is that all possible? thnx

As you said. The benefit of the Roku API is → it’s local!
For most of us, that’s the biggest benefit :sweat_smile:

The current Roku API (which sofabaton is using) has just commands in one direction,
sofabaton → HA. Just keypresses (incl. definable custom commands (apps)) will be sent and HA can trigger something.

You can “emulate” the last activity, by just adding custom commands and adding them to “startup” on every activity. This way, every time an activity is triggered on the sofabaton device, HA will receive which one.

But there is no other answer about the current status from the sofabaton remote.

I dont played with their cloud api (because it’s cloud based :rofl:),
but i think it’s just an web based api.
I think it’s pretty limited. you can just trigger activitys or commands.

ok, thnx for the explenation!

Hello all, I am running into an issue starting the web server using the example.py file on a windows box. I get an error about the loop. Any suggestions would be greatly appreciated.
TypeError: Application.init() got an unexpected keyword argument ‘loop’

example.py:21: DeprecationWarning: There is no current event loop
  loop = asyncio.get_event_loop()
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:emulated_roku:roku_api:starting server 192.168.123.125:8060
Traceback (most recent call last):
  File "D:\Emulated_Roku\example.py", line 23, in <module>
    loop.run_until_complete(start_emulated_roku(loop))
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\davel\AppData\Local\Programs\Python\Python313\Lib\asyncio\base_events.py", line 720, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "D:\Emulated_Roku\example.py", line 18, in start_emulated_roku
    await roku_api.start()
  File "D:\Emulated_Roku\emulated_roku\__init__.py", line 405, in start
    self.api_runner = await self._setup_app()
                      ^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Emulated_Roku\emulated_roku\__init__.py", line 366, in _setup_app
    app = web.Application(loop=self.loop,
                          middlewares=[self._check_remote_and_host_ip])
TypeError: Application.__init__() got an unexpected keyword argument 'loop'