Emulated Roku: add support for Logitech Harmony "keyup" and "keydown"

Hi, i’m using Emulated Roku with great pleasure: i am using a Logitech Harmony Elite remote to control automations in Home Assistant. The events (button presses) are all pushed to Home Assistant, except for the following two buttons:

  • short press on +
  • short press on -

image

I’ve validated this via the developer tools: no message is comming in.
image

Oddly, it is working with a long press on the same buttons (that is what you see in the screenshot above).

I think this relates to the following comment in the documentation:

  • Some Android remotes send key up/down events instead of key presses.
    → not applicable to me, i’m using a Logitech Harmony Elite remote.
  • Functionality other than key presses and app launches are not implemented yet.
    → this might be applicable: since these are the + and - buttons, the remark is probably about these buttons?
    image

It would be great if support for the + and - buttons could be added.

URL

Version

2021.5.5

My keyup and keydown works. I’ve assigned short and long Roku commands with the Windows desktop program and Emulated Roku works fine.
In the screenshot below “Home Assistant” is the eumulated Roku. Ignore “Light1” and “Light2” - they’re one of my deadend attempts to make emulated Roku work.

1 Like

Thanks for sharing. At the same time, that is so weird, i am puzzled. Could you please make a screenshot of the Developers Tools page, “states”, while listening to roku_command, and short-pressing the + button?

I’m not sure I quite understand - I went to the developers tool page “events” and presseed the + button

Event 0 fired 7:28 PM:
{
    "event_type": "roku_command",
    "data": {
        "source_name": "Home Assistant",
        "type": "keypress",
        "key": "Home"
    },
    "origin": "LOCAL",
    "time_fired": "2021-06-08T09:28:40.740571+00:00",
    "context": {
        "id": "bdc4f1574df7446e3ebf8cc407677dfc",
        "parent_id": null,
        "user_id": null
    }
}
1 Like

Thank you, it is working now. I am not sure what went wrong, but i guess i mapped an invalid roku-command to the short-press.