}
}
-def installed() {
- log.debug "Installed with settings: ${settings}"
-
- initialize()
-}
-
-def updated() {
- log.debug "Updated with settings: ${settings}"
-
- unsubscribe()
- initialize()
-}
-
-def initialize() {
-}
-
-private device(it, type) {
- it ? [id: it.id, label: it.label, type: type] : null
-}
-
//API Mapping
mappings {
path("/getalldevices") {
}
}
+def installed() {
+ log.debug "Installed with settings: ${settings}"
+
+ initialize()
+}
+
+def updated() {
+ log.debug "Updated with settings: ${settings}"
+
+ unsubscribe()
+ initialize()
+}
+
+def initialize() {
+}
+
+private device(it, type) {
+ it ? [id: it.id, label: it.label, type: type] : null
+}
+
+
//API Methods
def getAllDevices() {
def locks_list = locks.collect{device(it,"Lock")}
def bat = getBatteryStatus(device.id)
return [temperature: device.currentValue('temperature')] + bat
}
- }
\ No newline at end of file
+ }