Harmony Home Control

That will loop if it’s a binary switch.

Instead, use two momentary switches. One for activity on, one for activity off. That way each switch is always ready to use the next time, and no loops. Much discussed in the echo and harmony topics.

Same switch selection protocol applies no matter how you’re getting to the harmony activity.

So which means that if I had to use Alexa to turn off an activity, the actual voice command will be “Alexa! TURN ON Media Off”…something like that?

If you use the Alexa IFTTT triggers, you can use any trigger phrase you want. So you can say “Alexa, Trigger television on” and “Alexa, Trigger television off” if you want.

If you using the direct integration and the phrasing really bugs you, you can use one binary switch so you can say “turn television off.”

Again the thread I linked to has the full details of exactly what you have to put in every harmony activity to make that work.

Currently, I use

“Alexa,trigger television” for the on and

“Alexa, trigger shutdown” for the Off.

But it’s just a matter of what feels natural to you.

3 Likes

Thanks for your response. I will check the Alexa thread out and see what exactly is being done. May be a smartapp to make this more intuitive may be a good idea, if thats even possible… I shall delve into it a little…

I’m a long-time ST user, and a fairly long-time Harmony Hub user. Love the integration (especially with Alexa added into it). Here’s what I’m trying to accomplish:

  1. I have a “Night Mode” in SmartThings that shuts off lights, activates the security mode, etc. I want it to turn on automatically. I had it tied to motion sensors but when we watch TV or are in an area with no motion sensors, it was thinking things had quieted down and switched to Night Mode.

  2. With the Harmony integration, my thought was to have ST set up so that it wouldn’t go into Night Mode if any of the Harmony activities were in use. I was excited to see that I could now add my Harmony activities directly in ST and that doing so created virtual switches for each activity. They work like a charm for turning devices on and off (between that, IFTTT and Alexa, I now have plenty of ways to interact with my devices, which is super sweet).

  3. Returning to the Night Mode issue, I figured I could tell ST not to activate it automatically if any of the Harmony activities were active. This worked like a charm the day I set it up. As I used the Harmony remote to turn activities on and off, the virtual switches reported their on/off status very close to real time. Unfortunately, as of the next day, they no longer seem to report correctly UNLESS I use ST to push the switch. Obviously, I use the remote most of the time so this is less than ideal.

QUESTION – Have others noticed that the on/off reporting of the Harmony activity virtual switches stops working after a period of time? Is there any way to remedy this? It reminds me of the issues we faced with the GE Link light bulbs, where someone created a special device type for those bulbs that does better reporting of on/off status. Is something similar possible here?

  1. My workaround idea is to have each activity turn its own virtual switch on when it starts and then turn it off when it ends. It seems like this should work and while it will be a pain to set up in the Harmony app, it would be a nice failsafe long-term, even if the issue described in #3 is eventually fixed.

Sorry this is so long – I’m hopeful others like this idea and can use it themselves!!

Are you using Momentary Switches or On/Off for your Virtual? I use Momentary for this very reason that they are difficult to track status with On/Off Virtual switches.

Neither. These are the devices that were automatically set up when I added the activities in the Harmony smart app. So the “Device Type” in the API is “Harmony Activity”. Inside the smart app, it said it was creating virtual switches to use with the Harmony remote.

To be clear, I had problems with “Simulated Switches” when I was using IFTTT to start activities (I’d get the endless loop of on/off signals), but now that I can do that directly through SmartThings (using the new switches) and Alexa (using the IFTTT triggers), that’s not needed anymore.

It may be a polling/refresh issue. I’m not sure how much has changed with the new Harmony Connect app. The old one knew if you triggered it in ST and could update if you pressed Refresh in the Hub device in ST, but it wouldn’t poll or refresh itself. You could try using Pollster to Refresh your hub to make sure it’s picking up the activity changes from your remote. Another option would be to add a step before your house can enter Night mode that would refresh your hub in ST, and then check for an activity, but that would require you to write a little SmartApp.

Thanks, Sticks. I’ve got absolutely 0 skills in the writing of smart apps area, so I’ll need to think of a crafty workaround. I think you are right that it’s a polling/refresh issue. Weird, though, that it worked for a day and then nothing. I’ll keep exploring ideas and report back if others are interested.

