Simulated buttons in New SmartThings app

So I have a device that has 3 simulated buttons. Each button invoked a device to do certain things. In the Classic app I see all 3 buttons. In the new app there are no buttons. Just a circle that says “Standby”. How can I make these 3 simulated buttons show up in the new app.

Are they “simulated” or “virtual”.

I’ve got several virtual switches and dimmers. They work perfectly in both the old and new app

I have virtual switches too. I am referring to simulated buttons (Press/hold) in a single Device handler.

Did you ever figure this one out? I was hoping to create a ‘minimote’ for controlling my Roomba.

Nothing yet. Hoping someone from SmartThings could chime in.

I also have a custom DH that utilizes simulated buttons to control Roomba. Works great in the classic app. I included a switch to receive feedback from iFTT. The only way i can get it to connect without error in the new app is to set the vid to generic-switch. Edit: To clarify, when using the vid, generic-switch, I am only able to see the switch and not the buttons in the new app.

I am afraid that we won’t be able to have multiple buttons on one screen. I also have an actual Aeon Minimote that gets split out into separate buttons in the new app.

I ran across what you are describing today. From my testing and looking around there are a couple of button implementations, “Simulated Button” and “Momentary Button Tile”. The Simulated Button is using the button capability and does not fire and “On” switch event, which a lot of smartapps subscribe to for a button push. It also has from what I can tell, the magic piece of code that allows it to be active in the new app, but only as a button. Have not had a chance to test subscribing to the “push” event of the button capability yet to know if that will even work.

The Momentary Tile fires the switch “on” event, but lacks the code that (might/should?) allow it to work in the new app.

Don’t have time to try creating a custom blend of the two right now. Hopefully this gets sorted out soon.

Momentary buttons do not work in the new V3 app. Per a ST staff member a while back, this was by design.

I have a momentary button tile working in the new app. I had to edit the DH to include vid: “generic-switch” in the metadata definition as well as the health check capability. (For a dry contact switch that acts as my garage door opener).

Previously, I had multiple momentary buttons to control separate actions (via webcore/iFTT) for Roomba. Each switch appeared separately in the both apps (too much clutter).

My goal was to consolidate all the switches into one device. This worked using simulated buttons but the simulated buttons don’t appear in the new app. Until I find a better solution, I added the motion capability that is active when Roomba is running and inactive when stopped. Setting the vid to “generic-sensor” allows me to see the status of Roomba in new app but cannot control.

Is this still working for you?

If so can you send me a copy of the device handler your using please.

The momentary button tile no longer works for me as expected. However for my garage door, I was able to get the Z-Wave Virtual Momentary Contact Switch DH to work by adding the same vid “generic-switch”.
You can find the stock code in IDE but i pasted below too. I can get the buttons to appear in the new app by adding the vid but they do not function.

/**

  • 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.
  • SmartSense Virtual Momentary Contact Switch
  • Author: SmartThings
  • Date: 2013-03-07
    */
    metadata {
    definition (name: “Z-Wave Virtual Momentary Contact Switch”, namespace: “smartthings”, author: “SmartThings”, ocfDeviceType: “x.com.st.d.sensor.contact”, vid: “generic-switch”) {
    capability “Actuator”
    capability “Switch”
    capability “Refresh”
    capability “Momentary”
    capability “Sensor”
    capability “Relay Switch”
    }

// simulator metadata
simulator {
status “on”: “command: 2003, payload: FF”
status “off”: “command: 2003, payload: 00”

  // reply messages
  reply "2001FF,2502,delay 2000,200100,2502": "command: 2503, payload: FF"
  reply "200100,2502": "command: 2503, payload: 00"

}

// tile definitions
tiles {
standardTile(“switch”, “device.switch”, width: 2, height: 2, canChangeIcon: true) {
state “off”, label: ‘${name}’, action: “momentary.push”, icon: “st.switches.switch.off”, backgroundColor: “#ffffff
state “on”, label: ‘${name}’, action: “switch.off”, icon: “st.switches.switch.on”, backgroundColor: “#00a0dc
}
standardTile(“refresh”, “device.switch”, inactiveLabel: false, decoration: “flat”) {
state “default”, label:‘’, action:“refresh.refresh”, icon:“st.secondary.refresh”
}

  main "switch"
  details(["switch","refresh"])

}
}

