Universal Remote Card - Buttons, Touchpads, Sliders, and Keyboards for Multiple Platforms

This has been a life saver for me. my wife is constantly loosing the remote to the TV (I have a helium balloon tied to it to stop this) and having it available on my phone is great.

Is there a way to choose the “TV” app like launching the other apps? Or even just selecting an HDMI source?

1 Like

Choosing the TV app or changing the TV input source is outside of Android TV and a function of your TV. It’s probably being done through an IR command. What TV do you have? I’m personally using a Broadlink RM4 Pro to send IR commands to my AV receiver, and then track what it’s states should be using Home Assistant input selects and booleans. I then use automations to detect when the input selects’ states change, and then call the appropriate IR commands.

Its a Sharp. I can access the TV operations via an app, there is a ‘live tv’ app that i can select to launch the HDMI source and on HA it says ‘com.mediatek.wwtv.tvcenter’

In that case it sounds like you need to find the deep link using this guide and create a custom source action for it.

I’ll have to look at this later, ADB over the network is disabled and i’m at work. hopefully there is an option in the settings to enabled ADB over the network as I dont think there is a way to connect a PC to it

I tried to use this Kodi card GitHub - Nerwyn/android-tv-card: Android TV Remote Card (with HA actions, touchpad, haptic, and keyboard) (with my mediaplayer id)

But all i get is an error: service remote.send_command not found.
What do i miss?

What version of Home Assistant are you on? If you’re getting the error service remote.send_command not found then something may be up with you Home Assistant server.

2024.1. Does Kodi use this services? There are alot of kodi.call_method services in tha yaml.

You’re right. Still I’m not seeing that error when I try it on my server using that remote config.

I have dropout.tv and nebula.tv working with custom icons, not sure where to share that, so I’ll dump it here.

note the custom icons are centered manually because I could not find how to center an object on the canvas in inkscape at 2AM I mention it because I’m sure that kind of thing bothers people and is probably real easy to fix if you actually know how to use a vector graphics editor.

custom_actions:
  dropout:
    icon: dropout
    service: remote.turn_on
    data:
      activity: vhxdropout://
    target:
      entity_id: remote.<your entity>
  nebula:
    icon: nebula
    service: androidtv.adb_command
    target:
      entity_id: media_player.<your entity>
    data:
      command: >-
        am start -a android.intent.action.VIEW -n
        tv.standard.nebula/.tv.features.splash.view.activities.SplashActivity
custom_icons:
  dropout: >-
    m 1.8731346,4.8818924 c 0,0 5.1325618,0 5.1325618,0 0,0 0,5.1325616
    0,5.1325616 0,0 -5.1325618,0 -5.1325618,0 z m 0,8.8708896 c 0,0 5.1325618,0
    5.1325618,0 0,0 0,5.132561 0,5.132561 0,0 -5.1325618,0 -5.1325618,0 z m
    8.1098917,7.75439 c 0,0 0,-18.786066 0,-18.786066 0,0 3.0495417,0
    3.0495417,0 5.16589,0 9.393033,4.2271425 9.393033,9.393033 0,5.16589
    -4.227143,9.393033 -9.393033,9.393033 z
  nebula: >-
    m 9.2053254,14.360664 2.5645706,7.510643 2.433883,-7.563553
    7.930223,-0.02646 L 15.800616,9.5182958 18.312806,1.9288163
    11.796352,6.6918178 5.2269861,1.8505087 7.6873234,9.5182958
    1.4581725,14.281827 Z
1 Like

Version 3.3.0 has just been released. This release introduces multi touch touchpad gestures and more customizable repeat on hold commands. You can now program separate actions for two-plus finger swipes, taps, and holds on the touchpad for up to twenty-two different actions. You can also make any key repeat on hold by setting it’s hold action to repeat, like the directional and volume keys are by default. See the release notes and README to learn more about how to use these new features.

2 Likes

hey nerwyn, first of all, wanted to add my voice to the many that express thanks to you (and the folks you derived this from). this is really great work in how powerful and flexible it is.

one minor feature request… would love to have custom_actions let me define button_press vs button_release

the reason for this is that for some video services, the press time is what triggers fast forward (prime video, for example). so i’d send the adb_command sendevent for press down and up appropriately. right now i’m faking it using your hold_action, and having that trigger a sendevent down, delay 3 secs, sendevent up. but as you can imaging that has some annoying side effects…it takes the extra hold_action time before that triggers. and during the 3 subsequent 3 seconds i can’t send another event to double the speed of the fast forward.

certainly not a showstopper or anything, doesn’t undermine how great this card is! thanks again to you and those you inherited from!

If you make a feature request on the repository on the issues page I can look into it and we can discuss it more there. Using button hold time to determine hold_secs sounds like a good idea, but I want to hear more about how you’re doing it in detail.

just stared to use HA and this is amazing remote, thank you

i just wanted to know if there is a way to search by voice and not text

Not yet no. I had planned to do this a while ago but it fell by the wayside. If you want you can create a feature request for it on the repository and I will get back to it eventually.

2 Likes

Ok, my ideal remote with multiple devices controlled created! How to make those button real 3d and whole remote as physical device ? Is there any hidden option for that ? :wink: I’ve heard that JS is using constructor for objects, how to ask this constructor to build my remote hardware ? :wink:

is it possible to override specific keys in the keyboard? backspace, for example, isn’t the same for chromecast and fire tv, so i’d like to override backspace with the appropriate sendevent codes.

Certain keys (backspace, delete, enter, left arrow, and right arrow) are sent using the Android TV Remote API, which isn’t available for Fire TV. What I can do is create an alternate keyboard_mode (like there is for Kodi) that sends these commands via ADB instead. Can you create a feature request on the repo?

Nerwyn, just got an Android TV in the Office and this is fantastic :+1:

I’ve configured most things we need, but I’m struggling with the skip forward and back buttons, where I took the code from your Apple TV example, working for Plex.

  skip-backward:
    icon: mdi:rewind-10
    tap_action:
      action: key
      key: skip_backward
  skip-forward:
    icon: mdi:fast-forward-10
    action: key
    key: skip_forward

I’ve got a Panasonic 43MX850 and the remote doesn’t have these keys, but I would have thought that the code would be directly executed against Android TV / Plex App that does have skip in the UI.

If you could point me in the right direction that would be great !

I’m confused, you’re using the commands from the Apple TV example, which in turn are from the Apple TV integration, but are using them with an Android TV? You shouldn’t be using the Apple TV example’s custom actions if you’re on Android TV. If you’re using an Android TV then fast_forward and rewind are already default keys and you should just put them in your rows config without creating custom keys for them.