Adding SmartApp to a Virtual Switch

Maybe I’ve hit a bug, but I’m stuck. I’ve created a Virtual Switch, and I’ve created a Big Turn ON and Big Turn OFF SmartApp.

But when I go to the SmartApp section of the Virtual Device, I get a “No SmartApps Installed.” And there’s no option for adding one.

I’ve added many SmartApps to existing real devices with no trouble. How do I add them to a Virtual Switch?

You do this in the smartapp :smile:

Well, I looked around for this, and I don’t see HOW to do it. When I go into the SmartApp in the ST app, I get a list of configured devices, but no options for choosing a virtual switch to act as the trigger.

When I look at the SmartApp from the IDE, I don’t see any way to associate it with a virtual switch.

Just to make sure, have you have your created smart app on the IDE and published it?

It should show up on your account and in the mobile app SmartApp store (where you add new ones) under My Apps. This should be the last “tab” on the bottom of the app and also where you connect new devices.

From there, you add the switch to the SmartApp rather adding the app to the switch

I have created it. It does appear. When I try to configure it in the ST app, it asks me which devices I want to control, but does not let me specify what device I could associate it with–in other words, no place to select the virtual switch EXCEPT as a device that GETS turned on/off, not as the device that TRIGGERS the Big Turn ON/OFF.

I’m trying to gather all my outside light devices in one virtual switch for a single tile in SmartTiles.

You can do the same thing “The Big Switch” does with smartlighting. you might want to give that app a shot instead. With out going through the code of the smartapp IDK why it can’t be a trigger but can be triggered. That part doesn’t make sense.

post the device type code for your virtual switch…

Device type code? There’s nothing with that label in the device. There’s device network ID, but I doubt that’s what you want. It’s a simulated switch.

You dont add the smartapp to the device. You add the device to the smartapp. Basically you load up your app and select the Virtual device this app should use. Once you have done that and filled in any other required preference look at the SmartApps option for this V-Device under Things. You will now see a reference to the app. Does your smart app have at least this code in it?

preferences {
	 section("Virtual Switch to start the Smartapp Timer process"){
		input "vtSwitch",  "device.onOffButtonTile", title: "Choose a Virtual Switch"
}
}

def installed() {
 	initialize()
 }

def updated() {

unsubscribe()
initialize()

}

def initialize() {

subscribe(vtSwitch, “switch.on”, onHandler)
subscribe(vtSwitch, “switch.off”, offHandler)
}

def onHandler(evt) {
}

def offHandler(evt) {
}

I am, in fact, using the existing Big Switch, if what you really mean is Big Turn OFF and Big Turn ON. I don’t see any SmartApp called Big Switch.

Nor any device.

I’m using the generic code for Big Turn Off and Big Turn On.

Not a coder here.

Big turn/off isn’t the app you want (it does not allow assignment of a trigger switch)
The app you want is called “The Big Switch”

Where do I find The Big Switch?

Have you loaded this app via your mobile?

As mentioned above, yes, I have loaded it.

There’s no App template called Big Switch available at https://graph.api.smartthings.com/ide/app/create

OK DAMMIT.

I was looking at the B’s. It’s under T for The.

1 Like