mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
ICP-554 - OCF device types Public Repo
This commit is contained in:
@@ -14,13 +14,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Fibaro Door/Window Sensor ZW5 with Temperature", namespace: "fibargroup", author: "Fibar Group S.A.") {
|
definition (name: "Fibaro Door/Window Sensor ZW5 with Temperature", namespace: "fibargroup", author: "Fibar Group S.A.", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Contact Sensor"
|
capability "Contact Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Tamper Alert"
|
capability "Tamper Alert"
|
||||||
|
|
||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
|
|
||||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x31, 0x86", outClusters: ""
|
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x31, 0x86", outClusters: ""
|
||||||
@@ -28,26 +28,26 @@ metadata {
|
|||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"FGK", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
multiAttributeTile(name:"FGK", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
||||||
tileAttribute("device.contact", key:"PRIMARY_CONTROL") {
|
tileAttribute("device.contact", key:"PRIMARY_CONTROL") {
|
||||||
attributeState("open", icon:"st.contact.contact.open", backgroundColor:"#e86d13")
|
attributeState("open", icon:"st.contact.contact.open", backgroundColor:"#e86d13")
|
||||||
attributeState("closed", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc")
|
attributeState("closed", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc")
|
||||||
}
|
}
|
||||||
|
|
||||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||||
attributeState("active", label:'tamper active', backgroundColor:"#53a7c0")
|
attributeState("active", label:'tamper active', backgroundColor:"#53a7c0")
|
||||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff")
|
attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
||||||
state "battery", label:'${currentValue}% battery', unit:""
|
state "battery", label:'${currentValue}% battery', unit:""
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
||||||
state "temperature", label:'${currentValue}°',
|
state "temperature", label:'${currentValue}°',
|
||||||
backgroundColors:[
|
backgroundColors:[
|
||||||
@@ -60,7 +60,7 @@ metadata {
|
|||||||
[value: 96, color: "#bc2323"]
|
[value: 96, color: "#bc2323"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
main "FGK"
|
main "FGK"
|
||||||
details(["FGK","battery", "temperature"])
|
details(["FGK","battery", "temperature"])
|
||||||
}
|
}
|
||||||
@@ -68,9 +68,9 @@ metadata {
|
|||||||
|
|
||||||
// parse events into attributes
|
// parse events into attributes
|
||||||
def parse(String description) {
|
def parse(String description) {
|
||||||
log.debug "Parsing '${description}'"
|
log.debug "Parsing '${description}'"
|
||||||
def result = []
|
def result = []
|
||||||
|
|
||||||
if (description.startsWith("Err 106")) {
|
if (description.startsWith("Err 106")) {
|
||||||
if (state.sec) {
|
if (state.sec) {
|
||||||
result = createEvent(descriptionText:description, displayed:false)
|
result = createEvent(descriptionText:description, displayed:false)
|
||||||
@@ -87,7 +87,7 @@ def parse(String description) {
|
|||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
def cmd = zwave.parse(description, [0x31: 5, 0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
def cmd = zwave.parse(description, [0x31: 5, 0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
log.debug "Parsed '${cmd}'"
|
log.debug "Parsed '${cmd}'"
|
||||||
zwaveEvent(cmd)
|
zwaveEvent(cmd)
|
||||||
@@ -125,13 +125,13 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
//(parameter 20 was not changed before device's re-inclusion)
|
//(parameter 20 was not changed before device's re-inclusion)
|
||||||
def map = [:]
|
def map = [:]
|
||||||
if (cmd.notificationType == 6) {
|
if (cmd.notificationType == 6) {
|
||||||
switch (cmd.event) {
|
switch (cmd.event) {
|
||||||
case 22:
|
case 22:
|
||||||
map.name = "contact"
|
map.name = "contact"
|
||||||
map.value = "open"
|
map.value = "open"
|
||||||
map.descriptionText = "${device.displayName}: is open"
|
map.descriptionText = "${device.displayName}: is open"
|
||||||
break
|
break
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
map.name = "contact"
|
map.name = "contact"
|
||||||
map.value = "closed"
|
map.value = "closed"
|
||||||
@@ -145,7 +145,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
map.value = "inactive"
|
map.value = "inactive"
|
||||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||||
break
|
break
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
map.name = "tamper"
|
map.name = "tamper"
|
||||||
map.value = "active"
|
map.value = "active"
|
||||||
@@ -153,7 +153,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
|||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
||||||
def event = createEvent(descriptionText: "${device.displayName} woke up", displayed: false)
|
def event = createEvent(descriptionText: "${device.displayName} woke up", displayed: false)
|
||||||
def cmds = []
|
def cmds = []
|
||||||
cmds << encap(zwave.batteryV1.batteryGet())
|
cmds << encap(zwave.batteryV1.batteryGet())
|
||||||
@@ -177,32 +177,32 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
|||||||
[event, response(cmds)]
|
[event, response(cmds)]
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
||||||
log.debug "productId: ${cmd.productId}"
|
log.debug "productId: ${cmd.productId}"
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
||||||
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
||||||
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
||||||
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
||||||
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
||||||
|
|
||||||
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
||||||
String serialNumber = "h'"
|
String serialNumber = "h'"
|
||||||
|
|
||||||
cmd.deviceIdData.each{ data ->
|
cmd.deviceIdData.each{ data ->
|
||||||
serialNumber += "${String.format("%02X", data)}"
|
serialNumber += "${String.format("%02X", data)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDataValue("serialNumber", serialNumber)
|
updateDataValue("serialNumber", serialNumber)
|
||||||
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
||||||
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
||||||
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
||||||
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
||||||
@@ -221,7 +221,7 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
|
|||||||
map.name = "temperature"
|
map.name = "temperature"
|
||||||
map.displayed = true
|
map.displayed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,9 +231,9 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
|
|||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Executing 'configure'"
|
log.debug "Executing 'configure'"
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
||||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||||
@@ -242,7 +242,7 @@ def configure() {
|
|||||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
||||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||||
|
|
||||||
encapSequence(cmds, 500)
|
encapSequence(cmds, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ private encapSequence(commands, delay=200) {
|
|||||||
|
|
||||||
private encap(physicalgraph.zwave.Command cmd) {
|
private encap(physicalgraph.zwave.Command cmd) {
|
||||||
def secureClasses = [0x20, 0x2B, 0x30, 0x5A, 0x70, 0x71, 0x84, 0x85, 0x8E, 0x9C]
|
def secureClasses = [0x20, 0x2B, 0x30, 0x5A, 0x70, 0x71, 0x84, 0x85, 0x8E, 0x9C]
|
||||||
|
|
||||||
//todo: check if secure inclusion was successful
|
//todo: check if secure inclusion was successful
|
||||||
//if not do not send security-encapsulated command
|
//if not do not send security-encapsulated command
|
||||||
if (secureClasses.find{ it == cmd.commandClassId }) {
|
if (secureClasses.find{ it == cmd.commandClassId }) {
|
||||||
@@ -269,4 +269,4 @@ private encap(physicalgraph.zwave.Command cmd) {
|
|||||||
} else {
|
} else {
|
||||||
crc16(cmd)
|
crc16(cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Fibaro Door/Window Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.") {
|
definition (name: "Fibaro Door/Window Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Contact Sensor"
|
capability "Contact Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
@@ -26,26 +26,26 @@ metadata {
|
|||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"FGK", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
multiAttributeTile(name:"FGK", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
||||||
tileAttribute("device.contact", key:"PRIMARY_CONTROL") {
|
tileAttribute("device.contact", key:"PRIMARY_CONTROL") {
|
||||||
attributeState("open", icon:"st.contact.contact.open", backgroundColor:"#e86d13")
|
attributeState("open", icon:"st.contact.contact.open", backgroundColor:"#e86d13")
|
||||||
attributeState("closed", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc")
|
attributeState("closed", icon:"st.contact.contact.closed", backgroundColor:"#00a0dc")
|
||||||
}
|
}
|
||||||
|
|
||||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||||
attributeState("active", label:'tamper active', backgroundColor:"#53a7c0")
|
attributeState("active", label:'tamper active', backgroundColor:"#53a7c0")
|
||||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff")
|
attributeState("inactive", label:'tamper inactive', backgroundColor:"#ffffff")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
||||||
state "battery", label:'${currentValue}% battery', unit:""
|
state "battery", label:'${currentValue}% battery', unit:""
|
||||||
}
|
}
|
||||||
|
|
||||||
main "FGK"
|
main "FGK"
|
||||||
details(["FGK","battery"])
|
details(["FGK","battery"])
|
||||||
}
|
}
|
||||||
@@ -53,9 +53,9 @@ metadata {
|
|||||||
|
|
||||||
// parse events into attributes
|
// parse events into attributes
|
||||||
def parse(String description) {
|
def parse(String description) {
|
||||||
log.debug "Parsing '${description}'"
|
log.debug "Parsing '${description}'"
|
||||||
def result = []
|
def result = []
|
||||||
|
|
||||||
if (description.startsWith("Err 106")) {
|
if (description.startsWith("Err 106")) {
|
||||||
if (state.sec) {
|
if (state.sec) {
|
||||||
result = createEvent(descriptionText:description, displayed:false)
|
result = createEvent(descriptionText:description, displayed:false)
|
||||||
@@ -72,7 +72,7 @@ def parse(String description) {
|
|||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
def cmd = zwave.parse(description, [0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
def cmd = zwave.parse(description, [0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
log.debug "Parsed '${cmd}'"
|
log.debug "Parsed '${cmd}'"
|
||||||
zwaveEvent(cmd)
|
zwaveEvent(cmd)
|
||||||
@@ -110,13 +110,13 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
//(parameter 20 was not changed before device's re-inclusion)
|
//(parameter 20 was not changed before device's re-inclusion)
|
||||||
def map = [:]
|
def map = [:]
|
||||||
if (cmd.notificationType == 6) {
|
if (cmd.notificationType == 6) {
|
||||||
switch (cmd.event) {
|
switch (cmd.event) {
|
||||||
case 22:
|
case 22:
|
||||||
map.name = "contact"
|
map.name = "contact"
|
||||||
map.value = "open"
|
map.value = "open"
|
||||||
map.descriptionText = "${device.displayName}: is open"
|
map.descriptionText = "${device.displayName}: is open"
|
||||||
break
|
break
|
||||||
|
|
||||||
case 23:
|
case 23:
|
||||||
map.name = "contact"
|
map.name = "contact"
|
||||||
map.value = "closed"
|
map.value = "closed"
|
||||||
@@ -130,7 +130,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
map.value = "inactive"
|
map.value = "inactive"
|
||||||
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
map.descriptionText = "${device.displayName}: tamper alarm has been deactivated"
|
||||||
break
|
break
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
map.name = "tamper"
|
map.name = "tamper"
|
||||||
map.value = "active"
|
map.value = "active"
|
||||||
@@ -138,7 +138,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
|||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
||||||
def event = createEvent(descriptionText: "${device.displayName} woke up", displayed: false)
|
def event = createEvent(descriptionText: "${device.displayName} woke up", displayed: false)
|
||||||
def cmds = []
|
def cmds = []
|
||||||
cmds << encap(zwave.batteryV1.batteryGet())
|
cmds << encap(zwave.batteryV1.batteryGet())
|
||||||
@@ -160,32 +160,32 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
|||||||
[event, response(cmds)]
|
[event, response(cmds)]
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
||||||
log.debug "productId: ${cmd.productId}"
|
log.debug "productId: ${cmd.productId}"
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
||||||
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
||||||
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
||||||
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
||||||
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
||||||
|
|
||||||
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
||||||
String serialNumber = "h'"
|
String serialNumber = "h'"
|
||||||
|
|
||||||
cmd.deviceIdData.each{ data ->
|
cmd.deviceIdData.each{ data ->
|
||||||
serialNumber += "${String.format("%02X", data)}"
|
serialNumber += "${String.format("%02X", data)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDataValue("serialNumber", serialNumber)
|
updateDataValue("serialNumber", serialNumber)
|
||||||
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
||||||
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
||||||
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
||||||
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
||||||
@@ -204,7 +204,7 @@ def configure() {
|
|||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds:21600, nodeid: zwaveHubNodeId)//FGK's default wake up interval
|
||||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||||
@@ -212,7 +212,7 @@ def configure() {
|
|||||||
cmds += zwave.batteryV1.batteryGet()
|
cmds += zwave.batteryV1.batteryGet()
|
||||||
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
cmds += zwave.associationV2.associationSet(groupingIdentifier:1, nodeId: [zwaveHubNodeId])
|
||||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||||
|
|
||||||
encapSequence(cmds, 500)
|
encapSequence(cmds, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ private encapSequence(commands, delay=200) {
|
|||||||
|
|
||||||
private encap(physicalgraph.zwave.Command cmd) {
|
private encap(physicalgraph.zwave.Command cmd) {
|
||||||
def secureClasses = [0x20, 0x2B, 0x30, 0x5A, 0x70, 0x71, 0x84, 0x85, 0x8E, 0x9C]
|
def secureClasses = [0x20, 0x2B, 0x30, 0x5A, 0x70, 0x71, 0x84, 0x85, 0x8E, 0x9C]
|
||||||
|
|
||||||
//todo: check if secure inclusion was successful
|
//todo: check if secure inclusion was successful
|
||||||
//if not do not send security-encapsulated command
|
//if not do not send security-encapsulated command
|
||||||
if (secureClasses.find{ it == cmd.commandClassId }) {
|
if (secureClasses.find{ it == cmd.commandClassId }) {
|
||||||
@@ -239,4 +239,4 @@ private encap(physicalgraph.zwave.Command cmd) {
|
|||||||
} else {
|
} else {
|
||||||
crc16(cmd)
|
crc16(cmd)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Fibaro Flood Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.") {
|
definition (name: "Fibaro Flood Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.", ocfDeviceType: "x.com.st.d.sensor.moisture") {
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
@@ -37,13 +37,13 @@ metadata {
|
|||||||
attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff")
|
attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff")
|
||||||
attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#00a0dc")
|
attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#00a0dc")
|
||||||
}
|
}
|
||||||
|
|
||||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||||
attributeState("active", label:'tamper active', backgroundColor:"#cccccc")
|
attributeState("active", label:'tamper active', backgroundColor:"#cccccc")
|
||||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#00A0DC")
|
attributeState("inactive", label:'tamper inactive', backgroundColor:"#00A0DC")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
||||||
state "temperature", label:'${currentValue}°',
|
state "temperature", label:'${currentValue}°',
|
||||||
backgroundColors:[
|
backgroundColors:[
|
||||||
@@ -130,14 +130,14 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd)
|
|||||||
[event, response(cmds)]
|
[event, response(cmds)]
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
||||||
log.debug "productId: ${cmd.productId}"
|
log.debug "productId: ${cmd.productId}"
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
||||||
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
||||||
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
||||||
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Fibaro Motion Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.") {
|
definition (name: "Fibaro Motion Sensor ZW5", namespace: "fibargroup", author: "Fibar Group S.A.", ocfDeviceType: "x.com.st.d.sensor.motion") {
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Illuminance Measurement"
|
capability "Illuminance Measurement"
|
||||||
@@ -23,27 +23,27 @@ metadata {
|
|||||||
capability "Tamper Alert"
|
capability "Tamper Alert"
|
||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Health Check"
|
capability "Health Check"
|
||||||
|
|
||||||
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x20, 0x86, 0x72, 0x5A, 0x59, 0x85, 0x73, 0x84, 0x80, 0x71, 0x56, 0x70, 0x31, 0x8E, 0x22, 0x30, 0x9C, 0x98, 0x7A", outClusters: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"FGMS", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
multiAttributeTile(name:"FGMS", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
|
||||||
tileAttribute("device.motion", key:"PRIMARY_CONTROL") {
|
tileAttribute("device.motion", key:"PRIMARY_CONTROL") {
|
||||||
attributeState("inactive", label:"no motion", icon:"st.motion.motion.inactive", backgroundColor:"#79b821")
|
attributeState("inactive", label:"no motion", icon:"st.motion.motion.inactive", backgroundColor:"#79b821")
|
||||||
attributeState("active", label:"motion", icon:"st.motion.motion.active", backgroundColor:"#ffa81e")
|
attributeState("active", label:"motion", icon:"st.motion.motion.active", backgroundColor:"#ffa81e")
|
||||||
}
|
}
|
||||||
|
|
||||||
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
tileAttribute("device.tamper", key:"SECONDARY_CONTROL") {
|
||||||
attributeState("active", label:'tamper active', backgroundColor:"#00a0dc")
|
attributeState("active", label:'tamper active', backgroundColor:"#00a0dc")
|
||||||
attributeState("inactive", label:'tamper inactive', backgroundColor:"#cccccc")
|
attributeState("inactive", label:'tamper inactive', backgroundColor:"#cccccc")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
||||||
state "temperature", label:'${currentValue}°',
|
state "temperature", label:'${currentValue}°',
|
||||||
backgroundColors:[
|
backgroundColors:[
|
||||||
@@ -56,15 +56,15 @@ metadata {
|
|||||||
[value: 96, color: "#bc2323"]
|
[value: 96, color: "#bc2323"]
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("illuminance", "device.illuminance", inactiveLabel: false, width: 2, height: 2) {
|
valueTile("illuminance", "device.illuminance", inactiveLabel: false, width: 2, height: 2) {
|
||||||
state "luminosity", label:'${currentValue} ${unit}', unit:"lux"
|
state "luminosity", label:'${currentValue} ${unit}', unit:"lux"
|
||||||
}
|
}
|
||||||
|
|
||||||
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
valueTile("battery", "device.battery", inactiveLabel: false, width: 2, height: 2, decoration: "flat") {
|
||||||
state "battery", label:'${currentValue}% battery', unit:""
|
state "battery", label:'${currentValue}% battery', unit:""
|
||||||
}
|
}
|
||||||
|
|
||||||
main "FGMS"
|
main "FGMS"
|
||||||
details(["FGMS","battery","temperature","illuminance"])
|
details(["FGMS","battery","temperature","illuminance"])
|
||||||
}
|
}
|
||||||
@@ -72,9 +72,9 @@ metadata {
|
|||||||
|
|
||||||
// parse events into attributes
|
// parse events into attributes
|
||||||
def parse(String description) {
|
def parse(String description) {
|
||||||
log.debug "Parsing '${description}'"
|
log.debug "Parsing '${description}'"
|
||||||
def result = []
|
def result = []
|
||||||
|
|
||||||
if (description.startsWith("Err 106")) {
|
if (description.startsWith("Err 106")) {
|
||||||
if (state.sec) {
|
if (state.sec) {
|
||||||
result = createEvent(descriptionText:description, displayed:false)
|
result = createEvent(descriptionText:description, displayed:false)
|
||||||
@@ -91,7 +91,7 @@ def parse(String description) {
|
|||||||
return null
|
return null
|
||||||
} else {
|
} else {
|
||||||
def cmd = zwave.parse(description, [0x31: 5, 0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
def cmd = zwave.parse(description, [0x31: 5, 0x56: 1, 0x71: 3, 0x72: 2, 0x80: 1, 0x84: 2, 0x85: 2, 0x86: 1, 0x98: 1])
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
log.debug "Parsed '${cmd}'"
|
log.debug "Parsed '${cmd}'"
|
||||||
zwaveEvent(cmd)
|
zwaveEvent(cmd)
|
||||||
@@ -159,13 +159,13 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
map.descriptionText = "${device.displayName}: motion has stopped"
|
map.descriptionText = "${device.displayName}: motion has stopped"
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
map.name = "tamper"
|
map.name = "tamper"
|
||||||
map.value = "active"
|
map.value = "active"
|
||||||
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
map.descriptionText = "${device.displayName}: tamper alarm activated"
|
||||||
break
|
break
|
||||||
|
|
||||||
case 8:
|
case 8:
|
||||||
map.name = "motion"
|
map.name = "motion"
|
||||||
map.value = "active"
|
map.value = "active"
|
||||||
@@ -173,7 +173,7 @@ def zwaveEvent(physicalgraph.zwave.commands.notificationv3.NotificationReport cm
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
createEvent(map)
|
createEvent(map)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -194,39 +194,39 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd)
|
|||||||
cmds << "delay 500"
|
cmds << "delay 500"
|
||||||
cmds << encap(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0))
|
cmds << encap(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0))
|
||||||
cmds << "delay 500"
|
cmds << "delay 500"
|
||||||
cmds << encap(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 3, scale: 1))
|
cmds << encap(zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 3, scale: 1))
|
||||||
cmds << "delay 1200"
|
cmds << "delay 1200"
|
||||||
cmds << encap(zwave.wakeUpV1.wakeUpNoMoreInformation())
|
cmds << encap(zwave.wakeUpV1.wakeUpNoMoreInformation())
|
||||||
[event, response(cmds)]
|
[event, response(cmds)]
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
||||||
log.debug "productId: ${cmd.productId}"
|
log.debug "productId: ${cmd.productId}"
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
|
||||||
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
log.debug "deviceIdData: ${cmd.deviceIdData}"
|
||||||
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
log.debug "deviceIdDataFormat: ${cmd.deviceIdDataFormat}"
|
||||||
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
log.debug "deviceIdDataLengthIndicator: ${cmd.deviceIdDataLengthIndicator}"
|
||||||
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
log.debug "deviceIdType: ${cmd.deviceIdType}"
|
||||||
|
|
||||||
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {//serial number in binary format
|
||||||
String serialNumber = "h'"
|
String serialNumber = "h'"
|
||||||
|
|
||||||
cmd.deviceIdData.each{ data ->
|
cmd.deviceIdData.each{ data ->
|
||||||
serialNumber += "${String.format("%02X", data)}"
|
serialNumber += "${String.format("%02X", data)}"
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDataValue("serialNumber", serialNumber)
|
updateDataValue("serialNumber", serialNumber)
|
||||||
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
log.debug "${device.displayName} - serial number: ${serialNumber}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
|
||||||
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
updateDataValue("version", "${cmd.applicationVersion}.${cmd.applicationSubVersion}")
|
||||||
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
||||||
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
||||||
@@ -245,7 +245,7 @@ def configure() {
|
|||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds: 7200, nodeid: zwaveHubNodeId)//FGMS' default wake up interval
|
cmds += zwave.wakeUpV2.wakeUpIntervalSet(seconds: 7200, nodeid: zwaveHubNodeId)//FGMS' default wake up interval
|
||||||
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.manufacturerSpecificGet()
|
||||||
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
cmds += zwave.manufacturerSpecificV2.deviceSpecificGet()
|
||||||
@@ -255,7 +255,7 @@ def configure() {
|
|||||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1, scale: 0)
|
||||||
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 3, scale: 1)
|
cmds += zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 3, scale: 1)
|
||||||
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
cmds += zwave.wakeUpV2.wakeUpNoMoreInformation()
|
||||||
|
|
||||||
encapSequence(cmds, 500)
|
encapSequence(cmds, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Everspring Flood Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Everspring Flood Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.moisture") {
|
||||||
capability "Water Sensor"
|
capability "Water Sensor"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
@@ -29,7 +29,7 @@ metadata {
|
|||||||
status "battery ${i}%": new physicalgraph.zwave.Zwave().batteryV1.batteryReport(batteryLevel: i).incomingMessage()
|
status "battery ${i}%": new physicalgraph.zwave.Zwave().batteryV1.batteryReport(batteryLevel: i).incomingMessage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"water", type: "generic", width: 6, height: 4){
|
multiAttributeTile(name:"water", type: "generic", width: 6, height: 4){
|
||||||
tileAttribute ("device.water", key: "PRIMARY_CONTROL") {
|
tileAttribute ("device.water", key: "PRIMARY_CONTROL") {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* 2. 20150125 Todd Wackford
|
* 2. 20150125 Todd Wackford
|
||||||
* Leaned out parse and moved most device info getting into configuration method.
|
* Leaned out parse and moved most device info getting into configuration method.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up metadata, simulator info and tile definition.
|
* Sets up metadata, simulator info and tile definition.
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
* @return none
|
* @return none
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Fibaro Motion Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Fibaro Motion Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.motion") {
|
||||||
capability "Motion Sensor"
|
capability "Motion Sensor"
|
||||||
capability "Temperature Measurement"
|
capability "Temperature Measurement"
|
||||||
capability "Acceleration Sensor"
|
capability "Acceleration Sensor"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Health Check"
|
capability "Health Check"
|
||||||
|
|
||||||
command "resetParams2StDefaults"
|
command "resetParams2StDefaults"
|
||||||
command "listCurrentParams"
|
command "listCurrentParams"
|
||||||
command "updateZwaveParam"
|
command "updateZwaveParam"
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
state("active", label:'vibration', icon:"st.motion.acceleration.active", backgroundColor:"#53a7c0")
|
state("active", label:'vibration', icon:"st.motion.acceleration.active", backgroundColor:"#53a7c0")
|
||||||
state("inactive", label:'still', icon:"st.motion.acceleration.inactive", backgroundColor:"#ffffff")
|
state("inactive", label:'still', icon:"st.motion.acceleration.inactive", backgroundColor:"#ffffff")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main(["motion", "temperature", "acceleration", "illuminance"])
|
main(["motion", "temperature", "acceleration", "illuminance"])
|
||||||
details(["motion", "temperature", "acceleration", "battery", "illuminance", "configure"])
|
details(["motion", "temperature", "acceleration", "battery", "illuminance", "configure"])
|
||||||
@@ -130,18 +130,18 @@ def configure() {
|
|||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
||||||
|
|
||||||
def cmds = []
|
def cmds = []
|
||||||
|
|
||||||
// send associate to group 3 to get sensor data reported only to hub
|
// send associate to group 3 to get sensor data reported only to hub
|
||||||
cmds << zwave.associationV2.associationSet(groupingIdentifier:3, nodeId:[zwaveHubNodeId]).format()
|
cmds << zwave.associationV2.associationSet(groupingIdentifier:3, nodeId:[zwaveHubNodeId]).format()
|
||||||
|
|
||||||
// turn on tamper sensor with active/inactive reports (use it as an acceleration sensor) default is 0, or off
|
// turn on tamper sensor with active/inactive reports (use it as an acceleration sensor) default is 0, or off
|
||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: [4], parameterNumber: 24, size: 1).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: [4], parameterNumber: 24, size: 1).format()
|
||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: 24).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: 24).format()
|
||||||
|
|
||||||
// temperature change report threshold (0-255 = 0.1 to 25.5C) default is 1.0 Celcius, setting to .5 Celcius
|
// temperature change report threshold (0-255 = 0.1 to 25.5C) default is 1.0 Celcius, setting to .5 Celcius
|
||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: [5], parameterNumber: 60, size: 1).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: [5], parameterNumber: 60, size: 1).format()
|
||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: 60).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: 60).format()
|
||||||
|
|
||||||
cmds << response(zwave.batteryV1.batteryGet())
|
cmds << response(zwave.batteryV1.batteryGet())
|
||||||
cmds << response(zwave.versionV1.versionGet().format())
|
cmds << response(zwave.versionV1.versionGet().format())
|
||||||
cmds << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format())
|
cmds << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet().format())
|
||||||
@@ -155,20 +155,20 @@ def parse(String description)
|
|||||||
{
|
{
|
||||||
def result = []
|
def result = []
|
||||||
def cmd = zwave.parse(description, [0x72: 2, 0x31: 2, 0x30: 1, 0x84: 1, 0x9C: 1, 0x70: 2, 0x80: 1, 0x86: 1, 0x7A: 1, 0x56: 1])
|
def cmd = zwave.parse(description, [0x72: 2, 0x31: 2, 0x30: 1, 0x84: 1, 0x9C: 1, 0x70: 2, 0x80: 1, 0x86: 1, 0x7A: 1, 0x56: 1])
|
||||||
|
|
||||||
if (description == "updated") {
|
if (description == "updated") {
|
||||||
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds: 7200, nodeid:zwaveHubNodeId))
|
result << response(zwave.wakeUpV1.wakeUpIntervalSet(seconds: 7200, nodeid:zwaveHubNodeId))
|
||||||
result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
|
result << response(zwave.manufacturerSpecificV2.manufacturerSpecificGet())
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd) {
|
if (cmd) {
|
||||||
if( cmd.CMD == "8407" ) {
|
if( cmd.CMD == "8407" ) {
|
||||||
result << response(zwave.batteryV1.batteryGet().format())
|
result << response(zwave.batteryV1.batteryGet().format())
|
||||||
result << new physicalgraph.device.HubAction(zwave.wakeUpV1.wakeUpNoMoreInformation().format())
|
result << new physicalgraph.device.HubAction(zwave.wakeUpV1.wakeUpNoMoreInformation().format())
|
||||||
}
|
}
|
||||||
result << createEvent(zwaveEvent(cmd))
|
result << createEvent(zwaveEvent(cmd))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( result[0] != null ) {
|
if ( result[0] != null ) {
|
||||||
log.debug "Parse returned ${result}"
|
log.debug "Parse returned ${result}"
|
||||||
result
|
result
|
||||||
@@ -189,14 +189,14 @@ def zwaveEvent(physicalgraph.zwave.commands.crc16encapv1.Crc16Encap cmd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def createEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd, Map item1) {
|
def createEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd, Map item1) {
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
log.debug "manufacturerName: ${cmd.manufacturerName}"
|
||||||
log.debug "productId: ${cmd.productId}"
|
log.debug "productId: ${cmd.productId}"
|
||||||
log.debug "productTypeId: ${cmd.productTypeId}"
|
log.debug "productTypeId: ${cmd.productTypeId}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def createEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd, Map item1) {
|
def createEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd, Map item1) {
|
||||||
updateDataValue("applicationVersion", "${cmd.applicationVersion}")
|
updateDataValue("applicationVersion", "${cmd.applicationVersion}")
|
||||||
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
log.debug "applicationVersion: ${cmd.applicationVersion}"
|
||||||
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
log.debug "applicationSubVersion: ${cmd.applicationSubVersion}"
|
||||||
@@ -205,7 +205,7 @@ def createEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd, Map it
|
|||||||
log.debug "zWaveProtocolSubVersion: ${cmd.zWaveProtocolSubVersion}"
|
log.debug "zWaveProtocolSubVersion: ${cmd.zWaveProtocolSubVersion}"
|
||||||
}
|
}
|
||||||
|
|
||||||
def createEvent(physicalgraph.zwave.commands.firmwareupdatemdv1.FirmwareMdReport cmd, Map item1) {
|
def createEvent(physicalgraph.zwave.commands.firmwareupdatemdv1.FirmwareMdReport cmd, Map item1) {
|
||||||
log.debug "checksum: ${cmd.checksum}"
|
log.debug "checksum: ${cmd.checksum}"
|
||||||
log.debug "firmwareId: ${cmd.firmwareId}"
|
log.debug "firmwareId: ${cmd.firmwareId}"
|
||||||
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
log.debug "manufacturerId: ${cmd.manufacturerId}"
|
||||||
@@ -304,7 +304,7 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS
|
|||||||
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)
|
||||||
log.debug "msr: $msr"
|
log.debug "msr: $msr"
|
||||||
updateDataValue("MSR", msr)
|
updateDataValue("MSR", msr)
|
||||||
|
|
||||||
if ( msr == "010F-0800-2001" ) { //this is the msr and device type for the fibaro motion sensor
|
if ( msr == "010F-0800-2001" ) { //this is the msr and device type for the fibaro motion sensor
|
||||||
configure()
|
configure()
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,7 @@ def test() {
|
|||||||
* @return none
|
* @return none
|
||||||
*/
|
*/
|
||||||
def updateZwaveParam(params) {
|
def updateZwaveParam(params) {
|
||||||
if ( params ) {
|
if ( params ) {
|
||||||
def pNumber = params.paramNumber
|
def pNumber = params.paramNumber
|
||||||
def pSize = params.size
|
def pSize = params.size
|
||||||
def pValue = [params.value]
|
def pValue = [params.value]
|
||||||
@@ -344,7 +344,7 @@ def updateZwaveParam(params) {
|
|||||||
def cmds = []
|
def cmds = []
|
||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: pValue, parameterNumber: pNumber, size: pSize).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: pValue, parameterNumber: pNumber, size: pSize).format()
|
||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: pNumber).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: pNumber).format()
|
||||||
delayBetween(cmds, 1000)
|
delayBetween(cmds, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -388,13 +388,13 @@ def resetParams2StDefaults() {
|
|||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: [18], parameterNumber: 86, size: 1).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: [18], parameterNumber: 86, size: 1).format()
|
||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: [28], parameterNumber: 87, size: 1).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: [28], parameterNumber: 87, size: 1).format()
|
||||||
cmds << zwave.configurationV1.configurationSet(configurationValue: [1], parameterNumber: 89, size: 1).format()
|
cmds << zwave.configurationV1.configurationSet(configurationValue: [1], parameterNumber: 89, size: 1).format()
|
||||||
|
|
||||||
delayBetween(cmds, 500)
|
delayBetween(cmds, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists all of available Fibaro parameters and thier current settings out to the
|
* Lists all of available Fibaro parameters and thier current settings out to the
|
||||||
* logging window in the IDE This will be called from the "Fibaro Tweaker" or
|
* logging window in the IDE This will be called from the "Fibaro Tweaker" or
|
||||||
* user's own app.
|
* user's own app.
|
||||||
*
|
*
|
||||||
* <p>THIS IS AN ADVANCED OPERATION. USE AT YOUR OWN RISK! READ OEM DOCUMENTATION!
|
* <p>THIS IS AN ADVANCED OPERATION. USE AT YOUR OWN RISK! READ OEM DOCUMENTATION!
|
||||||
@@ -433,7 +433,6 @@ def listCurrentParams() {
|
|||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: 86).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: 86).format()
|
||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: 87).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: 87).format()
|
||||||
cmds << zwave.configurationV1.configurationGet(parameterNumber: 89).format()
|
cmds << zwave.configurationV1.configurationGet(parameterNumber: 89).format()
|
||||||
|
|
||||||
delayBetween(cmds, 500)
|
delayBetween(cmds, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "GE Link Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "GE Link Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Open/Closed Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Open/Closed Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Contact Sensor"
|
capability "Contact Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ def parse(String description) {
|
|||||||
if (description.startsWith("zone")) {
|
if (description.startsWith("zone")) {
|
||||||
resMap = createEvent(name: "contact", value: zigbee.parseZoneStatus(description).isAlarm1Set() ? "open" : "closed")
|
resMap = createEvent(name: "contact", value: zigbee.parseZoneStatus(description).isAlarm1Set() ? "open" : "closed")
|
||||||
}
|
}
|
||||||
|
|
||||||
log.debug "Parse returned $resMap"
|
log.debug "Parse returned $resMap"
|
||||||
return resMap
|
return resMap
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
//DEPRECATED - Using the generic DTH for this device. Users need to be moved before deleting this DTH
|
//DEPRECATED - Using the generic DTH for this device. Users need to be moved before deleting this DTH
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "WeMo Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "WeMo Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Refresh"
|
capability "Refresh"
|
||||||
@@ -57,7 +57,7 @@ metadata {
|
|||||||
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
|
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat") {
|
||||||
state "level", label: 'Level ${currentValue}%'
|
state "level", label: 'Level ${currentValue}%'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
main(["switch"])
|
main(["switch"])
|
||||||
details(["switch", "level", "levelSliderControl", "refresh"])
|
details(["switch", "level", "levelSliderControl", "refresh"])
|
||||||
@@ -87,11 +87,11 @@ def parse(String description) {
|
|||||||
if (description?.startsWith("read attr")) {
|
if (description?.startsWith("read attr")) {
|
||||||
log.debug description[-2..-1]
|
log.debug description[-2..-1]
|
||||||
def i = Math.round(convertHexToInt(description[-2..-1]) / 256 * 100 )
|
def i = Math.round(convertHexToInt(description[-2..-1]) / 256 * 100 )
|
||||||
|
|
||||||
sendEvent( name: "level", value: i )
|
sendEvent( name: "level", value: i )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def on() {
|
def on() {
|
||||||
@@ -136,16 +136,16 @@ def setLevel(value) {
|
|||||||
def configure() {
|
def configure() {
|
||||||
|
|
||||||
log.debug "Configuring Reporting and Bindings."
|
log.debug "Configuring Reporting and Bindings."
|
||||||
def configCmds = [
|
def configCmds = [
|
||||||
|
|
||||||
//Switch Reporting
|
//Switch Reporting
|
||||||
"zcl global send-me-a-report 6 0 0x10 0 3600 {01}", "delay 500",
|
"zcl global send-me-a-report 6 0 0x10 0 3600 {01}", "delay 500",
|
||||||
"send 0x${device.deviceNetworkId} 1 1", "delay 1000",
|
"send 0x${device.deviceNetworkId} 1 1", "delay 1000",
|
||||||
|
|
||||||
//Level Control Reporting
|
//Level Control Reporting
|
||||||
"zcl global send-me-a-report 8 0 0x20 5 3600 {0010}", "delay 200",
|
"zcl global send-me-a-report 8 0 0x20 5 3600 {0010}", "delay 200",
|
||||||
"send 0x${device.deviceNetworkId} 1 1", "delay 1500",
|
"send 0x${device.deviceNetworkId} 1 1", "delay 1500",
|
||||||
|
|
||||||
"zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000",
|
"zdo bind 0x${device.deviceNetworkId} 1 1 6 {${device.zigbeeId}} {}", "delay 1000",
|
||||||
"zdo bind 0x${device.deviceNetworkId} 1 1 8 {${device.zigbeeId}} {}", "delay 500",
|
"zdo bind 0x${device.deviceNetworkId} 1 1 8 {${device.zigbeeId}} {}", "delay 500",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import groovy.transform.Field
|
|||||||
@Field Boolean hasConfiguredHealthCheck = false
|
@Field Boolean hasConfiguredHealthCheck = false
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "ZLL Dimmer Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "ZLL Dimmer Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import physicalgraph.zigbee.zcl.DataType
|
import physicalgraph.zigbee.zcl.DataType
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "ZLL RGB Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "ZLL RGB Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Color Control"
|
capability "Color Control"
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import physicalgraph.zigbee.zcl.DataType
|
import physicalgraph.zigbee.zcl.DataType
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "ZLL RGBW Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "ZLL RGBW Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Color Control"
|
capability "Color Control"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import groovy.transform.Field
|
|||||||
@Field Boolean hasConfiguredHealthCheck = false
|
@Field Boolean hasConfiguredHealthCheck = false
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "ZLL White Color Temperature Bulb 5000K", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "ZLL White Color Temperature Bulb 5000K", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Color Temperature"
|
capability "Color Temperature"
|
||||||
@@ -101,7 +101,7 @@ def refresh() {
|
|||||||
if (!((device.getDataValue("manufacturer") == "Eaton") && (device.getDataValue("model") == "Halo_LT01"))) {
|
if (!((device.getDataValue("manufacturer") == "Eaton") && (device.getDataValue("model") == "Halo_LT01"))) {
|
||||||
cmds = cmds + zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.colorTemperatureConfig()
|
cmds = cmds + zigbee.onOffConfig() + zigbee.levelConfig() + zigbee.colorTemperatureConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
cmds
|
cmds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import groovy.transform.Field
|
|||||||
@Field Boolean hasConfiguredHealthCheck = false
|
@Field Boolean hasConfiguredHealthCheck = false
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "ZLL White Color Temperature Bulb", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "ZLL White Color Temperature Bulb", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.light") {
|
||||||
|
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Color Temperature"
|
capability "Color Temperature"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Door/Window Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Z-Wave Door/Window Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Contact Sensor"
|
capability "Contact Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Motion Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Z-Wave Motion Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.motion") {
|
||||||
capability "Motion Sensor"
|
capability "Motion Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
@@ -36,7 +36,7 @@ metadata {
|
|||||||
status "inactive": "command: 3003, payload: 00"
|
status "inactive": "command: 3003, payload: 00"
|
||||||
status "active": "command: 3003, payload: FF"
|
status "active": "command: 3003, payload: FF"
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles {
|
tiles {
|
||||||
standardTile("motion", "device.motion", width: 2, height: 2) {
|
standardTile("motion", "device.motion", width: 2, height: 2) {
|
||||||
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
|
state("active", label:'motion', icon:"st.motion.motion.active", backgroundColor:"#00A0DC")
|
||||||
@@ -197,4 +197,4 @@ def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerS
|
|||||||
|
|
||||||
result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false)
|
result << createEvent(descriptionText: "$device.displayName MSR: $msr", isStateChange: false)
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Plus Door/Window Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Z-Wave Plus Door/Window Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Contact Sensor"
|
capability "Contact Sensor"
|
||||||
capability "Configuration"
|
capability "Configuration"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* Date: 2013-03-07
|
* Date: 2013-03-07
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Virtual Momentary Contact Switch", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Z-Wave Virtual Momentary Contact Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.contact") {
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Switch"
|
capability "Switch"
|
||||||
capability "Refresh"
|
capability "Refresh"
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Water Sensor", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Z-Wave Water Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.moisture") {
|
||||||
capability "Water Sensor"
|
capability "Water Sensor"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
@@ -29,7 +29,7 @@ metadata {
|
|||||||
status "dry": "command: 3003, payload: 00"
|
status "dry": "command: 3003, payload: 00"
|
||||||
status "wet": "command: 3003, payload: FF"
|
status "wet": "command: 3003, payload: FF"
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles {
|
tiles {
|
||||||
standardTile("water", "device.water", width: 2, height: 2) {
|
standardTile("water", "device.water", width: 2, height: 2) {
|
||||||
state "dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff"
|
state "dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff"
|
||||||
|
|||||||
Reference in New Issue
Block a user