Paged Confirm_access page, not working on desktop


(Tim Fenton) #1

Hey guys

I tried to search a bit and didn’t find anything on the topic, but I am working on an app that uses oauth auth with ST, so I have a smartapp built for that. It uses almost identical code per the docs:

preferences {
    page(name: "pageOne", title: "Gear Devices:", nextPage: "selectActions", uninstall: true) {
        section("Choose devices to control with watch") {
			input "switches", "capability.switch", title: "Which Switches?",  required: false, multiple: true
        	//input "locks", "capability.lock", title: "Which Locks?", required: false, multiple: true     
        	//input "lights", "capability.light", title: "Which Lights?", required: false, multiple: true     
        	//input "levels", "capability.switchLevel", title: "Which level switches?", required: false, multiple: true     
        	//input "motion", "capability.motionSensor", title: "Which Motion Sensors?", required: false, multiple: true     
        }
    }
    page(name: "selectActions")
}

def selectActions() {
    dynamicPage(name: "selectActions", title: "Gear Actions/Routines", install: true, uninstall: true) {
        // get the available actions
        def actions = location.helloHome?.getPhrases()*.label
        if (actions) {
        	// sort them alphabetically
        	actions.sort()
        	section("Choose routines to execute with watch:") {
        		log.trace actions
            	input "action", "enum", title: "Select an routines to execute", options: actions, required: false, multiple: true
        	}
        }
    }
}

The issue is that when I go to the page to grant access to my devices, i select my hub but no devices are listed and no pages are present. Is there a reason for this? Am I missing something stupid? See screenshot for what it looks like.

Any help would be greatly appreciated


(Jim Anderson) #2

You probably just need to be sure you’ve specified the OAuth page and that it is the first page, as documented here: http://docs.smartthings.com/en/latest/smartapp-web-services-developers-guide/smartapp.html#preferences


(Tim Fenton) #3

awesome! that got my switches up and running! thanks, cant believe i missed that. how would you get routines or “hello phrases” through oauth then if you cant have dynamic pages?


(Tim Fenton) #4

Is it even possible to get routines through oauth?? @Jim


(Jim Anderson) #5

Routines/non-device preferences will need to be configured in-app through dynamic pages after it has been installed through the OAuth flow.