Alexa + SmartThings + IFTTT + Harmony to turn TV on and off by voice (2015 version)

The remote is not needed if you carry your smartphone with you and have it available to control the hub. You also can use an iPad or Android pad to control the hub. The remote does have some nice easy to access features where on your smartphone there may be four pages of commands you have to scroll through to find what you want.

It has taken me two weeks to get my Amazon Echo + SmartThings + Harmony Home Control to work properly. It’s been painful, but I’m LOVING the results! I have also installed/configured SmartTiles. So, from ANY browser/device, I can not only see what’s happening at home, but also control it!

I didn’t create momentary buttons/switches. Instead, I created “normal” virtual switches (aka Simulated Switches.) I then leveraged the Logitech Harmony Trigger “smart-app” to fire based on these switches being turned “on.” This Trigger then kicks-off the respective “Activity” on the Harmony hub.

Side note: Initially, I couldn’t get my Harmony hub to be discovered by SmartThings. The “issue” = I had a “ghost” hub entry in MyHamony. This was causing somewhat of a naming conflict with SmartThings (e.g. two hubs, with the same IP address?..) Once I deleted the ghost entry, everything paired-up perfectly. How did the ghost entry occur in the first place? Reason: Initially, my laptop was broken. So, I installed the MyHarmony app on my wife’s laptop, and configured the Harmony hub/remote/keyboard. When my laptop was finally revived, I installed the MyHarmony app onto my laptop, and then tried to change/update my Harmony hub. Instead of just seeing/changing the EXISTING hub, it created a whole-NEW hub within the MyHarmony app. Again, I just deleted the unused/ghost hub, and everything installed “business as usual,” thereafter.

What I then did, was set-up “home automation” device events within the Harmony activities. These “control” the status of the “virtual/simulated switches.” e.g. When the TV is turned off, it then turns-off the SmartThings switch, too (via the Exit Event.) My media server is hooked-up to the TV, too. And, I also have an activity that launches a smart-app (Plex) on the TV. So, no matter which activity I run – my “switches” reflect an ACCRUATE status (on when on, and off when off.)

The only thing that I had to do “special,” was create a unique “all off” switch. I simply created a simulated switch named “Entertainment Center.” So, if/when I want to truly turn things off, I just say, “Alexa, turn off the entertainment center.”

Results:
“Alexa, turn on the TV.”
“Alexa, turn on Plex.”
“Alexa, turn on Merlin.” (That’s the name of my PC media server.)

I can say any of the above when things are off, or on.
If I’m watching TV, I can then say, “Alexa, turn on Merlin” – and the screen will change to HDMI-2, and my PC will use the TV as a monitor. Similarly, my Harmony keyboard “changes modes,” too (and indeed WORKS with the PC!)

But, I can NOT say:
“Alexa, turn off TV.”
“Alexa, turn Merlin.” nor
"Alexa, turn off Plex."

Instead, I just say, “Alex, turn off entertainment center.”

On top of all that, I’ve ALSO added most of our channel-changing operations into the same set-up.
So, we can say,
“Alexa, turn on ESPN.”
“Alexa, turn on TNT.”
“Alexa, turn on Bravo.”

Again, I have Smart-Tiles for ALL of this. So, I can not only see if someone’s watching TV in our home, but I can ALSO see what channel they are watching!

As we change from one channel, to the next – the “active” channel switch/tile is illuminated as “on” – and the old/previous channel then goes dim/grey. Similarly all of these channel-changing events are now “logged” as “events” in SmartThings and SmartTiles.

Since I want the Echo (Alexa) to be as conversational as possible – especially for guests – I added “groups” within Alexa, to create “alias” names.

e.g. “Disney” is the name of my Disney switch.
So, WE would typically say, “Alexa, turn on Disney” – and she will (optionally turn on the TV-related stuff) and then tune to the Disney channel.

But, I have added the following “groups:” within Alexa:
Disney Channel
Disney Network
Disney TV
Disney Television
Disney Station

Each one of these groups only has one single device/switch (the “Disney” switch.)

So, if guests say, “Alexa, turn on the Disney Channel” – she will indeed switch to “Disney.”

