Smartthings and Harmony Remote - Smart Plug Query


(Darren) #1

Hi

I wonder can someone assist with this integration problem. I’ve a Smartthings Plug which was purchased to power on all my Entertainment Devices, TVs, DVD player etc.

I have Smartthings connected with my Harmony, by adding it as a Device using Smartthing and Smartthings. I log onto my account and find my plug and take it over to Harmony. I group it under plug.

However when I try to integrate it into a Harmony Activity it doesn’t see the plug as a Device but as a Home Control. What this means is that I can not use the plug in my activity ie it would be the first step in my activity when starting and the last step when turning things off (as its powering my devices)

After searching long and hard I found this post on Harmony where they say that is correct, Smartthing Devices can not be used in Activities.

http://forums.logitech.com/t5/Harmony-Home-Control-Experience/Smartthings-Home-Control-Device-not-Showing-Up-in-Button/m-p/1517002/highlight/true#M6084

Does anyone have any work around? I mean a smart plug as the start of an activity makes perfect sense!!!

Thanks


Using SmartPower Outlet with Logitech Harmony Remote Control
#2

Read it again… What the post you link to actually says is that you cannot assign a home control device to a specific button on a harmony button remote. (The exception is the “harmony companion” button remote which has specific buttons for use with home control devices.)

You can definitely include home control devices in harmony activities – – many of us do so and you will find much discussion of that in the forums under the harmony threads. :sunglasses:

I’m not using this method right now, so I can’t give you a screenshot, but hopefully someone else can.


(Darren) #3

@JDRoberts thanks for the info. Yep, a re-read was required :slight_smile:

