Unified Remote Integration

Ok guys, I know some people was waiting for this, actualy I was part of it, but I was tired of wait so…

Here is a Unified Remote integration made by me, is my first contribution for open source and my first integration I’ve created for Home Assistant.

Comments here will be welcome, but if want to report a problem or something like that, please open a issue on Github, so it will make sure that I gonna see your question or report. Thank you!

3 Likes

Looks good. Now if only there was an Android TV version - specifically Nvidia Shield… :grinning:

If I was using my Mac as my media centre this is definitely something I would try.

You could do some hacks to make it, considering that android is like a linux distribution

This looks awesome thank you. is there a way to use the mouse / touchpad?

Not yet, I’ll try to make this happen

If some one can help me…
https://community.home-assistant.io/t/i-cant-turn-my-integration-to-async/

Integration works great! Is there any way to read an event? I would like to display the current track that Winamp is playing. The Network Monitor in Chrome shows the following information, I would like to grab the “Text” field to display in a card on my HA dashboard:

[{Action: 5, Destination: "web-ffd6c2a9-f179-4a26-ab6c-5db8996f2e4f", ID: "Unified.Winamp",…}]
0: {Action: 5, Destination: "web-ffd6c2a9-f179-4a26-ab6c-5db8996f2e4f", ID: "Unified.Winamp",…}
Action: 5
Destination: "web-ffd6c2a9-f179-4a26-ab6c-5db8996f2e4f"
ID: "Unified.Winamp"
Layout: {,…}
Controls: [{ID: "info", Text: "3215. Metal Massacre - [1984] Metal Massacre 5 - Future Tense-Nightmare"}]
0: {ID: "info", Text: "3215. Metal Massacre - [1984] Metal Massacre 5 - Future Tense-Nightmare"}
ID: "info"
Text: "3215. Metal Massacre - [1984] Metal Massacre 5 - Future Tense-Nightmare"
Response: 5
Source: "MYPC"

I’m very thankful for this integration.

I made 4 cards for the remotes I use the most which I’ll toss these here in case anyone is interested.

Hopefully other people will find them useful or inspiring. Feel free to repurpose and share.

(These cards require lovelace-card-mod)

 

PotPlayer

2023-05-29 17 21 07 (3)

type: custom:mod-card
card:
  type: vertical-stack
  cards:
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: volume_down
          icon: mdi:volume-medium
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: volume_mute
          icon: mdi:volume-mute
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: volume_up
          icon: mdi:volume-high
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: previous
          icon: mdi:skip-backward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: open_file
          icon: mdi:plus
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: next
          icon: mdi:skip-forward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 3
    - type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: stop
          icon: mdi:stop
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: fullscreen
          icon: mdi:arrow-expand-all
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: play_pause
          icon: mdi:play-pause
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: big_back
          icon: mdi:rewind-30
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: small_back
          icon: mdi:rewind-5
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: small_forward
          icon: mdi:fast-forward-5
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.PotPlayer
              action: big_forward
          icon: mdi:fast-forward-30
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 4
card_mod:
  style: |
    ha-card {
      background: #42A5F5;
      border: none;
      padding: 8px
    }

 

Spotify

2023-05-29 17 21 07 (4)

type: custom:mod-card
card:
  type: vertical-stack
  cards:
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:volume-medium
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_mute
          icon: mdi:volume-mute
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_up
          icon: mdi:volume-high
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 3
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:skip-backward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:skip-forward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
    - type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:shuffle-variant
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:play-pause
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.Spotify
              action: volume_down
          icon: mdi:repeat-variant
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
card_mod:
  style: |
    ha-card {
      background: #3bb92a;
      border: none;
      padding: 8px
    }

 

MusicBee

2023-05-29 17 21 07 (2)

type: custom:mod-card
card:
  type: vertical-stack
  cards:
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: volume_down
          icon: mdi:volume-medium
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: volume_mute
          icon: mdi:volume-mute
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: volume_up
          icon: mdi:volume-high
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 3
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: previous
          icon: mdi:skip-backward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: next
          icon: mdi:skip-forward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: stop
          icon: mdi:stop
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.MusicBee
              action: play_pause
          icon: mdi:play-pause
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
card_mod:
  style: |
    ha-card {
      background: #e0a821;
      border: none;
      padding: 8px;
    }

 

YouTube Web

type: custom:mod-card
card:
  type: vertical-stack
  cards:
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: volume_down
          icon: mdi:volume-medium
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: volume_up
          icon: mdi:volume-high
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: rewind
          icon: mdi:rewind-outline
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: fast_forward
          icon: mdi:fast-forward-outline
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: previous
          icon: mdi:skip-backward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: next
          icon: mdi:skip-forward
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
    - square: true
      type: grid
      cards:
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: fullscreen
          icon: mdi:arrow-expand-all
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
        - type: custom:button-card
          entity: ''
          tap_action:
            action: call-service
            service: unified_remote.call
            service_data:
              target: 192.168.2.17
              remote_id: Unified.YouTubeWeb
              action: play_pause
          icon: mdi:play-pause
          show_icon: true
          show_state: true
          card_mod:
            style: |
              ha-card {
                border: none;
                background-color: #ffffff10;
                box-shadow: none;
                margin: 0;
                width: 100% !important;
                height: 100%;
                position: relative;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
      columns: 2
card_mod:
  style: |
    ha-card {
      background: #d41a1a;
      border: none;
      padding: 8px
    }

Personally I find the cards take up too much screen real estate. So I throw them into another horizontal-stack (2 to a row).

2023-05-29 17 36 28

I may end up displaying the full-size cards on mobile devices, and then hiding them on large displays (and vice versa) using the mediaquery option in lovelace-layout-card.

I’m keen to see what cards other people have come up with.

1 Like

I want to shut down an app on my Mac through HA control. I need to send a F5 and CMD-Q to the app - all of which I can do in universal remote. But I haven’t figured out how to get the app into focus so I can send the commands. Since Unified remote doesn’t appear to have any forum and I can’t find it in their FAQs I thought I would see if someone here knew. Thanks.

Hey y’all. I’ve just added Unified Remote as a default platform for my card Universal Remote Card. This includes keyboard text and mousepad support.