SmartThings Community

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

I use “Alexa, turn on tv” and “Alexa, turn off tv”. The other device I’d set up is in the harmony app itself. So if had a device named “alexa tv control” in harmony I’d use that for the method above and just tie the TV switch to run activities on that device, I’d could then set up another device in Harmony and run activities off that device where I didn’t want the momentary switch to exit the activity and throw a fake off command. Does that make sense?

Both devices would be the exact same model so harmony would send the same ir codes, I’d just have different ways to exit activities.

They way I described above is just to turn the TV on/off using one switch and everything stays in sync. Using it to turn on a cable box or roku, switching inputs probably won’t work. The method works for me because I rarely watch TV and don’t have cable and the need for different input, I just turn the TV on for background noise.

1 Like

Sure, that makes sense, and again this is something where there’s going to be a lot of variation because people do have very different entertainment center set ups.

The basic concepts are the same, but even so you do have some choices to make between momentary switches used to turn on, momentary switches used to turn off, binary switches used to turn on, and binary switches used to turn off. The exact combination of tools that works will depend on both the set up and the person’s preferences for the voice commands they want to use. :sunglasses:

Has it been confirmed that integration is working both ways with Harmony and Smartthings now? I would love to get away from IFTTT, because it’s not working well. However, I’m still getting the not authorized message when I try to discover my hubs in the Smartthings app.

Yes it works both ways…See this thread

I have my Harmony hub added to ST and the Logitech Harmony trigger app added. I created a action in the trigger to start the TV activity and it works fine from ST.

I have searched the threads, but can’t find out if Alexa can connect to the trigger via a virtual switch? Do you have to use IFTTT in order to give voice commands?

You don’t need to Use IFTTT anymore, at the time this was written the Harmony/smartthings integration was still in beta. You’re going to use the “harmony triggers” smart app instead of an IFTTT recipe. Everything else is the same. The point is that a virtual switch is treated exactly the same way as a regular switch once it has been created. So echo will just think it’s a regular SmartThings switch.

Here’s the harmony triggers FAQ.

Wow, got it all working, but man I need a drink :smile:
I also got all the home control buttons on the Harmony remote controlling all my lights and plugs!

Amazing technology for $99.

1 Like

I just got a hub off eBay to do just this. If works well will get another to set movie mode in downstairs theater, is the remote worth getting or is it fine just plain hub? I got the anymote off Kickstarter hoping it would do this but so far it’s a dissapointment

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: