4 * Copyright 2014 Juan Risso
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 // Automatically generated. Make future change here.
19 name: "Jawbone Button Notifier",
20 namespace: "juano2310",
22 category: "SmartThings Labs",
23 description: "Send push notifications or text messages with your Jawbone Up when you hold the button.",
24 iconUrl: "https://s3.amazonaws.com/smartapp-icons/Partner/jawbone-up.png",
25 iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Partner/jawbone-up@2x.png",
29 section("Use this Jawbone as a notification button and...") {
30 input "jawbone", "device.jawboneUser", multiple: true
32 section("Send a message when you press and hold the button...") {
33 input "warnMessage", "text", title: "Warning Message"
35 section("Or text message to these numbers (optional)") {
36 input ("phone1", "contact", required: false) {
37 input "phone1", "phone", required: false
39 input ("phone2", "contact", required: false) {
40 input "phone2", "phone", required: false
42 input ("phone3", "contact", required: false) {
43 input "phone3", "phone", required: false
49 log.debug "Installed with settings: ${settings}"
54 log.debug "Updated with settings: ${settings}"
61 subscribe(jawbone, "sleeping", sendit)
65 log.debug "$evt.value: $evt"
70 log.debug "Sending Message"
82 if (!phone1 && !phone2 && !phone3) {