I’ll research the Harmony posts again. However under updating the firmware and the app to the latest versions I’m still at a loss :-(.

Whilst I can start my Smarthing Activity as part of my Device Activity, I can not work out how to start my Entertainment Activity as the first step :frowning:

Maybe these screenshots may help someone direct me

List of Devices

List of ST Devices

Edit Activity Categories my Devices

Edit Entertainment Option - Does not give me the option for my ST (Home Control) Devices

Adding a new Step under Entertainment Devices only gives me the option of seeing my Entertainment Devices

Activity with Home Control, but the Home Control is always at the end of the Activity with no option to move.

What I have done so far is create a Home Control Activity that turns on the plugs. Once completed then I turn on my Entertainment Devices Activity.

THe only option I can think of currently (is set up an IFTTT) rule that says after Plugs are on, run a certain activity and reverse the log when I turn everything off.

However this all just seems overly engineered for something that should in my opinion be easy.

I must be missing something :frowning:


(Darren) #4

Looks like something so simple isn’t possible without getting creative :frowning:

http://forums.logitech.com/t5/Harmony-Home-Control-Experience/FEATURE-REQUEST-Run-a-Home-Control-command-as-the-first-step-in/m-p/1489493/highlight/false#M5560


#5

You’re right–looks like you would either need two activities or turn the smart plug on from smart things before you activate the harmony activity. Definitely annoying, I hope they change it!

You can daisychain it so you yourself only have to do one thing:

Create a harmony activity which turns on the smart switch and turns on a virtual switch.

Have the virtual switch coming on turn on the harmony activity that you really wanted with the Entertainment devices (and turn off the virtual switch again).


(Darc Ranger) #6

I had this same issue.
You could most likely use the CoRE app to create some that will turn on your smart-switch then the Harmony command. A virtual switch would be needed and triggerd through Harmony.

Before CoRE was born, I made a smart app that does the same thing using a virtual switch with an option to delay the start of the Harmony activity to give time for my equipment to power up in order to accept commands.

I you are interested my app instead of going through CORE, I can post the code later.


(Darren) #7

@JDRoberts, @DarcRanger just finished watching the Polish football match and was working through my logic as I watched. Just logged on here to set up my Virtual Switch and somehow work a rule into Core (just started messing with that last night).

Nice to see you both came up with the same options.

@DarcRanger if your willing to share your code, I’d be interested in giving it a go. I may or may not get the logic right in Core as well as the fact Core is in GitHub and I’m based in Ireland we don’t have the integration yet (which is a pain in the back side) .


(Darc Ranger) #8

@KellyDarren,

Here is my code. I used a Virtual Momentary button instead of a regular virtual switch.
This just turns things on. You should be able to setup Harmony to turn off the switch at the conclusion of the off activity.

/**
 *  Copyright 2015 SmartThings
 *
 *  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 *  in compliance with the License. You may obtain a copy of the License at:
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
 *  on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
 *  for the specific language governing permissions and limitations under the License.
 *
 *  TV Source ON is a modified version of Big Turn ON by SmartThings
 *
 *  Author: DarcRanger
 */

definition(
    name: "TV Source ON",
    namespace: "DR",
    author: "DarcRanger",
    description: "Use a Virtual Momentary Switch to turn one switch with an option to add a delay before turning on another switch.",
    category: "Convenience",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/light_outlet.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/light_outlet@2x.png"
)

preferences {
	
    section("Trigger for two switches with delay in between") {
	    input "master", "capability.momentary", multiple: false,  title: "Momentary button is pushed...", required: false
	}
    section("Select First Switch to turn on...") {
		input "switches", "capability.switch", multiple: false
	}
	section("Select Second Switch to turn on... with Option for delay") {
		input "theSwitch", "capability.switch", multiple: false
	}
	section("Turn it on how many SECONDS later?") {
		input "delay", "number", title: "When?", defaultValue: 10
	}
     section("Notification by...") {
     	input("recipients", "contact", title: "Send notifications to", required: false) {
        	paragraph "Enter Phone Number for SMS"
			input "phoneNumber", "phone", title: "Send a text message to?", required: false
        	paragraph "Enble Push Notifications with Silent Option"
			input "pushNotification_Normal", "bool", title: "Select Push Notification Option", required: false, defaultValue: "false", submitOnChange:true
			input "pushNotification_Silent", "bool", title: "Select Silent Push Alert", required: false, defaultValue: "false", submitOnChange:true

}
}
}

def installed()
{
	subscribe(master, "momentary.pushed", onHandler)
	subscribe(app, appTouch)
}

def updated()
{
	unsubscribe()
	subscribe(master, "momentary.pushed", onHandler)
	subscribe(app, appTouch)
}

def onHandler(evt) {
	log.debug "onHandler: $evt"
    switches.on()
    log.debug "Switches ${switches} turned: ON" //${evt.value}"
    runIn(delay, SecondSwitch)

    }

def appTouch(evt) {
	log.debug "onHandler: $evt"
    switches.on()
    log.debug "Switches ${switches} turned: ON" //${evt.value}"
    runIn(delay, SecondSwitch)
}

def SecondSwitch(){
	log.debug "Turning on in ${delay} Seconds"
    theSwitch.on()
    log.debug "theSwitch ${theSwitch} turned: ON" //${evt.value}"
    send app.label + " has been triggered. ${switches} and ${theSwitch} are turned: ON within ${delay} seconds."
}

private send(msg) {
    if (location.contactBookEnabled) {
        sendNotificationToContacts(msg, recipients)
    }
    else {
	if ( phoneNumber ) {
		log.debug( "sending text message" )
		sendSms( phoneNumber, msg )
	}
    if (pushNotification_Normal && pushNotification_Silent) {
        sendNotificationEvent(msg)
        }else if(pushNotification_Normal && pushNotification_Silent == false){
         sendPush(msg)
}
}
  log.debug "NOTIFY---------------------------------------------"
  log.info app.label + " has been triggered. First switch, ${switches} is turned: ON. After ${delay} second delay, the second switch, ${theSwitch}, is turned: ON."
  
}

(Darren) #9

@DarcRanger Many thanks for sharing. I’ll let you know how I get on.