This is especially true for long-name alias. WE say “TBS.” But, we have no idea how our visitors/guests will say it? They might say “Turner?” Or, “Turner Network?” or, “Turner Broadcasting” or “Turner Channel” or “Turner Broadcasting Station” or, incorrectly “Turner Broadcasting System.” So, I have aliases (groups) for ALL of these.

Yup, with DIRECT and hundreds of channels, it’s a LOT of devices, and even MORE “groups” within Alexa. But, we’re enjoying the results! We can be in the kitchen with something playing in the living room. If we don’t like what comes on next (while we are cooking, with dirty hands, etc.) we can just say, “Alexa, turn on _______.” – and then watch/hear something different.

Again, all of this WORKS if you also use the Harmony app on the SmartPhone, or if you manually kick it from within the SmartThings app, or via automated routines (e.g. HLN comes on automatically with the living room lights every morning when I activate the motion detector in the hallway – Monday thru Friday - between 6am and 8am PST.)

All of this also WORKS if I change the statuses via SmartTiles, too.

Sure, I wish cable/satellite companies would “get on the bandwagon” and make their devices “Alexa-compliant” – so we don’t have to use/configure all of these “middle-man” devices/scripts. PLUS, I don’t really adjust “button” types of events via Alexa. Thus, no volume control, no “guide,” no “exit,” no “select.” no directional arrows, no PageUp/Down, no “menu,” etc. After all, who wants to say, “Alexa, turn on the Guide. Alexa, turn on the down arrow. Alexa, turn on the down arrow. Alexa, turn on the right arrow. Alexa, turn on the right arrow. Alexa, turn on Select.” <— That’s just too unnatural, and too much gobbledygook!

Anyway, we wish you luck!!! It takes the patience of a saint to get all this figured out.

Peace.

2 Likes

Awesome! This is where I want to be. I currently just run “Turn on/off TV” and it updates a virtual switch so we can use Alexa, Harmony remote, or SmartTiles and it works. But I also have a Roku for Netflix, etc. So I will probably use your “Turn off Entertainment Center” idea.

How do you handle the channels? Do you have logitech activities setup for each channel? That sounds extremely tedious, but that’s the only way I could think of doing for the few channels we frequent.

Also, have you figure out a mute or pause by voice yet? Would it just be another logitech activity?

I’ll look it up also, but I haven’t heard of aliasing with Alexa… but it makes complete sense. Is it within the Alexa app or did you setup virtual switches for all of those different options?

If you start with post one in this project report, you’ll see how to do all of those things. You’ll also see the discussion of why most of us use momentary buttons for everything except the power off.

The reason is that when you use a momentary button it always returns itself to the off state, so it is ready to be turned on the next time. Otherwise you have the problem that if you start with “turn on Roku,” switch to “turn on Disney” and then “turn off entertainment center” the Roku and Disney switches may still be on so they won’t work the next time around.

Momentary buttons also solve the problem of some activities being started by voice and some being started by pressing buttons on the physical remote.

But again this is all discussed above.

If you have a different custom set up that you like a lot and you think others would benefit from, I encourage you to start your own project report thread so you can discuss the details of that.

“All home automation is local” and one of the things that is interesting about the project reports category is how many different solutions there can be two similar problems. Each useful to a particular group of people for a particular reason. :sunglasses:. But it’s usually better to keep each project variation in its own thread, or it can get really confusing for people coming in later.

Thanks! I’ve been reading through and I do understand the momentary button and will definitely implement that. What I don’t understand is channels. Do you have logitech activities (and ST momentary buttons) for every channel you want to be able to access by voice?

Yes.

Also an activity to pause, to rewind, to exit, etc.

Most able-bodied people will probably just grab the button remote. Since I’m quadriparetic, I couldn’t actually do a pause or rewind before so that’s worth the effort for me.

And because harmony will not let you do the same activity twice in a row, I have two activities for volume up and two activities for volume down and I can switch between them. Again, an able-bodied person probably wouldn’t bother.

Eventually, I’m sure there will be better voice control of entertainment systems. Either a direct echo/harmony integration, or a better echo/fire TV integration or something. But for right now this is very cool for the simple stuff, like “turn on Disney” and Clunky but worth it for people like me for the granular controls.

Most voice remotes right now require you to hold down the speaker button while you’re talking, which is exactly what I can’t do. This way is totally hands-free. :sunglasses:

p.s. I set up a room in the SmartThings mobile app called “entertainment center” and I put all of the virtual buttons into that. So that gets them out of the way but still easy to find.

