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

Frustrating–I feel your pain. :scream:

Since you were able to get a second activity to start, can you have that activity toggle off the TV?

If not, yes, it just sounds like a model that’s problematic.

No other activity will toggle off the TV till the original activity that toggled it on is ended :frowning: if I can just get everyone to use alexa or the harmony remote to turn things on and off all would work fine. Thanks for trying to help :slight_smile:

OK, one more try.

What happens if you use IFTTT to send an END activity request to Harmony?

Does the TV ignore it because it isn’t powered on?

My system occasionally gets out of sync. I’ve resorted to an android tasker plug in that allows me to send individual device commands instead of getting up to grab the devices remote.

Hmmmm. I’ll give that a try tomorrow, fast losing WAF because I keep turning the TV on/off… So you are suggesting two activities? Both do the same thing, but have ifttt end the second one?.. My head hurts lol

1 Like

Since setting this up this morning, 3 time my power down activity has fired shutting down all my equipment while I was watching tv. Any ideas? Screenshot shows harmony connect initiated it, but not sure why.

I’m suggesting an extra IFTTT recipe, but no extra Harmony activities.

So you have your normal harmony activity that turns the TV on and off. Let’s call that “watch TV.” If someone starts that with the Harmony remote, it turns the TV on. If someone ends that with the Harmony remote, it turns the TV off. But if someone starts that with the Harmony remote, and then they turn the TV off with the physical button on the TV, Harmony thinks that “watch TV” activity is still going, so it won’t let you use it again to turn the TV back on. That’s your current situation right?

The new IFTTT recipe is used only for synchronization in case The TV was turned off with the button on the TV, but harmony thinks the “watch TV” activity is still running.

All it is is an IFTTT recipe that tells harmony to end the “watch TV” activity. Not start it and then end it. Just end it.

I use this now to power off some devices. You would be using it to get things back into synch. Basically you are replacing the end “watch TV” request that you wish the other person had made through harmony.

So after it runs, if everything works as hoped, the TV will still be off, but now harmony will also think the “watch TV” activity is ended. So you should then be able to do a new start “watch TV” request to harmony and have it process correctly.

So the extra IFTTT recipe is only for the purposes of synchronizing things again after a manual press of the button on the TV.

Once you have everything set up for voice, you will add one additional momentary button tile that will do nothing but run this extra IFTTT recipe.

So if everything works as hoped, you can be sitting on the couch, you tell echo “Alexa, turn TV on.” If the last person used harmony to turn the TV off, then everything will work fine, and echo will tell Smartthings to press the momentary switch, IFTTT will fire, and “watch TV” activity will start.

Instead (again if everything goes as hoped) if the TV doesn’t come on, you have a Plan B, which is to tell echo “Alexa, turn synchronization on” (where synchronization is the name of the extra virtual switch which is controlling the extra IFTTT recipe.) that would do nothing except get harmony to end the out of sync “watch TV” activity.

Then, you could say “Alexa, turn TV on” and it should work the second time.

I can’t guarantee this will work, but it seems worth a try. You end up with pretty natural language.

Harmony was flaky early this morning. Nothing to do with smart things. I had completely random stuff that isn’t associated with either IFT TT or smart things going on and off at three in the morning. It also must of done just some random IR blaster thing, because my smoke alarm went off in testing mode.

I think Harmony is getting ready for their new extender, but yesterday was really rocky.

Good to know, thanks.

They (Harmony) are definitely been playing with their servers, because my Motorola STB is back after misfiring for two days.

That would work kind of. Ending the activity with a second ifttt recipe would actually turn the TV on (if it was turned off via the switch or other remote) then if I said alexa turn tv on (the original activity) would now actually turn the TV off.

Yeah, sounds like your only real solution is family programming. My wife only ever really used remotes before we got the Harmony, so transitioning to the ultimate home remote was easy. Actually getting the Harmony was mostly for her so we could consolidate 5-6 remotes to 1 (she couldn’t operate our entertainment center) Plus the ultimate has the friendly touchscreen for one-touch activities (which was the whole point). All the other remotes got stowed away.

OK JD. I think I have a solution. I’ll change power option in Harmony so it thinks I have discreet codes. I’ll make the power off command something I won’t notice, like up arrow or something. Then I’ll have the momentary button run the activity when on and exit the activity when it turns off. Tv will stay on because the actually power off command will just be an up arrow and I’ll be out of that activity with harmony thinking it turned the TV off… I’ll then do the same thing with the exit tv command. Everything should stay in sync no matter how the TV is turned off/on… I’ll also have to have that virtual button fire when tv is turned on by the actual harmony remote… Wow… Lots to do, but wife will be happy and I can still use alexa :). Wish me luck

Good luck!

I’m not sure the on/off Logic will work because a momentary switches issues an on immediately followed by an off, but you can try it. I think there is some kind of XOR you can work out since the IFTTT can issue an end activity, but it may take some trial and error.

The momentary switch toggled too fast for ifttt to handle. I turned the switch to regular then used a modify power allowance app to toggle the switch 10 seconds later… Works perfect :smiley:

1 Like

Is anyone else still having problems with IFTTT? My tv continues to power down randomly to the point my wife told me to turn it off LOL not a good first impression :(. As you can see, it’s run 189 times in 24 hours!!! I am also showing activity log from my momentary button.

No problems here, my log shows only two activations in 24 hours.

I am wondering why your log shows all the activity from the harmony connect smart app. Mine shows no activity between the harmony connect app and the virtual button. The only activity is between the echo smartapp and the virtual button.

Or are you in the harmony beta? Did somehow you set that up to send something?

Here is my log, you can see the difference:

It looks like maybe you have a loop where the Harmony power off activity turned off the switch which, because it is a momentary, does its on/off trick and that triggers that same recipe? But again I don’t know why the harmony connect smartapp is involved at all.

Also notice that in my protocol, I use IFTTT to send an “end activity” for the power off. You are sending a “start activity.”

My protocol has one IFTTT recipe for each regular Harmony activity like Watch TV. Those each send a “start activity” when their momentary button is pushed.

Then I have one extra harmony activity, with one extra IFTTT recipe for it. That’s the power off. Unlike all the others, that IFTTT recipe sends an “end activity,” not a “start activity.” (See post #23 above.)

So a couple of differences between the way I do it in the way you’re doing it. I’m not sure what the exact problem is.

But I definitely think something in your steps is looping that momentary switch

Thanks @JDRoberts. I switched my IFTTT recipe to End Activity from Start Activity. I am not home to look at my Harmony Activity, but I believe it’s set to Power Off all Entertainment devices. Not sure if I need to do anything in that activity to make sure the End Activity works right?

I will test later.

Mine is super simple: it’s the end sequence in the harmony activity that does the power off. If I start that same activity, it would just power on the TV if it wasn’t already on. See the screenshots in step three in the very first post.

1 Like

@Mbhforum Your issues sound similar to what I was experiencing when I first setup a momentary tile to test. In my setup all my video is routing through a receiver so my TV never switches inputs and this is what worked for me:

1 Like