diff --git a/smartapps/ethayer/keypad.src/keypad.groovy b/smartapps/ethayer/keypad.src/keypad.groovy index 74f7209..4897dcf 100644 --- a/smartapps/ethayer/keypad.src/keypad.groovy +++ b/smartapps/ethayer/keypad.src/keypad.groovy @@ -106,7 +106,7 @@ def mainPage() { section('Setup', hideable: true, hidden: true) { input(name: 'keypad', title: 'Keypad', type: 'capability.lockCodes', multiple: false, required: true) label title: 'Label', defaultValue: "Keypad: ${keypad.label}", required: false, description: 'recommended to start with Keypad:' - paragraph 'Lock Manager © 2017 v1.3' + paragraph 'Lock Manager © 2017 v1.4' } } } diff --git a/smartapps/ethayer/lock-manager.src/lock-manager.groovy b/smartapps/ethayer/lock-manager.src/lock-manager.groovy index 5258854..f36d3f3 100755 --- a/smartapps/ethayer/lock-manager.src/lock-manager.groovy +++ b/smartapps/ethayer/lock-manager.src/lock-manager.groovy @@ -55,7 +55,7 @@ def mainPage() { section('Advanced', hideable: true, hidden: true) { input(name: 'overwriteMode', title: 'Overwrite?', type: 'bool', required: true, defaultValue: true, description: 'Overwrite mode automatically deletes codes not in the users list') input(name: 'enableDebug', title: 'Enable IDE debug messages?', type: 'bool', required: true, defaultValue: false, description: 'Show activity from Lock Manger in logs for debugging.') - paragraph 'Lock Manager © 2017 v1.3' + paragraph 'Lock Manager © 2017 v1.4' } } } diff --git a/smartapps/ethayer/lock-user.src/lock-user.groovy b/smartapps/ethayer/lock-user.src/lock-user.groovy index 5356f33..638f7e8 100755 --- a/smartapps/ethayer/lock-user.src/lock-user.groovy +++ b/smartapps/ethayer/lock-user.src/lock-user.groovy @@ -199,7 +199,7 @@ def mainPage() { label(title: "Name for App", defaultValue: 'User: ' + userName, required: true, image: 'https://dl.dropboxusercontent.com/u/54190708/LockManager/user.png') input name: 'userName', title: "Name for user", required: true, image: 'https://dl.dropboxusercontent.com/u/54190708/LockManager/user.png' input(name: "userSlot", type: "enum", options: parent.availableSlots(settings.userSlot), title: "Select slot", required: true, refreshAfterSelection: true ) - paragraph 'Lock Manager © 2017 v1.3' + paragraph 'Lock Manager © 2017 v1.4' } } } @@ -800,12 +800,12 @@ def getLock(params) { } def userNotificationSettings() { + def userSettings = false if (phone != null || notification || muteUser || recipients) { // user has it's own settings! - return true + userSettings = true } - // user doesn't ! - return false + return userSettings } def send(msg) { @@ -834,7 +834,7 @@ def checkIfNotifyGlobal(msg) { def start = timeToday(parent.notificationStartTime) def stop = timeToday(parent.notificationEndTime) def now = new Date() - if (parent.start.before(now) && parent.stop.after(now)){ + if (start.before(now) && stop.after(now)){ sendMessageViaParent(msg) } } else { @@ -852,14 +852,14 @@ def sendMessageViaParent(msg) { sendNotificationEvent(msg) } if (parent.phone) { - if ( phone.indexOf(";") > 1){ + if ( parent.phone.indexOf(";") > 1){ def phones = parent.phone.split(";") for ( def i = 0; i < phones.size(); i++) { sendSms(phones[i], msg) } } else { - sendSms(phone, msg) + sendSms(parent.phone, msg) } } } @@ -962,13 +962,6 @@ def sendAskAlexa(message) { unit: "User//${userName}") } -def debugger(message) { - def doDebugger = parent.debuggerOn() - if (doDebugger) { - log.debug(message) - } -} - private anyoneHome(sensors) { def result = false if(sensors.findAll { it?.currentPresence == "present" }) { @@ -994,3 +987,10 @@ def executeHelloPresenceCheck(routines) { location.helloHome.execute(routines) } } + +def debugger(message) { + def doDebugger = parent.debuggerOn() + if (doDebugger) { + log.debug(message) + } +} diff --git a/smartapps/ethayer/lock.src/lock.groovy b/smartapps/ethayer/lock.src/lock.groovy index 6f9ecc8..be40e33 100644 --- a/smartapps/ethayer/lock.src/lock.groovy +++ b/smartapps/ethayer/lock.src/lock.groovy @@ -99,7 +99,7 @@ def mainPage() { } else { paragraph 'Lock is loading data' } - paragraph 'Lock Manager © 2017 v1.3' + paragraph 'Lock Manager © 2017 v1.4' } } }