4 * Copyright 2015 Kristopher Kubicki
9 namespace: "KristopherKubicki",
10 author: "kristopher@acm.org",
11 description: "Creates an endpoint for your camera ",
12 category: "Convenience",
13 iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
14 iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png",
15 iconX3Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png")
19 page(name: "selectDevices", install: false, uninstall: true, nextPage: "viewURL") {
20 section("Allow endpoint to control this thing...") {
21 input "motions", "capability.motionSensor", title: "Which simulated motion sensor?"
22 label title: "Assign a name", required: false
23 mode title: "Set for specific mode(s)", required: false
26 page(name: "viewURL", title: "viewURL", install: true)
30 log.debug "Installed with settings: ${settings}"
34 log.debug "Updated with settings: ${settings}"
56 log.debug "Updated2 with settings: ${settings}"
60 void inactiveMotion() {
61 log.debug "Updated2 with settings: ${settings}"
70 ["https://graph.api.smartthings.com/api/smartapps/installations/${app.id}/active", "?access_token=${state.accessToken}"]
75 dynamicPage(name: "viewURL", title: "HTTP Motion Endpoint", install:!resetOauth, nextPage: resetOauth ? "viewURL" : null) {
78 paragraph "Activate: https://graph.api.smartthings.com/api/smartapps/installations/${app.id}/active?access_token=${state.accessToken}"
79 paragraph "Deactivate: https://graph.api.smartthings.com/api/smartapps/installations/${app.id}/inactive?access_token=${state.accessToken}"