def parse(String description) {
def result = null
def cmd = zwave.parse(description, [0x20: 1])
if (cmd) {
result = createEvent(zwaveEvent(cmd))
}
log.debug “Parse returned ${result?.descriptionText}”
return result
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
[name: “switch”, value: cmd.value ? “on” : “off”, type: “physical”]
}

def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
[name: “switch”, value: cmd.value ? “on” : “off”, type: “digital”]
}

def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
if (state.manufacturer != cmd.manufacturerName) {
updateDataValue(“manufacturer”, cmd.manufacturerName)
}

final relays = [
[manufacturerId:0x0113, productTypeId: 0x5246, productId: 0x3133, productName: “Evolve LFM-20”],
[manufacturerId:0x5254, productTypeId: 0x8000, productId: 0x0002, productName: “Remotec ZFM-80”]
]

def productName = null
for (it in relays) {
if (it.manufacturerId == cmd.manufacturerId && it.productTypeId == cmd.productTypeId && it.productId == cmd.productId) {
productName = it.productName
break
}
}

if (productName) {
log.debug “Relay found: $productName”
updateDataValue(“productName”, productName)
}
[name: “manufacturer”, value: cmd.manufacturerName]
}

def zwaveEvent(physicalgraph.zwave.Command cmd) {
// Handles all Z-Wave commands we aren’t interested in
[:]
}

def push() {
def cmds = [
zwave.basicV1.basicSet(value: 0xFF).format(),
zwave.switchBinaryV1.switchBinaryGet().format(),
“delay 3000”,
zwave.basicV1.basicSet(value: 0x00).format(),
zwave.switchBinaryV1.switchBinaryGet().format()
]
}

def on() {
push()
}

def off() {
[
zwave.basicV1.basicSet(value: 0x00).format(),
zwave.switchBinaryV1.switchBinaryGet().format()
]
}

def refresh() {
delayBetween([
zwave.switchBinaryV1.switchBinaryGet().format(),
zwave.manufacturerSpecificV1.manufacturerSpecificGet().format()
])
}

Finally got a little time to look at this today. I made a couple of changes to the stock Momentary Button Tile DH and it mostly works in the new app.

Main things I did were add “Button” and “Health Check” capabilities.

I also added vid info

mnmn:“SmartThings”, vid: " generic-switch",
ocfDeviceType: ‘oic.d.switch’

As part of initialization, I added the the following lines, the third line I think is the one I’ve not tried before

sendEvent(name: "DeviceWatch-DeviceStatus", value: "online")
sendEvent(name: "healthStatus", value: "online")
sendEvent(name: "DeviceWatch-Enroll", value: [protocol: "cloud", scheme:"untracked"].encodeAsJson(), displayed: false)

It mostly works in the new app. The on/off switch work as before, the Momentary tile works, but not the “Button” one, have no idea what it is looking for as a default command.

Luckily I had one button already set up to play with, because the IDE isn’t letting me make device changes right now, so I can’t test it in any other uses at the moment.

This is an odd situation, the vid of generic-switch makes it work like I want, but it is also picking up the momentary and button capabilities and making “tiles”?? for those as well. I’ve not seen that in anything else I’ve tried working with.

The loss of Capability “Momentary” is a small party of this Topic, I think, and an issue I raised months ago (January!), but nobody cared.

Please feel encouraged to help revive the Topic linked below:

I do feel it would be useful to have some clearer explanation as to how capabilities and metadata such as ocfDeviceType and the vendor ID influence the behaviour of the classic Groovy DTHs in the new app. Indeed I feel a point has been reached where it wouldn’t just be beneficial to have that information, but that it is detrimental not having it.

Discussion of simulated buttons can be generalised to all virtual or simulated devices. Currently they are implemented using custom commands to follow the model of remotely controlled hardware devices. However there is no reason why that has to be the model going forward. What matters is that the case for such devices is recognised and that something is coming. At the moment it isn’t clear that it is.

1 Like