Need some help from the dev community here… I am having trouble getting a control tile in a deviceHandler to work. When I create a virtual device using this deviceHandler, the device shows in my “Things” list correctly, but when I click on it for the device detail page, the detail page is completely blank except for a small question mark in the middle. My full deviceHandler code is below.
For reference, my deviceHandler uses the “Alarm” capability in the docs here: https://smartthings.developer.samsung.com/develop/api-ref/capabilities.html#Alarm
The controlTile() documentation I’m following is in the docs here: http://docs.smartthings.com/en/latest/ref-docs/device-handler-ref.html#controltile
Can anybody spot what I am doing wrong here?
metadata {
definition (name: "AlarmDeviceHandler", namespace: "RustyKroboth", author: "Rusty Kroboth") {
capability "Alarm"
}
simulator {
}
tiles(scale: 2){
standardTile("displayer", "device.alarm", width: 6, height: 6) {
state "off", label: "off", icon: "st.switches.switch.on", backgroundColor: "#ffffff"
state "both", label: "both", icon: "st.switches.switch.off", backgroundColor: "#00a0dc"
state "siren", label: "siren", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
state "strobe", label: "strobe", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
}
controlTile("controller", "device.alarm", "control", width: 6, height: 6) {
state "off", action: "Alarm System.off", label: "off", icon: "st.switches.switch.off", backgroundColor: "#ffffff"
state "both", action: "Alarm System.both", label: "both", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
state "siren", action: "Alarm System.siren", label: "siren", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
state "strobe", action: "Alarm System.strobe", label: "strobe", icon: "st.switches.switch.on", backgroundColor: "#00a0dc"
}
main('displayer')
details(['controller'])
}
}
// parse events into attributes
def parse(String description) {
log.debug "Parsing '${description}'"
// TODO: handle 'alarm' attribute
}
// handle commands
def off() {
log.debug "Executing 'off'"
// TODO: handle 'off' command
}
def both() {
log.debug "Executing 'both'"
// TODO: handle 'both' command
}
def siren() {
log.debug "Executing 'siren'"
// TODO: handle 'siren' command
}
def strobe() {
log.debug "Executing 'strobe'"
// TODO: handle 'strobe' command
}