mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-17 13:10:52 +00:00
Compare commits
6 Commits
DHF-7
...
PROD_2017.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
453dbbdde3 | ||
|
|
52427802a8 | ||
|
|
72bb22a4b8 | ||
|
|
1263a6e2e1 | ||
|
|
a4d9cd51a3 | ||
|
|
92e1586fa6 |
@@ -24,10 +24,7 @@ metadata {
|
|||||||
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: ""
|
||||||
|
|
||||||
fingerprint mfr:"010F", prod:"0801", model:"2001"
|
|
||||||
fingerprint mfr:"010F", prod:"0801", model:"1001"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
* Date: 2014-07-15
|
* Date: 2014-07-15
|
||||||
*/
|
*/
|
||||||
metadata {
|
metadata {
|
||||||
definition (name: "Aeon Siren", namespace: "smartthings", author: "SmartThings") {
|
definition (name: "Aeon Siren", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.smoke") {
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Alarm"
|
capability "Alarm"
|
||||||
capability "Switch"
|
capability "Switch"
|
||||||
|
|||||||
@@ -1,163 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright 2017 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.
|
|
||||||
*
|
|
||||||
* Everspring ST815 Illuminance Sensor
|
|
||||||
*
|
|
||||||
* Author: SmartThings
|
|
||||||
* Date: 2017-3-4
|
|
||||||
*/
|
|
||||||
|
|
||||||
metadata {
|
|
||||||
definition (name: "Everspring Illuminance Sensor", namespace: "smartthings", author: "SmartThings") {
|
|
||||||
capability "Illuminance Measurement"
|
|
||||||
capability "Battery"
|
|
||||||
capability "Configuration"
|
|
||||||
capability "Sensor"
|
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
fingerprint mfr:"0060", prod:"0007", model:"0001"
|
|
||||||
}
|
|
||||||
|
|
||||||
simulator {
|
|
||||||
for( int i = 0; i <= 100; i += 20 ) {
|
|
||||||
status "illuminace ${i} lux": new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(
|
|
||||||
scaledSensorValue: i, precision: 0, sensorType: 3, scale: 1).incomingMessage()
|
|
||||||
}
|
|
||||||
|
|
||||||
for( int i = 0; i <= 100; i += 20 ) {
|
|
||||||
status "battery ${i}%": new physicalgraph.zwave.Zwave().batteryV1.batteryReport(
|
|
||||||
batteryLevel: i).incomingMessage()
|
|
||||||
}
|
|
||||||
|
|
||||||
status "wakeup": "command: 8407, payload: "
|
|
||||||
}
|
|
||||||
|
|
||||||
tiles(scale: 2) {
|
|
||||||
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
|
||||||
state "temperature", label:'${currentValue}°',
|
|
||||||
backgroundColors:[
|
|
||||||
[value: 32, color: "#153591"],
|
|
||||||
[value: 44, color: "#1e9cbb"],
|
|
||||||
[value: 59, color: "#90d2a7"],
|
|
||||||
[value: 74, color: "#44b621"],
|
|
||||||
[value: 84, color: "#f1d801"],
|
|
||||||
[value: 92, color: "#d04e00"],
|
|
||||||
[value: 98, color: "#bc2323"]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
|
|
||||||
state "humidity", label:'${currentValue}% humidity', unit:""
|
|
||||||
}
|
|
||||||
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
|
|
||||||
state "battery", label:'${currentValue}% battery', unit:""
|
|
||||||
}
|
|
||||||
|
|
||||||
main( ["temperature", "humidity"] )
|
|
||||||
details( ["temperature", "humidity", "battery"] )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
|
||||||
state.configured = false
|
|
||||||
}
|
|
||||||
|
|
||||||
def parse(String description) {
|
|
||||||
def result = []
|
|
||||||
|
|
||||||
def cmd = zwave.parse(description, [0x20: 1, 0x31: 2, 0x70: 1, 0x71: 1, 0x80: 1, 0x84: 2, 0x85: 2])
|
|
||||||
|
|
||||||
if (cmd) {
|
|
||||||
result = zwaveEvent(cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result instanceof List) {
|
|
||||||
log.debug "Parsed '$description' to ${result.collect { it.respondsTo("toHubAction") ? it.toHubAction() : it }}"
|
|
||||||
} else {
|
|
||||||
log.debug "Parsed '$description' to ${result}"
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
|
||||||
def result = [
|
|
||||||
createEvent(descriptionText: "${device.displayName} woke up", isStateChange: false)
|
|
||||||
]
|
|
||||||
if (state.configured) {
|
|
||||||
result << response(zwave.batteryV1.batteryGet())
|
|
||||||
} else {
|
|
||||||
result << response(configure())
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.alarmv1.AlarmReport cmd) {
|
|
||||||
if (cmd.alarmType == 1 && cmd.alarmType == 0xFF) {
|
|
||||||
return createEvent(descriptionText: "${device.displayName} battery is low", isStateChange: true)
|
|
||||||
} else if (cmd.alarmType == 2 && cmd.alarmLevel == 1) {
|
|
||||||
return createEvent(descriptionText: "${device.displayName} powered up", isStateChange: false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv2.SensorMultilevelReport cmd) {
|
|
||||||
|
|
||||||
def map = [:]
|
|
||||||
switch( cmd.sensorType ) {
|
|
||||||
case 3:
|
|
||||||
// luminance
|
|
||||||
map.value = cmd.scaledSensorValue.toInteger().toString()
|
|
||||||
map.unit = "lux"
|
|
||||||
map.name = "illuminance"
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return createEvent(map)
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
|
||||||
def map = [ name: "battery", unit: "%" ]
|
|
||||||
if (cmd.batteryLevel == 0xFF) {
|
|
||||||
map.value = 1
|
|
||||||
map.descriptionText = "${device.displayName} has a low battery"
|
|
||||||
map.isStateChange = true
|
|
||||||
} else {
|
|
||||||
map.value = cmd.batteryLevel
|
|
||||||
}
|
|
||||||
|
|
||||||
def response_cmds = []
|
|
||||||
if (!currentTemperature) {
|
|
||||||
response_cmds << zwave.sensorMultilevelV2.sensorMultilevelGet().format()
|
|
||||||
response_cmds << "delay 1000"
|
|
||||||
}
|
|
||||||
response_cmds << zwave.wakeUpV1.wakeUpNoMoreInformation().format()
|
|
||||||
|
|
||||||
return [createEvent(map), response(response_cmds)]
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
|
||||||
log.debug "Unhandled: ${cmd.toString()}"
|
|
||||||
return [:]
|
|
||||||
}
|
|
||||||
|
|
||||||
def configure() {
|
|
||||||
state.configured = true
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
delayBetween([
|
|
||||||
// Auto report time interval in minutes
|
|
||||||
zwave.configurationV1.configurationSet(parameterNumber: 5, size: 2, scaledConfigurationValue: 20).format(),
|
|
||||||
|
|
||||||
// Auto report lux change threshold
|
|
||||||
zwave.configurationV1.configurationSet(parameterNumber: 6, size: 2, scaledConfigurationValue: 30).format(),
|
|
||||||
|
|
||||||
// Get battery – report triggers WakeUpNMI
|
|
||||||
zwave.batteryV1.batteryGet().format()
|
|
||||||
])
|
|
||||||
}
|
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
/**
|
|
||||||
* Copyright 2017 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.
|
|
||||||
*
|
|
||||||
* Everspring ST814 Temperature/Humidity Sensor
|
|
||||||
*
|
|
||||||
* Author: SmartThings
|
|
||||||
* Date: 2017-3-4
|
|
||||||
*/
|
|
||||||
|
|
||||||
metadata {
|
|
||||||
definition (name: "Everspring ST814", namespace: "smartthings", author: "SmartThings") {
|
|
||||||
capability "Temperature Measurement"
|
|
||||||
capability "Relative Humidity Measurement"
|
|
||||||
capability "Battery"
|
|
||||||
capability "Configuration"
|
|
||||||
capability "Sensor"
|
|
||||||
capability "Health Check"
|
|
||||||
|
|
||||||
fingerprint mfr:"0060", prod:"0006", model:"0001"
|
|
||||||
}
|
|
||||||
|
|
||||||
simulator {
|
|
||||||
for( int i = 0; i <= 100; i += 20 ) {
|
|
||||||
status "temperature ${i}F": new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(
|
|
||||||
scaledSensorValue: i, precision: 1, sensorType: 1, scale: 1).incomingMessage()
|
|
||||||
}
|
|
||||||
|
|
||||||
for( int i = 0; i <= 100; i += 20 ) {
|
|
||||||
status "humidity ${i}%": new physicalgraph.zwave.Zwave().sensorMultilevelV2.sensorMultilevelReport(
|
|
||||||
scaledSensorValue: i, precision: 0, sensorType: 5).incomingMessage()
|
|
||||||
}
|
|
||||||
|
|
||||||
for( int i = 0; i <= 100; i += 20 ) {
|
|
||||||
status "battery ${i}%": new physicalgraph.zwave.Zwave().batteryV1.batteryReport(
|
|
||||||
batteryLevel: i).incomingMessage()
|
|
||||||
}
|
|
||||||
status "wakeup": "command: 8407, payload: "
|
|
||||||
}
|
|
||||||
|
|
||||||
tiles(scale: 2) {
|
|
||||||
valueTile("temperature", "device.temperature", inactiveLabel: false, width: 2, height: 2) {
|
|
||||||
state "temperature", label:'${currentValue}°',
|
|
||||||
backgroundColors:[
|
|
||||||
[value: 32, color: "#153591"],
|
|
||||||
[value: 44, color: "#1e9cbb"],
|
|
||||||
[value: 59, color: "#90d2a7"],
|
|
||||||
[value: 74, color: "#44b621"],
|
|
||||||
[value: 84, color: "#f1d801"],
|
|
||||||
[value: 92, color: "#d04e00"],
|
|
||||||
[value: 98, color: "#bc2323"]
|
|
||||||
]
|
|
||||||
}
|
|
||||||
valueTile("humidity", "device.humidity", inactiveLabel: false, width: 2, height: 2) {
|
|
||||||
state "humidity", label:'${currentValue}% humidity', unit:""
|
|
||||||
}
|
|
||||||
valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
|
|
||||||
state "battery", label:'${currentValue}% battery', unit:""
|
|
||||||
}
|
|
||||||
|
|
||||||
main( ["temperature", "humidity"] )
|
|
||||||
details( ["temperature", "humidity", "battery"] )
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
|
||||||
state.configured = false
|
|
||||||
}
|
|
||||||
|
|
||||||
def parse(String description) {
|
|
||||||
def result = []
|
|
||||||
|
|
||||||
def cmd = zwave.parse(description, [0x20: 1, 0x31: 2, 0x70: 1, 0x71: 1, 0x80: 1, 0x84: 2, 0x85: 2])
|
|
||||||
|
|
||||||
if (cmd) {
|
|
||||||
result = zwaveEvent(cmd)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result instanceof List) {
|
|
||||||
log.debug "Parsed '$description' to ${result.collect { it.respondsTo("toHubAction") ? it.toHubAction() : it }}"
|
|
||||||
} else {
|
|
||||||
log.debug "Parsed '$description' to ${result}"
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
|
|
||||||
def result = [
|
|
||||||
createEvent(descriptionText: "${device.displayName} woke up", isStateChange: false)
|
|
||||||
]
|
|
||||||
if (state.configured) {
|
|
||||||
result << response(zwave.batteryV1.batteryGet())
|
|
||||||
} else {
|
|
||||||
result << response(configure())
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.alarmv1.AlarmReport cmd) {
|
|
||||||
if (cmd.alarmType == 1 && cmd.alarmType == 0xFF) {
|
|
||||||
return createEvent(descriptionText: "${device.displayName} battery is low", isStateChange: true)
|
|
||||||
} else if (cmd.alarmType == 2 && cmd.alarmLevel == 1) {
|
|
||||||
return createEvent(descriptionText: "${device.displayName} powered up", isStateChange: false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv2.SensorMultilevelReport cmd) {
|
|
||||||
|
|
||||||
def map = [:]
|
|
||||||
switch( cmd.sensorType ) {
|
|
||||||
case 1:
|
|
||||||
/* temperature */
|
|
||||||
def cmdScale = cmd.scale == 1 ? "F" : "C"
|
|
||||||
map.value = convertTemperatureIfNeeded(cmd.scaledSensorValue, cmdScale, cmd.precision)
|
|
||||||
map.unit = getTemperatureScale()
|
|
||||||
map.name = "temperature"
|
|
||||||
break
|
|
||||||
case 5:
|
|
||||||
/* humidity */
|
|
||||||
map.value = cmd.scaledSensorValue.toInteger().toString()
|
|
||||||
map.unit = "%"
|
|
||||||
map.name = "humidity"
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
return createEvent(map)
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
|
||||||
def map = [ name: "battery", unit: "%" ]
|
|
||||||
if (cmd.batteryLevel == 0xFF) {
|
|
||||||
map.value = 1
|
|
||||||
map.descriptionText = "${device.displayName} has a low battery"
|
|
||||||
map.isStateChange = true
|
|
||||||
} else {
|
|
||||||
map.value = cmd.batteryLevel
|
|
||||||
}
|
|
||||||
|
|
||||||
def response_cmds = []
|
|
||||||
if (!currentTemperature) {
|
|
||||||
response_cmds << zwave.sensorMultilevelV2.sensorMultilevelGet().format()
|
|
||||||
response_cmds << "delay 1000"
|
|
||||||
}
|
|
||||||
response_cmds << zwave.wakeUpV1.wakeUpNoMoreInformation().format()
|
|
||||||
|
|
||||||
return [createEvent(map), response(response_cmds)]
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
|
|
||||||
def result = null
|
|
||||||
def encapsulatedCommand = cmd.encapsulatedCommand([0x20: 1, 0x31: 2, 0x70: 1, 0x71: 1, 0x80: 1, 0x84: 2, 0x85: 2])
|
|
||||||
log.debug ("Command from endpoint ${cmd.sourceEndPoint}: ${encapsulatedCommand}")
|
|
||||||
if (encapsulatedCommand) {
|
|
||||||
result = zwaveEvent(encapsulatedCommand)
|
|
||||||
}
|
|
||||||
result
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.Command cmd) {
|
|
||||||
log.debug "Unhandled: ${cmd.toString()}"
|
|
||||||
return [:]
|
|
||||||
}
|
|
||||||
|
|
||||||
def configure() {
|
|
||||||
state.configured = true
|
|
||||||
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
delayBetween([
|
|
||||||
// Auto report time interval in minutes
|
|
||||||
zwave.configurationV1.configurationSet(parameterNumber: 6, size: 2, scaledConfigurationValue: 20).format(),
|
|
||||||
|
|
||||||
// Auto report temperature change threshold
|
|
||||||
zwave.configurationV1.configurationSet(parameterNumber: 7, size: 1, scaledConfigurationValue: 2).format(),
|
|
||||||
|
|
||||||
// Auto report humidity change threshold
|
|
||||||
zwave.configurationV1.configurationSet(parameterNumber: 8, size: 1, scaledConfigurationValue: 5).format(),
|
|
||||||
|
|
||||||
// Get battery – report triggers WakeUpNMI
|
|
||||||
zwave.batteryV1.batteryGet().format()
|
|
||||||
])
|
|
||||||
}
|
|
||||||
@@ -47,14 +47,14 @@
|
|||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
capability "Battery"
|
capability "Battery"
|
||||||
capability "Health Check"
|
capability "Health Check"
|
||||||
command "resetParams2StDefaults"
|
|
||||||
command "listCurrentParams"
|
|
||||||
command "updateZwaveParam"
|
|
||||||
command "test"
|
|
||||||
command "configure"
|
|
||||||
|
|
||||||
fingerprint mfr:"010F", prod:"0800", model:"2001"
|
command "resetParams2StDefaults"
|
||||||
fingerprint mfr:"010F", prod:"0800", model:"1001"
|
command "listCurrentParams"
|
||||||
|
command "updateZwaveParam"
|
||||||
|
command "test"
|
||||||
|
command "configure"
|
||||||
|
|
||||||
|
fingerprint deviceId: "0x2001", inClusters: "0x30,0x84,0x85,0x80,0x8F,0x56,0x72,0x86,0x70,0x8E,0x31,0x9C,0xEF,0x30,0x31,0x9C"
|
||||||
}
|
}
|
||||||
|
|
||||||
simulator {
|
simulator {
|
||||||
|
|||||||
@@ -34,22 +34,19 @@ metadata {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tile definitions
|
// tile definitions
|
||||||
tiles(scale: 2) {
|
tiles {
|
||||||
multiAttributeTile(name:"valve", type: "generic", width: 6, height: 4, canChangeIcon: true){
|
standardTile("contact", "device.contact", width: 2, height: 2, canChangeIcon: true) {
|
||||||
tileAttribute ("device.valve", key: "PRIMARY_CONTROL") {
|
state "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
||||||
attributeState "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
state "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
||||||
attributeState "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
state "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC"
|
||||||
attributeState "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC"
|
state "closing", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff"
|
||||||
attributeState "closing", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
standardTile("refresh", "device.switch", inactiveLabel: false, decoration: "flat") {
|
||||||
standardTile("refresh", "device.valve", width: 2, height: 2, inactiveLabel: false, decoration: "flat") {
|
|
||||||
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
|
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
|
||||||
}
|
}
|
||||||
|
|
||||||
main "valve"
|
main "contact"
|
||||||
details(["valve","refresh"])
|
details(["contact","refresh"])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ metadata {
|
|||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3200", deviceJoinName: "Outlet"
|
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3200", deviceJoinName: "Outlet"
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3200-Sgb", deviceJoinName: "Outlet"
|
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "3200-Sgb", deviceJoinName: "Outlet"
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "4257050-RZHAC", deviceJoinName: "Outlet"
|
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019", manufacturer: "CentraLite", model: "4257050-RZHAC", deviceJoinName: "Outlet"
|
||||||
|
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 000F, 0B04", outClusters: "0019", manufacturer: "SmartThings", model: "outletv4", deviceJoinName: "Outlet"
|
||||||
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019"
|
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0B04,0B05", outClusters: "0019"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ private List<Map> handleAcceleration(descMap) {
|
|||||||
result += parseAxis(descMap.additionalAttrs)
|
result += parseAxis(descMap.additionalAttrs)
|
||||||
}
|
}
|
||||||
} else if (descMap.clusterInt == 0xFC02 && descMap.attrInt == 0x0012) {
|
} else if (descMap.clusterInt == 0xFC02 && descMap.attrInt == 0x0012) {
|
||||||
def addAttrs = descMap.additionalAttrs ?: []
|
def addAttrs = descMap.additionalAttrs
|
||||||
addAttrs << ["attrInt": descMap.attrInt, "value": descMap.value]
|
addAttrs << ["attrInt": descMap.attrInt, "value": descMap.value]
|
||||||
result += parseAxis(addAttrs)
|
result += parseAxis(addAttrs)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ metadata {
|
|||||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702"
|
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702"
|
||||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "0003, 000A, 0019", manufacturer: "Jasco Products", model: "45853", deviceJoinName: "GE ZigBee Plug-In Switch"
|
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "0003, 000A, 0019", manufacturer: "Jasco Products", model: "45853", deviceJoinName: "GE ZigBee Plug-In Switch"
|
||||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "000A, 0019", manufacturer: "Jasco Products", model: "45856", deviceJoinName: "GE ZigBee In-Wall Switch"
|
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 0702, 0B05", outClusters: "000A, 0019", manufacturer: "Jasco Products", model: "45856", deviceJoinName: "GE ZigBee In-Wall Switch"
|
||||||
fingerprint profileId: "0104", inClusters: "0000, 0003, 0004, 0005, 0006, 000F, 0B04", outClusters: "0019", manufacturer: "SmartThings", model: "outletv4", deviceJoinName: "Outlet"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ metadata {
|
|||||||
|
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"valve", type: "generic", width: 6, height: 4, canChangeIcon: true){
|
multiAttributeTile(name:"valve", type: "generic", width: 6, height: 4, canChangeIcon: true){
|
||||||
tileAttribute ("device.valve", key: "PRIMARY_CONTROL") {
|
tileAttribute ("device.contact", key: "PRIMARY_CONTROL") {
|
||||||
attributeState "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
attributeState "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
||||||
attributeState "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
attributeState "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
||||||
attributeState "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
attributeState "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
||||||
|
|||||||
@@ -75,10 +75,6 @@ def parse(String description) {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
def uninstalled() {
|
|
||||||
sendEvent(name: "epEvent", value: "delete all", isStateChange: true, displayed: false, descriptionText: "Delete endpoint devices")
|
|
||||||
}
|
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.wakeupv1.WakeUpNotification cmd) {
|
||||||
[ createEvent(descriptionText: "${device.displayName} woke up", isStateChange:true),
|
[ createEvent(descriptionText: "${device.displayName} woke up", isStateChange:true),
|
||||||
response(["delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format()]) ]
|
response(["delay 2000", zwave.wakeUpV1.wakeUpNoMoreInformation().format()]) ]
|
||||||
|
|||||||
@@ -152,10 +152,6 @@ def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityCommandsSupported
|
|||||||
|
|
||||||
def zwaveEvent(DoorLockOperationReport cmd) {
|
def zwaveEvent(DoorLockOperationReport cmd) {
|
||||||
def result = []
|
def result = []
|
||||||
|
|
||||||
unschedule(followupStateCheck)
|
|
||||||
unschedule(stateCheck)
|
|
||||||
|
|
||||||
def map = [ name: "lock" ]
|
def map = [ name: "lock" ]
|
||||||
if (cmd.doorLockMode == 0xFF) {
|
if (cmd.doorLockMode == 0xFF) {
|
||||||
map.value = "locked"
|
map.value = "locked"
|
||||||
@@ -369,7 +365,7 @@ def zwaveEvent(UserCodeReport cmd) {
|
|||||||
code = state["set$name"] ?: decrypt(state[name]) ?: "****"
|
code = state["set$name"] ?: decrypt(state[name]) ?: "****"
|
||||||
state.remove("set$name".toString())
|
state.remove("set$name".toString())
|
||||||
} else {
|
} else {
|
||||||
map = [ name: "codeReport", value: cmd.userIdentifier, data: [ code: code ], isStateChange: true ]
|
map = [ name: "codeReport", value: cmd.userIdentifier, data: [ code: code ] ]
|
||||||
map.descriptionText = "$device.displayName code $cmd.userIdentifier is set"
|
map.descriptionText = "$device.displayName code $cmd.userIdentifier is set"
|
||||||
map.displayed = (cmd.userIdentifier != state.requestCode && cmd.userIdentifier != state.pollCode)
|
map.displayed = (cmd.userIdentifier != state.requestCode && cmd.userIdentifier != state.pollCode)
|
||||||
map.isStateChange = true
|
map.isStateChange = true
|
||||||
@@ -460,12 +456,11 @@ def zwaveEvent(physicalgraph.zwave.commands.timev1.TimeGet cmd) {
|
|||||||
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
|
||||||
// The old Schlage locks use group 1 for basic control - we don't want that, so unsubscribe from group 1
|
// The old Schlage locks use group 1 for basic control - we don't want that, so unsubscribe from group 1
|
||||||
def result = [ createEvent(name: "lock", value: cmd.value ? "unlocked" : "locked") ]
|
def result = [ createEvent(name: "lock", value: cmd.value ? "unlocked" : "locked") ]
|
||||||
def cmds = [
|
result << response(zwave.associationV1.associationRemove(groupingIdentifier:1, nodeId:zwaveHubNodeId))
|
||||||
zwave.associationV1.associationRemove(groupingIdentifier:1, nodeId:zwaveHubNodeId).format(),
|
if (state.assoc != zwaveHubNodeId) {
|
||||||
"delay 1200",
|
result << response(zwave.associationV1.associationGet(groupingIdentifier:2))
|
||||||
zwave.associationV1.associationGet(groupingIdentifier:2).format()
|
}
|
||||||
]
|
result
|
||||||
[result, response(cmds)]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
def zwaveEvent(physicalgraph.zwave.commands.batteryv1.BatteryReport cmd) {
|
||||||
@@ -535,18 +530,11 @@ def unlockwtimeout() {
|
|||||||
lockAndCheck(DoorLockOperationSet.DOOR_LOCK_MODE_DOOR_UNSECURED_WITH_TIMEOUT)
|
lockAndCheck(DoorLockOperationSet.DOOR_LOCK_MODE_DOOR_UNSECURED_WITH_TIMEOUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PING is used by Device-Watch in attempt to reach the Device
|
||||||
|
* */
|
||||||
def ping() {
|
def ping() {
|
||||||
runIn(30, followupStateCheck)
|
refresh()
|
||||||
secure(zwave.doorLockV1.doorLockOperationGet())
|
|
||||||
}
|
|
||||||
|
|
||||||
def followupStateCheck() {
|
|
||||||
runEvery1Hour(stateCheck)
|
|
||||||
stateCheck()
|
|
||||||
}
|
|
||||||
|
|
||||||
def stateCheck() {
|
|
||||||
sendHubCommand(new physicalgraph.device.HubAction(secure(zwave.doorLockV1.doorLockOperationGet())))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def refresh() {
|
def refresh() {
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
.st-ignore
|
|
||||||
README.md
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
# Z-Wave Water Valve
|
|
||||||
|
|
||||||
Cloud Execution
|
|
||||||
|
|
||||||
Works with:
|
|
||||||
|
|
||||||
* [Leak Intelligence Leak Gopher Water Shutoff Valve](https://www.smartthings.com/works-with-smartthings/other/leak-intelligence-leak-gopher-water-shutoff-valve)
|
|
||||||
|
|
||||||
|
|
||||||
## Table of contents
|
|
||||||
|
|
||||||
* [Capabilities](#capabilities)
|
|
||||||
* [Health](#device-health)
|
|
||||||
* [Troubleshooting](#Troubleshooting)
|
|
||||||
|
|
||||||
## Capabilities
|
|
||||||
|
|
||||||
* **Actuator** - represents that a Device has commands
|
|
||||||
* **Health Check** - indicates ability to get device health notifications
|
|
||||||
* **Valve** - allows for the control of a valve device
|
|
||||||
* **Polling** - represents that poll() can be implemented for the device
|
|
||||||
* **Refresh** - _refresh()_ command for status updates
|
|
||||||
* **Sensor** - detects sensor events
|
|
||||||
|
|
||||||
## Device Health
|
|
||||||
|
|
||||||
SmartThings platform will ping the device after `checkInterval` seconds of inactivity in last attempt to reach the device before marking it `OFFLINE`
|
|
||||||
|
|
||||||
* __32min__ checkInterval
|
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
If the device doesn't pair when trying from the SmartThings mobile app, it is possible that the device is out of range.
|
|
||||||
Pairing needs to be tried again by placing the device closer to the hub.
|
|
||||||
Instructions related to pairing, resetting and removing the device from SmartThings can be found in the following link:
|
|
||||||
* [Leak Intelligence Leak Gopher Water Shutoff Valve Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/209631423-Leak-Gopher-Z-Wave-Valve-Control)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -14,14 +14,12 @@
|
|||||||
metadata {
|
metadata {
|
||||||
definition (name: "Z-Wave Water Valve", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.watervalve") {
|
definition (name: "Z-Wave Water Valve", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.watervalve") {
|
||||||
capability "Actuator"
|
capability "Actuator"
|
||||||
capability "Health Check"
|
|
||||||
capability "Valve"
|
capability "Valve"
|
||||||
capability "Polling"
|
capability "Polling"
|
||||||
capability "Refresh"
|
capability "Refresh"
|
||||||
capability "Sensor"
|
capability "Sensor"
|
||||||
|
|
||||||
fingerprint deviceId: "0x1006", inClusters: "0x25"
|
fingerprint deviceId: "0x1006", inClusters: "0x25"
|
||||||
fingerprint mfr:"0173", prod:"0003", model:"0002", deviceJoinName: "Leak Intelligence Leak Gopher Water Shutoff Valve"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// simulator metadata
|
// simulator metadata
|
||||||
@@ -37,7 +35,7 @@ metadata {
|
|||||||
// tile definitions
|
// tile definitions
|
||||||
tiles(scale: 2) {
|
tiles(scale: 2) {
|
||||||
multiAttributeTile(name:"valve", type: "generic", width: 6, height: 4, canChangeIcon: true){
|
multiAttributeTile(name:"valve", type: "generic", width: 6, height: 4, canChangeIcon: true){
|
||||||
tileAttribute ("device.valve", key: "PRIMARY_CONTROL") {
|
tileAttribute ("device.contact", key: "PRIMARY_CONTROL") {
|
||||||
attributeState "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
attributeState "open", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC", nextState:"closing"
|
||||||
attributeState "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
attributeState "closed", label: '${name}', action: "valve.open", icon: "st.valves.water.closed", backgroundColor: "#ffffff", nextState:"opening"
|
||||||
attributeState "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC"
|
attributeState "opening", label: '${name}', action: "valve.close", icon: "st.valves.water.open", backgroundColor: "#00A0DC"
|
||||||
@@ -45,7 +43,7 @@ metadata {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
standardTile("refresh", "device.valve", width: 2, height: 2, inactiveLabel: false, decoration: "flat") {
|
standardTile("refresh", "device.contact", width: 2, height: 2, inactiveLabel: false, decoration: "flat") {
|
||||||
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
|
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,14 +53,7 @@ metadata {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def installed() {
|
|
||||||
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
|
||||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
}
|
|
||||||
|
|
||||||
def updated() {
|
def updated() {
|
||||||
// Device-Watch simply pings if no device events received for 32min(checkInterval)
|
|
||||||
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
|
|
||||||
response(refresh())
|
response(refresh())
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,13 +117,6 @@ def poll() {
|
|||||||
zwave.switchBinaryV1.switchBinaryGet().format()
|
zwave.switchBinaryV1.switchBinaryGet().format()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* PING is used by Device-Watch in attempt to reach the Device
|
|
||||||
* */
|
|
||||||
def ping() {
|
|
||||||
refresh()
|
|
||||||
}
|
|
||||||
|
|
||||||
def refresh() {
|
def refresh() {
|
||||||
log.debug "refresh() is called"
|
log.debug "refresh() is called"
|
||||||
def commands = [zwave.switchBinaryV1.switchBinaryGet().format()]
|
def commands = [zwave.switchBinaryV1.switchBinaryGet().format()]
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ def motionHandler(evt) {
|
|||||||
else {
|
else {
|
||||||
state.motionStopTime = now()
|
state.motionStopTime = now()
|
||||||
if(delayMinutes) {
|
if(delayMinutes) {
|
||||||
runIn(delayMinutes*60, turnOffMotionAfterDelay, [overwrite: true])
|
runIn(delayMinutes*60, turnOffMotionAfterDelay, [overwrite: false])
|
||||||
} else {
|
} else {
|
||||||
turnOffMotionAfterDelay()
|
turnOffMotionAfterDelay()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,19 +125,19 @@
|
|||||||
if(allOk) {
|
if(allOk) {
|
||||||
|
|
||||||
if(everyoneIsAway() && (state.sunMode == "sunrise")) {
|
if(everyoneIsAway() && (state.sunMode == "sunrise")) {
|
||||||
log.debug("Home is Empty Setting New Away Mode")
|
log.info("Home is Empty Setting New Away Mode")
|
||||||
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
||||||
runIn(delay, "setAway")
|
runIn(delay, "setAway")
|
||||||
}
|
}
|
||||||
|
|
||||||
if(everyoneIsAway() && (state.sunMode == "sunset")) {
|
if(everyoneIsAway() && (state.sunMode == "sunset")) {
|
||||||
log.debug("Home is Empty Setting New Away Mode")
|
log.info("Home is Empty Setting New Away Mode")
|
||||||
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
||||||
runIn(delay, "setAway")
|
runIn(delay, "setAway")
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
log.debug("Home is Occupied Setting New Home Mode")
|
log.info("Home is Occupied Setting New Home Mode")
|
||||||
setHome()
|
setHome()
|
||||||
|
|
||||||
|
|
||||||
@@ -152,7 +152,7 @@
|
|||||||
log.debug("Checking if everyone is away")
|
log.debug("Checking if everyone is away")
|
||||||
|
|
||||||
if(everyoneIsAway()) {
|
if(everyoneIsAway()) {
|
||||||
log.debug("Nobody is home, running away sequence")
|
log.info("Nobody is home, running away sequence")
|
||||||
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
def delay = (falseAlarmThreshold != null && falseAlarmThreshold != "") ? falseAlarmThreshold * 60 : 10 * 60
|
||||||
runIn(delay, "setAway")
|
runIn(delay, "setAway")
|
||||||
}
|
}
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
else {
|
else {
|
||||||
def lastTime = state[evt.deviceId]
|
def lastTime = state[evt.deviceId]
|
||||||
if (lastTime == null || now() - lastTime >= 1 * 60000) {
|
if (lastTime == null || now() - lastTime >= 1 * 60000) {
|
||||||
log.debug("Someone is home, running home sequence")
|
log.info("Someone is home, running home sequence")
|
||||||
setHome()
|
setHome()
|
||||||
}
|
}
|
||||||
state[evt.deviceId] = now()
|
state[evt.deviceId] = now()
|
||||||
@@ -175,14 +175,14 @@
|
|||||||
if(everyoneIsAway()) {
|
if(everyoneIsAway()) {
|
||||||
if(state.sunMode == "sunset") {
|
if(state.sunMode == "sunset") {
|
||||||
def message = "Performing \"${awayNight}\" for you as requested."
|
def message = "Performing \"${awayNight}\" for you as requested."
|
||||||
log.debug(message)
|
log.info(message)
|
||||||
sendAway(message)
|
sendAway(message)
|
||||||
location.helloHome.execute(settings.awayNight)
|
location.helloHome.execute(settings.awayNight)
|
||||||
}
|
}
|
||||||
|
|
||||||
else if(state.sunMode == "sunrise") {
|
else if(state.sunMode == "sunrise") {
|
||||||
def message = "Performing \"${awayDay}\" for you as requested."
|
def message = "Performing \"${awayDay}\" for you as requested."
|
||||||
log.debug(message)
|
log.info(message)
|
||||||
sendAway(message)
|
sendAway(message)
|
||||||
location.helloHome.execute(settings.awayDay)
|
location.helloHome.execute(settings.awayDay)
|
||||||
}
|
}
|
||||||
@@ -192,19 +192,19 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
log.debug("Somebody returned home before we set to '${newAwayMode}'")
|
log.info("Somebody returned home before we set to '${newAwayMode}'")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set home mode when house is occupied
|
//set home mode when house is occupied
|
||||||
def setHome() {
|
def setHome() {
|
||||||
sendOutOfDateNotification()
|
sendOutOfDateNotification()
|
||||||
log.debug("Setting Home Mode!!")
|
log.info("Setting Home Mode!!")
|
||||||
if(anyoneIsHome()) {
|
if(anyoneIsHome()) {
|
||||||
if(state.sunMode == "sunset"){
|
if(state.sunMode == "sunset"){
|
||||||
if (location.mode != "${homeModeNight}"){
|
if (location.mode != "${homeModeNight}"){
|
||||||
def message = "Performing \"${homeNight}\" for you as requested."
|
def message = "Performing \"${homeNight}\" for you as requested."
|
||||||
log.debug(message)
|
log.info(message)
|
||||||
sendHome(message)
|
sendHome(message)
|
||||||
location.helloHome.execute(settings.homeNight)
|
location.helloHome.execute(settings.homeNight)
|
||||||
}
|
}
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
if(state.sunMode == "sunrise"){
|
if(state.sunMode == "sunrise"){
|
||||||
if (location.mode != "${homeModeDay}"){
|
if (location.mode != "${homeModeDay}"){
|
||||||
def message = "Performing \"${homeDay}\" for you as requested."
|
def message = "Performing \"${homeDay}\" for you as requested."
|
||||||
log.debug(message)
|
log.info(message)
|
||||||
sendHome(message)
|
sendHome(message)
|
||||||
location.helloHome.execute(settings.homeDay)
|
location.helloHome.execute(settings.homeDay)
|
||||||
}
|
}
|
||||||
@@ -329,4 +329,4 @@
|
|||||||
sendNotification("Your version of Hello, Home Phrase Director is currently out of date. Please look for the new version of Hello, Home Phrase Director now called 'Routine Director' in the marketplace.")
|
sendNotification("Your version of Hello, Home Phrase Director is currently out of date. Please look for the new version of Hello, Home Phrase Director now called 'Routine Director' in the marketplace.")
|
||||||
state.lastTime = (new Date() + 31).getTime()
|
state.lastTime = (new Date() + 31).getTime()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user