Share your Lovelace Home Theater Remote Setup

Using the new lovelace UI editor.

Great idea! Now I get to humble brag about my setup again. I keep the Home Assistant dashboard simple and remove If you have a TV and AV receiver supported by Home Assistant, you can track power state, input and create some really cool automations. Logitech Harmony is no longer needed in my setup.

  • Power state is reflected in the button cards. Green means the device is turned on. In this case, the AV receiver and TV are both on.
  • THe buttons Xbox, Ps4, Switch initiate a script to turn on receiver and TV and switch to correct inputs. It’s basically like the Logitech Harmony function. Buttons are highlighted if it detects if the AV receiver and TV are on the appropriate input.
  • On the right column, I can see what is currently playing on the TV, receiver, smart display and Google Home speakers. I use the Playstation4 component to display current game playing
3 Likes

Oh I see! Unfortunately the Harmony tie in doesn’t give you straight forward control in terms of being able to add buttons or anything. If you copy my code above and use the ‘Manual Card’ option then substitute the device id field and the commands.Oh and you will need to change the Binary Sensor to match yours as well, or just create a binary sensor with the same name.

a different take… use google home/IFTTT to turn amp and projector on via broadlink blackbean mini, and android box on via wakeonlan. Then yeelight lightstrip.

normal remote is used to control kodi, but the lightstrip will fade/brighten depending on what is happening…

script.yaml

movietime:
  sequence:
    - service: switch.turn_on
      entity_id:
        - switch.yamaha_amp_power
        - switch.benq_proj_power
    - service: light.turn_on
      data:
        entity_id: light.rupusstriplight
        transition: 9
        brightness: 255
    - service: wake_on_lan.send_magic_packet
      data:
        mac: d0:76:58:0b:e6:8a
        broadcast_address: 192.168.1.255
    - delay:
        seconds: 15
    - service: switch.turn_on
      entity_id:
        - switch.yamaha_amp_dtv
    - service: light.turn_on
      data:
        entity_id: light.rupusstriplight
        transition: 1
        effect: "Twitter"
    - service: tts.google_say
      data:
        entity_id: media_player.rumpas_room
        message: 'Ready to Go!'
    - delay:
        seconds: 5
    - service: switch.turn_on
      entity_id:
        - switch.benq_proj_mute

startmovie:
  sequence:
    - service: tts.google_say
      data:
        entity_id: media_player.rumpas_room
        message: 'Enjoy the film!'
    - service: light.turn_off
      data:
        entity_id: light.rupusstriplight
        transition: 5

automations.yaml

- alias: 'LIGHT: turn UP the strip light when Kodi pauses for at least 3 seconds'
  initial_state: true
  trigger:
    - platform: state
      entity_id: media_player.m8spro_kodi
      to: 'paused'
      for:
        seconds: 3
  action:
    - service: light.turn_on
      data:
        entity_id: light.rupusstriplight
        transition: 5
        profile: 'relax'

- alias: 'LIGHT: turn ON the strip light when Kodi goes from play to idle for at least 3 seconds'
  initial_state: true
  trigger:
    - platform: state
      entity_id: media_player.m8spro_kodi
      from: 'playing'
      to: 'idle'
      for:
        seconds: 3
  action:
    - service: light.turn_on
      data:
        entity_id: light.rupusstriplight
        transition: 5
        profile: 'reading'

- alias: 'LIGHT: turn ON the strip light when Kodi goes from paused to idle for at least 3 seconds'
  initial_state: true
  trigger:
    - platform: state
      entity_id: media_player.m8spro_kodi
      from: 'paused'
      to: 'idle'
      for:
        seconds: 3
  action:
    - service: light.turn_on
      data:
        entity_id: light.rupusstriplight
        transition: 5
        profile: 'reading'

- alias: 'LIGHT: turn OFF the strip light when Kodi starts playing'
  initial_state: true
  trigger:
    - platform: state
      entity_id: media_player.m8spro_kodi
      to: 'playing'
  action:
    - delay:
        seconds: '2'
    - service: light.turn_off
      data:
        entity_id: light.rupusstriplight
        transition: 5

Currently I just use the mini media player with buttons that execute Harmony remote scripts. While currently simple I have the scripts already made for any Harmony function, but I need to be inspired as you mentioned in the op

Here’s a sample screenshot from my Harmony remote setup:

Thread with more information and a link to my full setup:

7 Likes

Using a Broadlink RM mini3 wired on my ceiling to control my logitech speakers (vol/source) and samsug TV.
Tv controls also work on firestick 4k and kodi through HDMI-CEC

Lastly kodi http commands for kodi operation through http api.
In order to be able to select more kodi devices depending on room and device IP, i have set up this input_select and template_sensor:


input_select:
  kodi_device:
    name: Kodi Device
    options:
      - Living Room
      - Bed Room
      - Backup
      - PC
      
sensor:
  - platform: template
    sensors:
      kodi_control_ip:
        friendly_name: "Kodi Ip Address"
        value_template: >-
          {% if is_state("input_select.kodi_device", "Living Room") %}
            xxx.xxx.xxx.xxx
          {% elif is_state("input_select.kodi_device", "Bed Room") %}
            xxx.xxx.xxx.xxx
          {% elif is_state("input_select.kodi_device", "Backup") %}
            xxx.xxx.xxx.xxx
          {% elif is_state("input_select.kodi_device", "PC") %}
            xxx.xxx.xxx.xxx
          {% endif %}

