Need help figuring out why my SmartApp will run in Sumulator but not for real

I’m trying to create a SmartApp that will change my home alarm state to match what I set in Smart Home Monitor. The SmartApp will only run in the simulator, but not when I install it using the app. Any help would be greatly appreciated!

definition(
    name: "Set Alarm to Match Smart Home Monitor",
    namespace: "kendrome",
    author: "Joshua Johnson",
    description: "Set Alarm to Match Smart Home Monitor",
    category: "Safety & Security",
    iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
    iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
    iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")


preferences {
	page(name: "SelectOptions")
}

def SelectOptions() {
	dynamicPage(name: "SelectOptions", title: "Choose alarm panel", uninstall: true) {
		section {
			input "doors", "capability.lock", title: "Choose alarm panel", required: true, multiple: false
		}
	}
}
def installed() {
	initialize()
}

def updated() {
	unsubscribe()
	initialize()
}

def initialize() {
    subscribe(location, "alarmSystemStatus", alarmHandler)
}


def alarmHandler(evt) {
  log.debug "Alarm Handler value: ${evt.value}"
  log.debug "alarm state: ${location.currentState("alarmSystemStatus")?.value}"
}

On your dynamicPage definition, you need install: true. Otherwise, you can’t install it for real.

2 Likes