mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-18 21:03:39 +00:00
Compare commits
1 Commits
PROD_2016.
...
MSA-1252-3
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1673099f1 |
@@ -0,0 +1,47 @@
|
|||||||
|
/**
|
||||||
|
* Zw Multichannel
|
||||||
|
*
|
||||||
|
* Copyright 2016 SmartThings
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License. You may obtain a copy of the License at:
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
|
||||||
|
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
|
||||||
|
* for the specific language governing permissions and limitations under the License.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
metadata {
|
||||||
|
definition (name: "Zw Multichannel", namespace: "capabilities", author: "SmartThings") {
|
||||||
|
capability "Zw Multichannel"
|
||||||
|
}
|
||||||
|
|
||||||
|
simulator {
|
||||||
|
status "ZWEvent":""
|
||||||
|
status "ZWInfo":""
|
||||||
|
}
|
||||||
|
|
||||||
|
tiles {
|
||||||
|
valueTile("zwEvent", "device.epEvent", label:"${name}", width:2, height:2) {}
|
||||||
|
valueTile("zwInfo", "device.epInfo", label:"${name}", width:2, height:2) {}
|
||||||
|
main("zwEvent")
|
||||||
|
details(["zwEvent","zwInfo"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// parse events into attributes
|
||||||
|
def parse(String description) {
|
||||||
|
def pair = description.split(":")
|
||||||
|
createEvent(name: pair[0].trim(), value: pair[1].trim())
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle commands
|
||||||
|
def enableEpEvents(data) {
|
||||||
|
'[enableEpEvents]${data}'
|
||||||
|
}
|
||||||
|
|
||||||
|
def epCmd(num, str) {
|
||||||
|
'[epCmd]${num}:${str}'
|
||||||
|
}
|
||||||
@@ -12,6 +12,16 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Purpose: Arrival Sensor HA DTH File
|
||||||
|
*
|
||||||
|
* Filename: Arrival-Sensor-HA.src/Arrival-Sensor-HA.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160115 TW - Update/Edit to support i18n translations
|
||||||
|
* 2. 20160121 TW - Update to V4 battery calcs, added pref's page title translations
|
||||||
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Arrival Sensor HA", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Arrival Sensor HA", namespace: "smartthings", author: "SmartThings") {
|
||||||
capability "Tone"
|
capability "Tone"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,15 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: Arrival Sensor HA i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: Arrival-Sensor-HA.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160115 TW Initial release with informal Korean translation.
|
||||||
|
# 2. 20160121 TW Added def preference section titles.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''Give your device a name'''.ko=기기 이름 설정
|
'''Give your device a name'''.ko=기기 이름 설정
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//@Deprecated: Moved to ZLL Dimmer Bulb
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Cree Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Cree Bulb", namespace: "smartthings", author: "SmartThings") {
|
||||||
|
|
||||||
@@ -24,7 +25,7 @@ metadata {
|
|||||||
capability "Switch"
|
capability "Switch"
|
||||||
capability "Switch Level"
|
capability "Switch Level"
|
||||||
|
|
||||||
fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0000,0019"
|
//fingerprint profileId: "C05E", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0000,0019"
|
||||||
}
|
}
|
||||||
|
|
||||||
// simulator metadata
|
// simulator metadata
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS
|
|||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
|
def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
|
||||||
updateDataValue("MSR", msr)
|
updateDataValue("MSR", msr)
|
||||||
updateDataValue("manufacturer", cmd.manufacturerName)
|
|
||||||
createEvent([descriptionText: "$device.displayName MSR: $msr", isStateChange: false])
|
createEvent([descriptionText: "$device.displayName MSR: $msr", isStateChange: false])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* GE Link Bulb
|
* GE Link Bulb
|
||||||
*
|
*
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2014 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
|
||||||
* in compliance with the License. You may obtain a copy of the License at:
|
* in compliance with the License. You may obtain a copy of the License at:
|
||||||
@@ -53,8 +53,6 @@ metadata {
|
|||||||
capability "Polling"
|
capability "Polling"
|
||||||
|
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE_Appliances", model: "ZLL Light", deviceJoinName: "GE Link Bulb"
|
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE_Appliances", model: "ZLL Light", deviceJoinName: "GE Link Bulb"
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE", model: "SoftWhite", deviceJoinName: "GE Link Soft White Bulb"
|
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE", model: "Daylight", deviceJoinName: "GE Link Daylight Bulb"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UI tile definitions
|
// UI tile definitions
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,15 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: Mobile Presence i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: mobile-presence.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160205 TW Initial release with informal Korean translation.
|
||||||
|
# 2. 20160224 TW Updated with formal Korean translation.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''Give your device a name'''.ko=기기 이름 설정
|
'''Give your device a name'''.ko=기기 이름 설정
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
===============================================================================
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2016 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -12,6 +13,14 @@
|
|||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
|
===============================================================================
|
||||||
|
* Purpose: Mobile Presence DTH File
|
||||||
|
*
|
||||||
|
* Filename: mobile-presence.src/mobile-presence.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160205 TW - Update/Edit to support i18n translations
|
||||||
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,14 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: SmartPower Outlet i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: SmartPower-Outlet.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160116 TW Initial release with informal Korean translation.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''Give your device a name'''.ko=기기 이름 설정
|
'''Give your device a name'''.ko=기기 이름 설정
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
===============================================================================
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2016 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -12,8 +13,15 @@
|
|||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
|
===============================================================================
|
||||||
|
* Purpose: SmartPower Outlet DTH File
|
||||||
|
*
|
||||||
|
* Filename: SmartPower-Outlet.src/SmartPower-Outlet.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160117 TW - Update/Edit to support i18n translations
|
||||||
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
// Automatically generated. Make future change here.
|
// Automatically generated. Make future change here.
|
||||||
definition (name: "SmartPower Outlet", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "SmartPower Outlet", namespace: "smartthings", author: "SmartThings") {
|
||||||
@@ -129,7 +137,6 @@ def refresh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 1200, displayed: false)
|
|
||||||
zigbee.onOffConfig() + powerConfig() + refresh()
|
zigbee.onOffConfig() + powerConfig() + refresh()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,14 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: SmartSense Moisture Sensor i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: SmartSense-Moisture-Sensor.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160116 TW Initial release with formal Korean translation.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''Dry'''.ko=건조
|
'''Dry'''.ko=건조
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
===============================================================================
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2016 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -12,6 +13,15 @@
|
|||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
|
===============================================================================
|
||||||
|
* Purpose: SmartSense Moisture Sensor DTH File
|
||||||
|
*
|
||||||
|
* Filename: SmartSense-Moisture-Sensor.src/SmartSense-Moisture-Sensor.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160116 TW - Update/Edit to support i18n translations
|
||||||
|
* 2. 20160125 TW = Incorporated new battery mapping from TM
|
||||||
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
@@ -311,8 +321,6 @@ def refresh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 7200, displayed: false)
|
|
||||||
|
|
||||||
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
||||||
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
||||||
def configCmds = [
|
def configCmds = [
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,15 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: SmartSense Motion Sensor i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: SmartSense-Motion-Sensor.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160116 TW Initial release with formal Korean translation.
|
||||||
|
# 2. 20160224 TW Updated formal Korean translations from Mike Stoller.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''battery'''.ko=배터리
|
'''battery'''.ko=배터리
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
===============================================================================
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2016 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -12,6 +13,15 @@
|
|||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
|
===============================================================================
|
||||||
|
* Purpose: SmartSense Motion Sensor DTH File
|
||||||
|
*
|
||||||
|
* Filename: SmartSense-Motion-Sensor.src/SmartSense-Motion-Sensor.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160116 TW - Update/Edit to support i18n translations
|
||||||
|
* 2. 20160125 TW = Incorporated new battery mapping from TM
|
||||||
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
@@ -323,8 +333,6 @@ def refresh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 7200, displayed: false)
|
|
||||||
|
|
||||||
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
||||||
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#==============================================================================
|
||||||
# Copyright 2016 SmartThings
|
# Copyright 2016 SmartThings
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -11,6 +12,14 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
#==============================================================================
|
||||||
|
# Purpose: SmartSense Multi Sensor i18n Translation File
|
||||||
|
#
|
||||||
|
# Filename: SmartSense-Multi-Sensor.src/i18n/messages.properties
|
||||||
|
#
|
||||||
|
# Change History:
|
||||||
|
# 1. 20160117 TW Initial release with informal Korean translation.
|
||||||
|
#==============================================================================
|
||||||
# Korean (ko)
|
# Korean (ko)
|
||||||
# Device Preferences
|
# Device Preferences
|
||||||
'''Yes'''.ko=예
|
'''Yes'''.ko=예
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
|
===============================================================================
|
||||||
* Copyright 2016 SmartThings
|
* Copyright 2016 SmartThings
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||||
@@ -12,6 +13,15 @@
|
|||||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* License for the specific language governing permissions and limitations
|
* License for the specific language governing permissions and limitations
|
||||||
* under the License.
|
* under the License.
|
||||||
|
===============================================================================
|
||||||
|
* Purpose: SmartSense Multi Sensor DTH File
|
||||||
|
*
|
||||||
|
* Filename: SmartSense-Multi-Sensor.src/SmartSense-Multi-Sensor.groovy
|
||||||
|
*
|
||||||
|
* Change History:
|
||||||
|
* 1. 20160117 TW - Update/Edit to support i18n translations
|
||||||
|
* 2. 20160125 TW = Incorporated new battery mapping from TM
|
||||||
|
===============================================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
@@ -441,8 +451,6 @@ def refresh() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 7200, displayed: false)
|
|
||||||
|
|
||||||
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
||||||
log.debug "Configuring Reporting"
|
log.debug "Configuring Reporting"
|
||||||
|
|
||||||
|
|||||||
@@ -300,7 +300,6 @@ def getTemperature(value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 7200, displayed: false)
|
|
||||||
|
|
||||||
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
String zigbeeEui = swapEndianHex(device.hub.zigbeeEui)
|
||||||
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
log.debug "Configuring Reporting, IAS CIE, and Bindings."
|
||||||
|
|||||||
@@ -252,7 +252,6 @@ def refresh()
|
|||||||
}
|
}
|
||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
sendEvent(name: "checkInterval", value: 7200, displayed: false)
|
|
||||||
|
|
||||||
log.debug "Configuring Reporting and Bindings."
|
log.debug "Configuring Reporting and Bindings."
|
||||||
def configCmds = [
|
def configCmds = [
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ def installed() {
|
|||||||
sendEvent(name: "multilineText", value: "Line 1 YES\nLine 2 YES\nLine 3 NO")
|
sendEvent(name: "multilineText", value: "Line 1 YES\nLine 2 YES\nLine 3 NO")
|
||||||
}
|
}
|
||||||
|
|
||||||
def parse(String description) {
|
def parse() {
|
||||||
// This is a simulated device. No incoming data to parse.
|
// This is a simulated device. No incoming data to parse.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,9 +22,8 @@ metadata {
|
|||||||
capability "Switch"
|
capability "Switch"
|
||||||
capability "Switch Level"
|
capability "Switch Level"
|
||||||
|
|
||||||
//fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0000,0019"
|
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0000,0019"
|
||||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0019"
|
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0000,0019", manufacturer: "CREE", model: "Connected A-19 60W Equivalent", deviceJoinName: "Cree Connected Bulb"
|
||||||
//fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0000,0019", manufacturer: "CREE", model: "Connected A-19 60W Equivalent", deviceJoinName: "Cree Connected Bulb"
|
|
||||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
||||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000, 0B04, FC0F", outClusters: "0019", manufacturer: "OSRAM", model: "Classic A60 W clear - LIGHTIFY", deviceJoinName: "OSRAM LIGHTIFY LED Smart Connected Light"
|
||||||
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0019", manufacturer: "Philips", model: "LWB006", deviceJoinName: "Philips Hue White"
|
fingerprint profileId: "C05E", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0019", manufacturer: "Philips", model: "LWB006", deviceJoinName: "Philips Hue White"
|
||||||
|
|||||||
@@ -95,17 +95,11 @@ def zwaveEvent(physicalgraph.zwave.commands.hailv1.Hail cmd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
if (state.manufacturer != cmd.manufacturerName) {
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
updateDataValue("manufacturer", cmd.manufacturerName)
|
||||||
log.debug "productId: ${cmd.productId}"
|
}
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
|
||||||
def msr = String.format("%04X-%04X-%04X", cmd.manufacturerId, cmd.productTypeId, cmd.productId)
|
|
||||||
updateDataValue("MSR", msr)
|
|
||||||
updateDataValue("manufacturer", cmd.manufacturerName)
|
|
||||||
createEvent([descriptionText: "$device.displayName MSR: $msr", isStateChange: false])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
||||||
// Handles all Z-Wave commands we aren't interested in
|
// Handles all Z-Wave commands we aren't interested in
|
||||||
[:]
|
[:]
|
||||||
|
|||||||
@@ -131,69 +131,19 @@ def update() {
|
|||||||
def type = params.deviceType
|
def type = params.deviceType
|
||||||
def data = request.JSON
|
def data = request.JSON
|
||||||
def devices = settings[type]
|
def devices = settings[type]
|
||||||
def device = settings[type]?.find { it.id == params.id }
|
|
||||||
def command = data.command
|
def command = data.command
|
||||||
|
|
||||||
log.debug "[PROD] update, params: ${params}, request: ${data}, devices: ${devices*.id}"
|
log.debug "[PROD] update, params: ${params}, request: ${data}, devices: ${devices*.id}"
|
||||||
|
if (command) {
|
||||||
if (!device) {
|
def device = devices?.find { it.id == params.id }
|
||||||
httpError(404, "Device not found")
|
if (!device) {
|
||||||
}
|
httpError(404, "Device not found")
|
||||||
|
} else {
|
||||||
if (validateCommand(device, type, command)) {
|
device."$command"()
|
||||||
device."$command"()
|
}
|
||||||
} else {
|
|
||||||
httpError(403, "Access denied. This command is not supported by current capability.")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Validating the command passed by the user based on capability.
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
def validateCommand(device, deviceType, command) {
|
|
||||||
def capabilityCommands = getDeviceCapabilityCommands(device.capabilities)
|
|
||||||
def currentDeviceCapability = getCapabilityName(deviceType)
|
|
||||||
if (capabilityCommands[currentDeviceCapability]) {
|
|
||||||
return command in capabilityCommands[currentDeviceCapability] ? true : false
|
|
||||||
} else {
|
|
||||||
// Handling other device types here, which don't accept commands
|
|
||||||
httpError(400, "Bad request.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Need to get the attribute name to do the lookup. Only
|
|
||||||
* doing it for the device types which accept commands
|
|
||||||
* @return attribute name of the device type
|
|
||||||
*/
|
|
||||||
def getCapabilityName(type) {
|
|
||||||
switch(type) {
|
|
||||||
case "switches":
|
|
||||||
return "Switch"
|
|
||||||
case "alarms":
|
|
||||||
return "Alarm"
|
|
||||||
case "locks":
|
|
||||||
return "Lock"
|
|
||||||
default:
|
|
||||||
return type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructing the map over here of
|
|
||||||
* supported commands by device capability
|
|
||||||
* @return a map of device capability -> supported commands
|
|
||||||
*/
|
|
||||||
def getDeviceCapabilityCommands(deviceCapabilities) {
|
|
||||||
def map = [:]
|
|
||||||
deviceCapabilities.collect {
|
|
||||||
map[it.name] = it.commands.collect{ it.name.toString() }
|
|
||||||
}
|
|
||||||
return map
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
def show() {
|
def show() {
|
||||||
def type = params.deviceType
|
def type = params.deviceType
|
||||||
def devices = settings[type]
|
def devices = settings[type]
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ def scheduleCheck(evt) {
|
|||||||
else {
|
else {
|
||||||
if(people){
|
if(people){
|
||||||
//don't turn off lights if anyone is home
|
//don't turn off lights if anyone is home
|
||||||
if(someoneIsHome){
|
if(someoneIsHome()){
|
||||||
log.debug("Stopping Check for Light")
|
log.debug("Stopping Check for Light")
|
||||||
unschedule()
|
unschedule()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user