Make A Dumb TV Smarter with a Chromecast, Roku, and Home Assistant

Starting my Smart-Home with a Broadlink RM-Pro was such a great first step because it gave me control of my IR devices at a fraction of the cost of the other devices out there, but it left me wanting more. My TV, and I think most out there, use a single On/Off function, as opposed to having a separate “On” button and “Off” button. So when I set the Broadlink up to control the TV, it worked, but if you gave the “Off” command while the TV was already off, it would turn back on, and vise versa. I tried to create a script that would use the state of the TV (in Home Assistant) in deciding whether or not to send the command to the TV, but this only worked if Home Assistant was used the turn the TV on in the first place. Using the remote would throw a wrench right into this. This was not super great for the SAF (spouse approval factor). With the noticeable decline of my Roku Express and a birthday on the way, I started looking into ways to make our dumb TV a little bit smarter.

I had 4 main goals that I wanted to be able to accomplish:

  1. Use a single Remote Control for the system.
  2. Be able to wirelessly cast videos from our computers, Chromebooks, cellphones and tablets.
  3. Have the On/Off state of the TV be accurately reflected in Home Assistant, no matter how the TV was turned on.
  4. I wanted a majority of our streaming to be done on an Ethernet connected device.

All of this was easy to accomplish using a Chromecast and a Roku Ultra. The Chromecast provided a great device to Cast videos (duh, right?) and to reflect the state of the TV, while the Roku Ultra gave me a single remote with TV power & volume controls as well as an Ethernet connection. I got what I wanted and it passed the spouse test! The Roku is also compatible with Home Assistant; I can use Alexa commands to turn the TV on, off (I needed the Broadlink to do this), and to switch between Netflix, Hulu, and Amazon video.

This guide will include:

  • Using the Chromecast to reflect the state of the TV in Home Assistant.
  • Integrating the Roku with Home Assistant.
  • Creating scripts or Alexa commands to control the TV & Roku.

Reflect TV State, in Home Assistant, with Chromecast

I won’t go over setting up the Chromecast here; they are very user friendly devices. I will just show you how to use the Chromecast to reflect the TV’s state. In order for this to work, however, you will need to plug the Chromecast USB into the TV to power it. This way, when the Chromecast is on, so is the TV.

img_0210.jpg

  • Do not add the Chromecast to the Home Assistant config file. If it’s added, but off, you can get errors because Home Assistant will keep looking for it.
  • The configuration uses the Ping binary sensor, a switch template, and separate ‘on’ and ‘off’ scripts for the TV.

Connecting the Roku to Home Assistant

We use our Roku for a large majority of our entertainment needs. The Roku Ultra allowed us to have an Ethernet connected device and to put away our TV remote since it can also control the TV’s power and volume.

IMG_0107

Home Assistant’s discover component will find Roku devices, but I prefer to add the Roku manually.

Creating Scripts to Control Roku

Now you can navigate different to different Roku apps from within Home Assistant as well as Play & Pause with a couple of scripts. You can also use these scripts with Alexa to control the system with your voice!

All combined, the Chromecast, Roku Ultra, and Home Assistant work well together to give me more control over my TV and make it feel much smarter than it actually is. I like being able to have the accurate state for my TV reflected in Home Assistant, and my SO loves the Roku Ultra remote since now we only have to use one remote for the TV.

Have you been able to make a dumb device a little smarter? How did you do it? Please share in the comments!  If these guides have been helpful to you , please share them! If you have any questions, please reach out to me in the comments. Thanks for visiting!

2 thoughts on “Make A Dumb TV Smarter with a Chromecast, Roku, and Home Assistant

  1. Thank you for the idea, I never considered using the state of a device connected to USB! I control my projector via a Broadlink as well, but have been unable to figure out how to accurately track the state.

    Instead of a Chromecast I flashed a $3 Wemos D1 Mini with Sonoff-Tasmota, and then made the binary_sensor based off the MQTT LWT. Works perfect.

    Have you combined these different entities into a universal media player? https://www.home-assistant.io/components/media_player.universal/

    Like

    1. Hey diybrad. I have’t combined my entities into a universal media player, but that sounds cool so I’ll have to check it out. I haven’t gotten to the point of flashing anything onto hardware, but I have a couple Sonoff devices I plan to do eventually. I’m not that advanced yet, but am excited to get to that point. Thanks for the ideas!

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s