SmartThings Community

Controling Tv and others electronics with ALEXA

I think it’s just a matter of personal taste as to whether you want to use two momentary switches or one binary switch where you trigger some events from on and some events from off. Either one can work.

Speaking just for myself, I hate writing documentation like “when the TV off switch is on” LOL! :wink: So I would rather just have a TV switch which is on when TV is on and off when the TV is off.

But a lot of people love momentary switches. You can use the momentary button tile device type which is already in the IDE as a virtual device without needing any additional code. It works fine with Echo, but as you mentioned, you need to have two of them if you want to have a event triggered for both “on” and “off”.

Also, the things screen starts to get pretty cluttered when you have two of a bunch of switches.

But again, just more personal style than anything else.

No reason other than the standard virtual switch is the device type I use. If I do the pain of migrating to Hub v2 I may take the chance to use a virtual momentary switch instead. Sounds like a good idea.

I’m not using IFTTT for the Harmony Action control. I’m able to control the Harmony actions with virtual switch on or off change. My Harmony actions were out of date so I went in and wiped out all my ST Harmony smartapps just this morning. Then reinstalled Harmony app so ST could see my new Harmony actions. For whatever reason it has been working this way for a long time. No need to add IFTTT in the middle in my case. I’m not on the Harmony beta either.

I think I’m going to jump back in with the Harmony setup. @JDRoberts There are a lot of threads on this and I’ve read most of the content in them, however, since many things have changed over the life of this integration with SmartThings would you mind verifying my understanding?

I believe I can order the Harmony Hub only, which includes includes an IR blaster, to accomplish ST integration. I would need to use an Android/iOS app for my remote control unless I get the ~$30 Harmony remote also. Then I would use virtual switches (either momentary or otherwise, per your discussion a few messages up).

I’m not clear whether the SmartApp required for this integration is generally available yet. Another thread seemed to indicate that it was in private beta. If I buy the Harmony hub right now would I actually be able to use it?

I was able to hook harmony home activities to a virtual switch that Alexa could control. “Alexa turn TV on/off” “Alexa turn movie on/off” now works, but there is no control over channel, navigation, or volume.

If thinking about using the Harmony unit for media control, I would strongly suggest going ahead and getting the package with the normal remote. The iphone/android app is fine when running, but can be a little bit slow to start up and it’s far less straight forward for any guests that may visit your home. It also has the ability to control switches and dimmers with native buttons. (one remote, instead of needing to use a phone or minimote)

I only used available features in the non-beta version for this. It seems that the newer version will have even more features and improve upon this basic integration.

1 Like

It’s true that you don’t need the physical button remote that harmony makes for smartthings integration, but it’s a really nice universal remote and I would also recommend getting it unless you’re one of those people who is fine doing everything on a tablet and you don’t expect to ever have any visitors using the system.

My housemate is the one that got the harmony home for us because he wanted a universal remote anyway, and it said smartthings on the box. He just wanted to be able to toggle the lights from the universal remote and it works great for that.

He frequently has friends over for gaming, and the Harmony remote just sits on the table and anyone can use it. So we like it as a physical remote for that function but you’re right, you don’t have to have it.

I need other hand, as @jr0 points out, at the present time smartthings can only start or end harmony activities. It can’t control volume, use the fast forward, or any other of the small buttons. You can set up an activity that starts a specific channel, but that works best if you just have a couple of favorites, it doesn’t let you go up or down easily.

So it’s not complete voice control. But it’s still nice. And hopefully we’ll get further integration in the future.

As far as any necessary smart apps, the one that’s currently available for general release is all you need to make Alexa voice work, to use SmartThings sensors to trigger harmony activities, and to be able to toggle a few individual devices from the harmony home universal remote.

What you can’t do right now, but is apparently very much improved in the closed beta, is do something in smartthings and have that directly operates harmony-controlled devices.

Just wanted to mention I started a project topic detailing my Alexa/smart things/IFTTT/harmony set up for voice control of turning the TV on and off.

As a quad, I try to have as much voice control as possible, but I haven’t felt justified in buying the $1500 voice IR units, and most of them don’t work very well anyway. They keep thinking the TV dialogue are voice commands.

Xfinity gave me a "voice remote " which is now available to their general customer base, but it’s the kind where you have to push the microphone button and hold it down while you are speaking. And it basically only substitutes for things where you would be trying to type text, like searches. But it works great for that. Saying “find days of future past” is a lot easier than doing that one letter at a time. Interestingly, the part it doesn’t do is the part that’s easy to do with harmony: change inputs from the Cable to Roku or the DVD player, or turn the whole thing off. The reason they make you hold down a microphone button instead of having an awake word, is that always listening uses a huge amount of battery power. Same reason Apple only as Siri always awake when the power is plugged into the phone or tablet.

I can also push a physical button on the harmony universal remote, which is how I do volume changes, but it’s physically quite awkward for me, and tiring.

So I personally use voice with echo to start a harmony activity, including turning everything on and off and changing inputs, I use the Xfinity voice remote for searches, and I use the harmony physical universal remote for volume changes.

For physically able people I think the nicest thing about the voice is that since you are launching a harmony activity, you’re doing the equivalent of a whole bunch of buttons at once if you want. Basically a scene. You can turn on the TV and the Roku, change the input channel to the Roku, select a specific Roku channel to start with, to some of the lights off, and some of the lights to 50%, etc. all with one voice command like “Alexa, turn on movie scene.” And of course for people like me with limited hand function, every button press saved means a lot.

2 Likes

