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:
- Use a single Remote Control for the system.
- Be able to wirelessly cast videos from our computers, Chromebooks, cellphones and tablets.
- Have the On/Off state of the TV be accurately reflected in Home Assistant, no matter how the TV was turned on.
- 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.
- 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.
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!