@JDRoberts Thank you infinite times, for this. It was very easy to set up with the momentary button and it works flawless. ST should have some sort of “ST coins” that are awarded to people in the community with posts like this, which you can then use for their store or something.
Since I don’t have your physical limitations, the pause, rewind, forward, volume and off commands are not convenient for my household, but the ON commands just rock. Even still, just to be nerdy, I set my OFF command in an Alexa group where I say “Alexa, turn on Shutdown Procedure”. Sounds cool, but it would be more awesome if it was “Activate”, instead of “turn on”. :pensive:

Thank you again!

1 Like

Thanks so much!

I’m guessing “Turn on Mute”, or “Turn on Play”, etc are the commands that you’re using. Amazon needs to allow you to say anything and then execute based on rules. IF “Mute TV” then send mute command to Harmony.

@JDRoberts just curious of what do you use your Wink hub for? Noticed the Wink integration in your Alexa screenshot?

I don’t have a Wink hub. I’m just using the app. I have some GE link bulbs which refused to stay connected to the SmartThings hub, but do better with the GE link hub, so those are the ones that are showing up as winks.

1 Like

I’ve tried several times and I can’t get the virtual switch for the on/off to work.

I created the switch in ST (Media Power), but when I got to tell a Harmony activity to turn Media Power on as part of an activity, I get a red band across the top and an error message that Harmnoy couldn’t connect. Am I missing something now that ST and Harmony talk to each other directly without IFTTT?

Try this topic:

Thanks, but ST is connected to Harmony and all my momentary switches work, it’s just that one virtual switch to use the on/off that I can’t get to work.

Is the red banner in the Harmony app? Or in the smartthings mobile app?

You have an activity that exists in harmony, and you are trying to use the harmony logitech triggers smart app to associate to it? Or you already got everything set up, it just doesn’t happen to be working today?

Here are my steps to set up a momentary button called Netflix activate a Harmony activity which is also called Netflix. (The names or just a coincidence. They could be different.

I just tested and everything worked fine here.

One time setup for harmony hub

One) use “harmony connect” smart up to establish my hub as a device too smart things that’s a one time set up process what you’ve already done.

One time setup for a new trigger, in this case Netflix

One) Create a new virtual momentary switch. I called this Netflix. It’s going to trigger a Harmony activity which is also called Netflix, although it’s fine if they had two different names.

Two) go into the marketplace section of the smartthings mobile app, select “harmony logitech triggers” smart app and install it. You need one instance of this smart app for every trigger rule that you will have.

Three) stepping through that wizard choose “switch on” as the trigger, and select my momentary switch called “Netflix” as the switch to use

Four) still stepping through the wizard, choose Netflix from the list of activities

Five) still stepping through the wizard, save this trigger under the name “harmony trigger Netflix” and finish installing it.

This completes the one time set up of the trigger.

To Use the Trigger

Now that everything is set up, whenever I want to activate the harmony activity called Netflix, I can just find the Netflix switch in the SmartThings mobile app and tap it and the associated harmony activity should start.

Sometimes you can get a timeout error here, it’s just a problem of harmony not responding.

When that happens, first check to see if your harmony has a firmware or app update pending.

If not, just try again.

3 Likes

Hey guys new v2 user. I was able to add my harmony hub to smarthings. I set up the controls in harmony to turn on my tv and cable box. I know how to create a switch on ide. How do i get Alexa to turn on the tv. I was able to create an on trigger, used Alexa helper and harmony trigger, Alexa found trigger but nothing happens. Can someone put a step my step for v2 hub?

One) if you toggle the switch manually in the SmartThings app, does the harmony activity come on? If not, see the following thread (this is a clickable link.)

Two) if it does toggle manually, but nothing happens with Alexa, then did you authorize echo to use that switch? See step 10 in the first post in the set up. thread.

1 Like

Yes switch does nothing when I turn it on, so in other words I have to check my harmony and see if there are unconnected hubs lying around?

Yes, I think so, but that would be a conversation for the Harmony connection thread.

Tried it again this morning and was able to turn the tv on with the switch in smart things. Weird. Will have Alexa connect to it and test later. Now to turn everything off I have to create another seperate switch correct?

Stupid question but momentary switch is momentary tile button?