Turns out the Best Buy has the hub plus remote for $109 right now so I got them both. This is a fun ST weekend between this project and the new Samsung speakers (though I’m not impressed with that integration so far but have other reasons to use the speakers anyway).

2 Likes

Cool, that’s a good price!

I also wanted to mention for people looking into these solutions because someone they know has limited hand function, that my occupational therapist had previously recommended the harmony home because it’s a very lightweight remote and it has a textured back unlike the slick back of most universal remotes. She said if you’re the kind of person like me who will drop something in the attempt to pick it up, that the textured back makes a big difference. And I have found that to be true. :sunglasses:

Also, someone with limited hand function may prefer, as I do, to do anything requiring a screen with an actual tablet. That’s because I have some accessibility options on the tablet that I don’t have on the handheld remote. So I got the version of the remote that doesn’t have the screen (you can see the picture in my previous post). Then if I need it, I use the harmony app on the iPad that is mounted on my wheelchair.

I just mention all this for anyone finding this topic because they’re trying to solve the problem for a friend or family member. Sometimes these little details aren’t obvious to the person who doesn’t have the challenges.

So my previous “basket of remotes” had one remote for the television, one remote for the cable set-top box, one remote for the Roku, one remote for the DVD player. And some of them, like the Roku remote, were very difficult for me to use. And I dropped the cable remote all the time, which is why we hadn’t transferred the television functions to that.

Now I have the echo sitting over on a shelf across the room for voice control, the harmony home universal remote (Which everybody uses), and the Xfinity voice remote, which I only use if I want to do a voice search for a particular movie title. I also have the harmony app as one of the apps on my iPad, but I hardly ever use it unless I’m actually changing the harmony set up.

So I went from four remotes which I used every day (all of which were very difficult to use, and all of which I dropped frequently) to one universal remote and one microphone remote which I use maybe once a week when I want to search by title.

Big improvement! But the voice is the best part. :smile:

1 Like

I went through the virtual switch vs momentary tile configs last night and settled on the momentary switch since it was a pain to put in the logic which would keep the Harmony device states synchronized with the real device states. However, I wasn’t happy with “Turn on Exit” or similar unnatural commands so I made a virtual switch (not momentary tile) for the power off command and every time I ask for one of my “turn on” activities (DirecTV, Chromecast, or Miracast) it turns on the “TV” virtual switch, which isn’t tied to any event. Then I can say “Turn off the TV” and it all goes off.

There might be a better way to do this but it’s working well for me.

4 Likes

Sounds good! I expect there will be a lot of variations depending on what feels natural to different people and exactly how the home theater is set up for each person. and what synch issues they want to solve.

I’ve added your variation to the discussion under the project topic. I’m sure it will be popular. :sunglasses:

It’s a bit expensive, but I’ve found that a benefit of the Sonos Playbar is that it allows you to send discrete volume commands. Through the amazon-echo-ha-hub and EventGhost I am now able to say “Alexa, set the TV to 20%” and the Sonos Playbar volume will adjust accordingly.

1 Like

If anyone here is more familiar with virtual switches, I’m having one small problem. On and off work perfectly as long as the TV is always turned on and off with alexa. If you get the items out of sync, it no longer works correctly. Scenario today: Turned on TV with Alexa. Someone else turned off with remote. The virtual switch was left in the wrong state, so Alexa would not turn the tv back on. A quick toggle of the virtual switch and everything is ok again, but that’s not very elegant. Anyone solve this one yet?

This is discussed at length in the project topic. Two different methods are detailed there for solving the synch issue. :sunglasses:

I’m not using IFTTT, but I’ll go check it out. Thanks

With my devices, turning the virtual switch off within the Harmony end activity action seems to ensure that the state of the virtual switch is correct. (not send it into a loop as I was originally concerned it would) I’ll need to test this out some more and watch the logs. I’ll post back after a few iterations. I’ve turned the TV on and off more than enough for one night. :slight_smile:

Whether or not you will get a loop depends on the exact set up you have the turning things off. You may just have to experiment with a few variations to get it right.

@jr0

What I did was change the settings in harmony and told it I have separate buttons to turn the TV off/on. The on command I used power toggle. The off command I used up arrow (you can just choose anything that won’t actually do anything) I then use a momentary switch in smartthings. I now use the smarthings beta for harmony and tell. The harmony when swith is on run power up tv activitie, when off exit power up tv activitie. Since the switch is momentary it works great. I can also say. “Alexa, turn the TV on” and “Alexa, turn the TV off” works like a charm and will always be in sync no matter how the TV gets turned off/on.

1 Like

Everything seems to be working. Watched the logs and haven’t had any issues at all. Perfectly usable for the time being. Thanks

1 Like

Can the virtual switch be used to turn off the TV that’s also included in a group of things? For instance, I have Hue Light Bulbs, Lutron shades, and TV all added to one Activity on the Harmony Hub. I have that configured as a group on the Amazon Echo, “Tower TV”. So when I say, Alexa, turn on the Tower TV, she does. I tried adding a virtual switch “Power” to the start sequence of the Harmony activity. It’s been authorized. The switch is set to ON in the start sequence. When I start the activity, the switch does get turned on. When I end the sequence, from the harmony app, the switch goes off. All devices turn on and turn off as they should, using the harmony app. When I tell Alexa to “Turn off the Tower TV” nothing else turns off. Everything stays on.

Is there something I’m missing? I should be able to say, Alexa, turn the Tower TV off, and everything should shut off, right? The end sequence doesn’t seem to be initiating.

Where or what ap do you create the virtual switches with? New to my ST2 hub and the wife just got me echo for xmas?