You could try opening up the Harmony Connect SmartApp and just clicking Done to re-initialize it. Sometimes that fixes SmartApp schedules and things after platform issues. Not a great long-term solution if it only fixes it temporarily, but might work.

Pollster is the other ok option, especially since checking every 10-15 minutes would probably be sufficient for capturing TV activities.

FYI, Pollster is a no-go – in the devices available for polling, none of the Harmony activities are listed. Back to square one…

I haven’t been following the developments around this integration, but did we lose ST -> Harmony control? I was under impression that once Harmony (Connect) was installed, it also created the corresponding “Media Device”…

3 Likes

Right – now I see Logitech Harmony (Connect) and Logitech Harmony Trigger. Within Connect, you can add your hubs and then your activities. When adding the activities, it auto-creates some virtual switches that you can use to start or end the activity. Works great in ST but when using the remote or IFTTT to start an activity, it doesn’t seem to report the on/off status correctly.

Pollster won’t work, presumably because these device types don’t support Polling/Refresh. I also tried having the activity flip the switch as a step during the process, and I experience the on/off loop. And momentary switches won’t work because they revert to off right after being pressed.

Perhaps a combo could work, where I create separate momentary switches for each activity – so for TiVo, I’d have a TiVo on and a TiVo off momentary switch. Those switches would in turn be linked to a virtual switch (called something like “Entertainment Activity”), so that when TiVo on is pressed, it flips “Entertainment Activity” on and vice versa. Multiply with additional sets of momentary switches, all tied to the “Entertainment Activity” master switch (or separate activity-specific ones if need be).

Then my Routine would only activate if the “Entertainment Activity” switch is off. Hmm. Royal PIA to set up (both in ST and Harmony) but might accomplish the automation I’m looking for.

Sorry, I replied below but didn’t link properly to your note. I’m going to try my idea highlighted there to see if it works.

You wouldn’t put the activity switches into Pollster. In your list of Things, you should have a device for each Hub. That Hub device should be able to be polled, and it will update the various activity switches (on or off) depending on what activity is active.

I just checked the Harmony Connect SmartApp and see the code that should make this work.

I have a very similar set up (though I use virtual momentary switches I manually created) and had the same issue with night mode being triggered. I solved it by turning on a “movie mode” and setting the Goodnight routine not to fire if movie mode was on (though your idea sounds better). I then switch back to home mode when the activity ends.

A drawback is that I can’t set the Goodnight routine to turn my Harmony activity off.

If your (logically superior) configuration isn’t working, maybe this method will work.

Good luck!

I don’t see a Harmony hub in my list of things. I used to have it there, not it’s not created when I install Harmony (Connect)…

Maybe the version of Harmony Connect in GitHub isn’t the currently active one, but it contains code to create childDevices for both hubs and individual activities within each hub.

    def addDevice() {
log.trace "Adding Hubs" 
selectedhubs.each { dni ->
def d = getChildDevice(dni)
if(!d) {
def newAction = state.HarmonyHubs.find { it.key == dni }
d = addChildDevice("smartthings", "Logitech Harmony Hub C2C", dni, null, [label:"${newAction.value}"])
log.trace "created ${d.displayName} with id $dni"
poll()
} else {
log.trace "found ${d.displayName} with id $dni already exists"
}
}  
log.trace "Adding Activities" 
selectedactivities.each { dni ->
def d = getChildDevice(dni)
if(!d) {
def newAction = state.HarmonyActivities.find { it.key == dni }
d = addChildDevice("smartthings", "Harmony Activity", dni, null, [label:"${newAction.value} [Harmony Activity]"])
log.trace "created ${d.displayName} with id $dni"
poll()
} else {
log.trace "found ${d.displayName} with id $dni already exists"
}
}    

}

I have 2 “Logitech Harmony Hub C2C” devices (one each for my hubs) and 7 “Harmony Activity” devices for all my activities. To be clear, NONE of these show up in the list available to poll in Pollster. There, I only have a select portion of my light switches.

Do they show up as devices that can be refreshed?
Just making sure they show up at all for pollster.
For me, they are not poll-able, but can be refreshed (although I don’t use pollster, just installed it for testing for this, but I had it available as a SmartApp already)