My shell commands are written in this manner in order to change depending on the above template_sensor value:

shell_command:
  kodi_up: 'curl -u "UN:PW" --header "Content-Type: application/json" --data "{\"jsonrpc\":\"2.0\",\"method\":\"Input.Up\"}" "http://{{states.sensor.kodi_control_ip.state}}:8080/jsonrpc"'

The specific IR commands for my samsung inputs were found here.
Just sharing again cause it took me some digging to find the ones working for my TV.

They do work to enable the source directly but, unfortunately, because of the fact that the TV creates new (duplicate) sources when a cec device is connected (ie hdmi2 and firestick-CEC device) the direct source commands take me to the simple hdmi source and do not enable cec control. So i still have to manually browse to select the cec option.

1 Like

Cool, and I just moved the light strip last night (falling off behind a radiator) - so this will do nicely for a new job under the TV stand :slight_smile:

Cheers!

I really like this idea actually! I might add this for audio controls when watching the chromecast! Thanks for the idea.

Mine is very plain lovelace but it works! remote is a mixture of harmony hub and some custom scripts for manipulating my PS4 via the ps4 component.

I’m interested in your Samsung TV config.
Any chance of posting the Lovelace and (more importantly) the scripts behind the buttons?

Thanks.

Here is a link to my lovelace remote card: https://gist.github.com/gavindsilver/fedfba71d571dc05d14b80f0e52b4d10

and it looks like i just have the one script to turn on the ps4 and then change the media player source of the ps4 via media player select source to “netflix”: (requires ps4 component)

'1557274579907':
  alias: PS4 Start Netflix
  sequence:
  - data:
      entity_id: media_player.playstation_4
    service: media_player.turn_on
  - wait_template: '{{ is_state(''media_player.playstation_4'', ''on'') }}'
  - data:
      entity_id: media_player.playstation_4
      source: Netflix
    service: media_player.select_source
2 Likes

Thanks but sorry, I misunderstood. I thought you had scripts that controlled the TV rather than the Harmony Hub. :blush:

I have a small remote that I default to. I am using the Conditional Card to hide what is un-needed at the moment. When the TV is off I can just click Netflix, DVD, or Satellite to run a script to turn the TV on and get started. Clicking the Netflix button: sets the remote to Netflix mode, turns on the TV and the FireTV, sets the TV to the FireTV input, and sets the FireTV to the Netflix app. The remote provides TV power, Volume, Mute functions and the most relevant buttons for the device I am using.

Once I select Netflix I have the normal controls that I use with Netflix. The key icon runs a script that enters our parental controls passcode. The DVD remote gives an eject button.

I also have a full remote for each device.

4 Likes

Not to burst anyone’s bubble but if you haven’t done this yet I wouldn’t suggest it. You aren’t going to like using this fancy remote you create. Using a screen as a remote control is awful because it has no tactile feel.

Don’t get me wrong, it’s definitely cool and potentially a fun project but not very useful.

I was going to ask this yesterday but I didn’t want to

:rofl::rofl::rofl:

And actually I can’t imagine ever using it when I have to

  1. Get my phone out of my pocket
  2. Turn it on
  3. Start the app
  4. find the right view
  5. Control my TV :champagne:
    (tsk, all those first world problems…)

But, I still went on and did it for a

Not going to lie, I kind of agree a with this however the main use of the UI remote will be for my sister and mom who hate using this logitech remote we have with the worst touchscreen ever.


That way if they don’t want to mess with that they can just use their phone

I suggest one like this.

https://www.proavhometheater.com/T2I.png

YMMV. I can see benefits to both approaches. Yes, there’s something to be said about the tactile feel of a real remote, but anecdotally, I bought a Harmony Hub in December with the physical companion remote to have the option of a physical remote. I think we’ve used it twice. In our case, the majority of the content we watch is on Chromecast, so we’re comfortable pulling out a phone to start watching anyways, and then we already have a phone out in case we need to make adjustments later. With a well-designed, simple phone remote interface, without an overload of buttons (most buttons on a typical physical remote go unused 90% of the time anyhow), with the buttons well-spaced out and sizable enough to provide good touch targets, it can work very well. And I think there’s something to be said about being able to customize your remote layout for your specific needs. For example, I’ve created multiple lengths of skip buttons (15 seconds, 3 minutes - great for a typical commercial break, 15 minutes - to skip halftime of a DVR’ed sporting event), something a physical remote will not typically accommodate as well.

1 Like

I have a seperate hub for my TV setup and i barely use the remote too because I don’t watch cable and just chromecast most things. So I am either relying on my phone anyways or using my Google Home to control the TV. But the remote does get a little use but mostly just for powering on/off system, volume control, and the occasional play/pause/skip of the chromecast through CEC.

However, if I was watching cable the remote would be used a lot more to punch channel numbers in and that is why the remote in the family room is terrible because the numbers rely on the touch screen which registers too many wrong numbers or don’t register number presses at all.