2 * Remind to close doggy door
4 * Copyright 2014 George Sudarkoff
6 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
7 * in compliance with the License. You may obtain a copy of the License at:
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
12 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
13 * for the specific language governing permissions and limitations under the License.
17 name: "Remind to close doggy door",
18 namespace: "com.sudarkoff",
19 author: "George Sudarkoff",
20 description: "Check that the doggy door is closed after the specified time and send a message if it's not.",
21 category: "Convenience",
22 iconUrl: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.png",
23 iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.png"
28 section ("When this door") {
29 input "door", "capability.contactSensor", title: "Which door?", multiple: false, required: true
31 section ("Still open past") {
32 input "timeOfDay", "time", title: "What time?", required: true
34 section (title: "Notify") {
35 input "sendPushMessage", "bool", title: "Send a push notification?"
36 input "phone", "phone", title: "Send a Text Message?", required: false
51 schedule(timeToday(timeOfDay, location.timeZone), "checkDoor")
55 if (door.latestValue("contact") == "open") {
56 log.debug "${door} is open, sending notification."
57 def message = "Remember to close the ${door}!"
63 if (sendPushMessage != "No") {