Compare commits

...

29 Commits

Author SHA1 Message Date
Vinay Rao
7f3a99d889 Merge pull request #1874 from SmartThingsCommunity/staging
Rolling up staging to production
2017-04-04 13:58:28 -07:00
Vinay Rao
a397fe9fc3 Merge pull request #1873 from SmartThingsCommunity/production
Rolling down production to staging
2017-04-04 13:49:04 -07:00
Vinay Rao
f83500fbf8 Merge pull request #1872 from SmartThingsCommunity/revert-harmony
Revert "Added health-check for Logitech Harmony Hub"
2017-04-04 10:27:20 -07:00
jackchi
a297e79b0e Revert "Added health-check for Logitech Harmony Hub"
This reverts commit cbd15ae9cc.
2017-04-04 10:23:04 -07:00
Vinay Rao
69d52093dc Merge pull request #1852 from marstorp/zwaveThermostat-ICP493-fixInvalidValues
ICP-493 Thermostat Capabilities Payload Issues
2017-04-03 19:52:00 -07:00
Vinay Rao
fda743a801 Merge pull request #1870 from jackchi/revert-phase2
[CHF-571] [CHF-568] Revert untested Health Check on Keen Home EcoNet
2017-04-03 16:51:45 -07:00
Vinay Rao
f7a5ea4820 Merge pull request #1868 from bflorian/DVCSMP-2399-zooz-zen20-staging
DVCSMP Check for null device and send refresh() from configure()
2017-04-03 16:48:44 -07:00
jackchi
d51ec9e518 [CHF-571] [CHF-568] Revert untested Health Check on Keen Home & EcoNet Vents 2017-04-03 16:47:15 -07:00
Vinay Rao
ae41b4adbe Merge pull request #1867 from workingmonk/bug/name_fix
DVCSMP-2523 Removing generation name from model name
2017-04-03 15:42:27 -07:00
Bob Florian
bdcaf175f0 Check for null device and send refresh() from configure() 2017-04-03 15:39:48 -07:00
Vinay Rao
ba10869dd5 removing generation name from model name 2017-04-03 15:00:41 -07:00
Vinay Rao
6f411e1a3e Merge pull request #1866 from marstorp/ecobee3-EmergencyHeatFix
ICP-448 Thermostat resource works weirdly.
2017-04-03 14:07:49 -07:00
marstorp
4cc41d9d9b ICP-448 Thermostat resource works weirdly.
Fixing change of auxHeatOnly to emergency heat.
Also adding main tile icon so Things view doesn’t show a grey blob
2017-04-03 13:59:47 -07:00
Vinay Rao
66875170f4 Merge pull request #1850 from parijatdas/everspring
[CHF-559] Health Check everspring-flood-sensor
2017-04-03 09:49:49 -07:00
Vinay Rao
9e80a188df Merge pull request #1851 from parijatdas/fibaro_door_window_sensor_zw5
[CHF-582] Health Check fibaro-door-window-sensor-zw5
2017-04-03 09:48:43 -07:00
Vinay Rao
ce10bcf2cd Merge pull request #1862 from juano2310/CP-381
HOTFIX - ICP-381
2017-03-31 13:55:41 -07:00
juano2310
0c8de4402b HOTFIX - ICP-381
CP-381 -  OCF device type

Remove space

DVCSMP-2523

Revert DVCSMP-2523

spaces
2017-03-31 16:53:04 -04:00
Juan Pablo Risso
a112d4b00e ICP-381 - Add ocfDeviceType to switch devices (#1856) 2017-03-31 11:05:26 -07:00
Jack Chi
fe887121d3 [CHF-568] Remove Keen Smart Home Vent fingerprint (#1859) 2017-03-30 15:49:28 -07:00
Vinay Rao
7375abf9c0 Merge pull request #1848 from jackchi/staging
[DVCSMP-2451] Fix Fibaro-flood-sensor-zw5 dry/wet state
2017-03-30 15:12:45 -07:00
marstorp
e985f38cf4 ICP-493 Thermostat Capabilities Payload Issues
thermostatFanMode reports "fanAuto", but "fanAuto" is not listed in the supported modes

Changing capability attributes to follow specified values.
Also adding icons/removing configure tile to realigning with other thermostats,
adding poll of device data in configure() to allow for faster initialization of device data.
2017-03-29 17:45:01 -07:00
Vinay Rao
a79e0f70fd Merge pull request #1846 from marstorp/ecobee3-ICP429-fixnotSetUnknownValues
ICP-448 Thermostat resource works weirdly.
2017-03-29 14:44:42 -07:00
Parijat Das
f26b9ce6b2 Added health-check for Fibaro Door Window Sensor ZW5 2017-03-29 14:41:43 -07:00
Parijat Das
ac4c353287 Added health-check for Everspring Flood Sensor 2017-03-29 10:43:02 -07:00
jackchi
ed40ca7017 [DVCSMP-2451] Fix Fibaro-flood-sensor-zw5 dry/wet state 2017-03-28 23:34:38 -07:00
marstorp
7aa8be4322 ICP-448 Thermostat resource works weirdly.
Mapping between ST and SC fails at times due to improper implementation of capability attributes.
Some violates the attribute types, others are not initialized to a valid value, most due to not having one.
However, mapping requires right type and values.
This PR fixes Ecobee thermostats attributes.
2017-03-28 16:14:49 -07:00
Vinay Rao
23a0b26cb9 Merge pull request #1845 from SmartThingsCommunity/master
Rolling up master to staging
2017-03-28 14:15:25 -07:00
Vinay Rao
9f944df598 Merge pull request #1842 from SmartThingsCommunity/staging
Rolling up staging to production
2017-03-28 13:48:28 -07:00
Vinay Rao
a06dba0b90 Merge pull request #1807 from SmartThingsCommunity/staging
Rolling up staging to production for release
2017-03-21 11:37:47 -07:00
24 changed files with 217 additions and 103 deletions

View File

@@ -0,0 +1,2 @@
.st-ignore
README.md

View File

@@ -0,0 +1,41 @@
# Fibaro Door Window Sensor ZW5
Cloud Execution
Works with:
* [Fibaro Door/Window Sensor ZW5](https://www.smartthings.com/works-with-smartthings/sensors/fibaro-doorwindow-sensor)
## Table of contents
* [Capabilities](#capabilities)
* [Health](#device-health)
* [Battery](#battery-specification)
* [Troubleshooting](#troubleshooting)
## Capabilities
* **Battery** - defines device uses a battery
* **Contact Sensor** - can detect contact (possible values: open,closed)
* **Sensor** - detects sensor events
* **Tamper Alert** - detects tampers
* **Configuration** - _configure()_ command called when device is installed or device preferences updated
* **Health Check** - indicates ability to get device health notifications
## Device Health
Fibaro Door/Window Sensor ZW5 is a Z-wave sleepy device and wakes up every 4 hours.
Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins.
* __482min__ checkInterval
## Battery Specification
One 1/2AA 3.6V battery is required.
## 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:
* [Fibaro Door/Window Sensor ZW5 Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/204075194-Fibaro-Door-Window-Sensor)

View File

@@ -20,6 +20,7 @@ metadata {
capability "Sensor" capability "Sensor"
capability "Configuration" capability "Configuration"
capability "Tamper Alert" capability "Tamper Alert"
capability "Health Check"
fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x86, 0x84", outClusters: "" fingerprint deviceId: "0x0701", inClusters: "0x5E, 0x85, 0x59, 0x22, 0x20, 0x80, 0x70, 0x56, 0x5A, 0x7A, 0x72, 0x8E, 0x71, 0x73, 0x98, 0x2B, 0x9C, 0x30, 0x86, 0x84", outClusters: ""
} }
@@ -199,7 +200,9 @@ def zwaveEvent(physicalgraph.zwave.commands.deviceresetlocallyv1.DeviceResetLoca
def configure() { def configure() {
log.debug "Executing 'configure'" log.debug "Executing 'configure'"
// Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline
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

View File

@@ -34,13 +34,13 @@ metadata {
tiles(scale: 2) { tiles(scale: 2) {
multiAttributeTile(name:"FGFS", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app multiAttributeTile(name:"FGFS", type:"lighting", width:6, height:4) {//with generic type secondary control text is not displayed in Android app
tileAttribute("device.water", key:"PRIMARY_CONTROL") { tileAttribute("device.water", key:"PRIMARY_CONTROL") {
attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#00a0dc") attributeState("dry", icon:"st.alarm.water.dry", backgroundColor:"#ffffff")
attributeState("wet", icon:"st.alarm.water.wet", backgroundColor:"#e86d13") 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:"#00a0dc") attributeState("active", label:'tamper active', backgroundColor:"#cccccc")
attributeState("inactive", label:'tamper inactive', backgroundColor:"#cccccc") attributeState("inactive", label:'tamper inactive', backgroundColor:"#00A0DC")
} }
} }

View File

@@ -11,7 +11,7 @@ metadata {
capability "Sensor" capability "Sensor"
capability "Temperature Measurement" capability "Temperature Measurement"
capability "Battery" capability "Battery"
capability "Health Check" // capability "Health Check"
command "getLevel" command "getLevel"
command "getOnOff" command "getOnOff"
@@ -22,7 +22,6 @@ metadata {
command "clearObstruction" command "clearObstruction"
fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019" fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019"
fingerprint endpoint: "1", profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0006,0008,0020,0402,0403,0B05,FC01,FC02", outClusters: "0019", manufacturer: "Keen Home Inc", model: "SV01-410-DV-1.0", deviceJoinName: "Keen Home Smart Vent"
} }
// simulator metadata // simulator metadata
@@ -477,7 +476,7 @@ def configure() {
// Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time) // Device-Watch allows 2 check-in misses from device + ping (plus 1 min lag time)
// enrolls with default periodic reporting until newer 5 min interval is confirmed // enrolls with default periodic reporting until newer 5 min interval is confirmed
sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID]) // sendEvent(name: "checkInterval", value: 2 * 10 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
// get ZigBee ID by hidden tile because that's the only way we can do it // get ZigBee ID by hidden tile because that's the only way we can do it
setZigBeeIdTile() setZigBeeIdTile()

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings") { definition (name: "Dimmer Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Switch Level" capability "Switch Level"
capability "Actuator" capability "Actuator"
capability "Indicator" capability "Indicator"

View File

@@ -32,7 +32,7 @@ metadata {
command "switchMode" command "switchMode"
command "switchFanMode" command "switchFanMode"
attribute "thermostatSetpoint", "number" attribute "displayThermostatSetpoint", "string" // Added to be able to show "Auto"/"Off" keeping attribute thermostatSetpoint a number
attribute "thermostatStatus", "string" attribute "thermostatStatus", "string"
attribute "maxHeatingSetpoint", "number" attribute "maxHeatingSetpoint", "number"
attribute "minHeatingSetpoint", "number" attribute "minHeatingSetpoint", "number"
@@ -43,8 +43,8 @@ metadata {
} }
tiles { tiles {
valueTile("temperature", "device.temperature", width: 2, height: 2) { standardTile("temperature", "device.temperature", width: 2, height: 2, decoration: "flat") {
state("temperature", label:'${currentValue}°', unit:"F", state("temperature", label:'${currentValue}°', unit:"F", icon: "st.thermostat.ac.air-conditioning",
backgroundColors:[ backgroundColors:[
// Celsius // Celsius
[value: 0, color: "#153591"], [value: 0, color: "#153591"],
@@ -70,7 +70,7 @@ metadata {
state "heat", action:"switchMode", nextState: "updating", icon: "st.thermostat.heat" state "heat", action:"switchMode", nextState: "updating", icon: "st.thermostat.heat"
state "cool", action:"switchMode", nextState: "updating", icon: "st.thermostat.cool" state "cool", action:"switchMode", nextState: "updating", icon: "st.thermostat.cool"
state "auto", action:"switchMode", nextState: "updating", icon: "st.thermostat.auto" state "auto", action:"switchMode", nextState: "updating", icon: "st.thermostat.auto"
state "auxHeatOnly", action:"switchMode", icon: "st.thermostat.emergency-heat" state "emergency heat", action:"switchMode", icon: "st.thermostat.emergency-heat" // emergency heat = auxHeatOnly
state "updating", label:"Working", icon: "st.secondary.secondary" state "updating", label:"Working", icon: "st.secondary.secondary"
} }
standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") {
@@ -81,8 +81,8 @@ metadata {
standardTile("upButtonControl", "device.thermostatSetpoint", inactiveLabel: false, decoration: "flat") { standardTile("upButtonControl", "device.thermostatSetpoint", inactiveLabel: false, decoration: "flat") {
state "setpoint", action:"raiseSetpoint", icon:"st.thermostat.thermostat-up" state "setpoint", action:"raiseSetpoint", icon:"st.thermostat.thermostat-up"
} }
valueTile("thermostatSetpoint", "device.thermostatSetpoint", width: 1, height: 1, decoration: "flat") { valueTile("displayThermostatSetpoint", "device.displayThermostatSetpoint", width: 1, height: 1, decoration: "flat") {
state "thermostatSetpoint", label:'${currentValue}' state "displayThermostatSetpoint", label:'${currentValue}'
} }
valueTile("currentStatus", "device.thermostatStatus", height: 1, width: 2, decoration: "flat") { valueTile("currentStatus", "device.thermostatStatus", height: 1, width: 2, decoration: "flat") {
state "thermostatStatus", label:'${currentValue}', backgroundColor:"#ffffff" state "thermostatStatus", label:'${currentValue}', backgroundColor:"#ffffff"
@@ -113,7 +113,7 @@ metadata {
state "humidity", label:'${currentValue}%' state "humidity", label:'${currentValue}%'
} }
main "temperature" main "temperature"
details(["temperature", "upButtonControl", "thermostatSetpoint", "currentStatus", "downButtonControl", "mode", "fanMode","humidity", "resumeProgram", "refresh"]) details(["temperature", "upButtonControl", "displayThermostatSetpoint", "currentStatus", "downButtonControl", "mode", "fanMode","humidity", "resumeProgram", "refresh"])
} }
preferences { preferences {
@@ -185,6 +185,11 @@ def generateEvent(Map results) {
isChange = isStateChange(device, name, value.toString()) isChange = isStateChange(device, name, value.toString())
event['isStateChange'] = isChange event['isStateChange'] = isChange
event['displayed'] = false event['displayed'] = false
} else if (name == "thermostatMode") {
def mode = value.toString()
mode = (mode == "auxHeatOnly") ? "emergency heat" : mode
isChange = isStateChange(device, name, mode)
event << [value: mode, isStateChange: isChange, displayed: isDisplayed]
} else { } else {
isChange = isStateChange(device, name, value.toString()) isChange = isStateChange(device, name, value.toString())
isDisplayed = isChange isDisplayed = isChange
@@ -452,10 +457,10 @@ def emergencyHeat() {
} }
def auxHeatOnly() { def auxHeatOnly() {
log.debug "auxHeatOnly" log.debug "auxHeatOnly = emergency heat"
def deviceId = device.deviceNetworkId.split(/\./).last() def deviceId = device.deviceNetworkId.split(/\./).last()
if (parent.setMode ("auxHeatOnly", deviceId)) if (parent.setMode ("auxHeatOnly", deviceId))
generateModeEvent("auxHeatOnly") generateModeEvent("emergency heat") // emergency heat = auxHeatOnly
else { else {
log.debug "Error setting new mode." log.debug "Error setting new mode."
def currentMode = device.currentState("thermostatMode")?.value def currentMode = device.currentState("thermostatMode")?.value
@@ -574,17 +579,23 @@ def generateSetpointEvent() {
sendEvent("name":"heatingSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) sendEvent("name":"heatingSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale)
sendEvent("name":"coolingSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale) sendEvent("name":"coolingSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale)
def averageSetpoint = roundC((heatingSetpoint + coolingSetpoint) / 2)
if (mode == "heat") { if (mode == "heat") {
sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale)
sendEvent("name":"displayThermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale, displayed: false)
} }
else if (mode == "cool") { else if (mode == "cool") {
sendEvent("name":"thermostatSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale) sendEvent("name":"thermostatSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale)
sendEvent("name":"displayThermostatSetpoint", "value":coolingSetpoint, "unit":location.temperatureScale, displayed: false)
} else if (mode == "auto") { } else if (mode == "auto") {
sendEvent("name":"thermostatSetpoint", "value":"Auto") sendEvent("name":"thermostatSetpoint", "value":averageSetpoint, "unit":location.temperatureScale)
sendEvent("name":"displayThermostatSetpoint", "value":"Auto", displayed: false)
} else if (mode == "off") { } else if (mode == "off") {
sendEvent("name":"thermostatSetpoint", "value":"Off") sendEvent("name":"thermostatSetpoint", "value":averageSetpoint, "unit":location.temperatureScale)
} else if (mode == "auxHeatOnly") { sendEvent("name":"displayThermostatSetpoint", "value":"Off", displayed: false)
} else if (mode == "emergency heat") { // emergency heat = auxHeatOnly
sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale) sendEvent("name":"thermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale)
sendEvent("name":"displayThermostatSetpoint", "value":heatingSetpoint, "unit":location.temperatureScale, displayed: false)
} }
} }
@@ -621,13 +632,14 @@ void raiseSetpoint() {
targetvalue = thermostatSetpoint ? thermostatSetpoint : 0 targetvalue = thermostatSetpoint ? thermostatSetpoint : 0
targetvalue = location.temperatureScale == "F"? targetvalue + 1 : targetvalue + 0.5 targetvalue = location.temperatureScale == "F"? targetvalue + 1 : targetvalue + 0.5
if ((mode == "heat" || mode == "auxHeatOnly") && targetvalue > maxHeatingSetpoint) { if ((mode == "heat" || mode == "emergency heat") && targetvalue > maxHeatingSetpoint) { // emergency heat = auxHeatOnly
targetvalue = maxHeatingSetpoint targetvalue = maxHeatingSetpoint
} else if (mode == "cool" && targetvalue > maxCoolingSetpoint) { } else if (mode == "cool" && targetvalue > maxCoolingSetpoint) {
targetvalue = maxCoolingSetpoint targetvalue = maxCoolingSetpoint
} }
sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false)
sendEvent("name":"displayThermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false)
log.info "In mode $mode raiseSetpoint() to $targetvalue" log.info "In mode $mode raiseSetpoint() to $targetvalue"
runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite
@@ -666,13 +678,14 @@ void lowerSetpoint() {
targetvalue = thermostatSetpoint ? thermostatSetpoint : 0 targetvalue = thermostatSetpoint ? thermostatSetpoint : 0
targetvalue = location.temperatureScale == "F"? targetvalue - 1 : targetvalue - 0.5 targetvalue = location.temperatureScale == "F"? targetvalue - 1 : targetvalue - 0.5
if ((mode == "heat" || mode == "auxHeatOnly") && targetvalue < minHeatingSetpoint) { if ((mode == "heat" || mode == "emergency heat") && targetvalue < minHeatingSetpoint) { // emergency heat = auxHeatOnly
targetvalue = minHeatingSetpoint targetvalue = minHeatingSetpoint
} else if (mode == "cool" && targetvalue < minCoolingSetpoint) { } else if (mode == "cool" && targetvalue < minCoolingSetpoint) {
targetvalue = minCoolingSetpoint targetvalue = minCoolingSetpoint
} }
sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false) sendEvent("name":"thermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false)
sendEvent("name":"displayThermostatSetpoint", "value":targetvalue, "unit":location.temperatureScale, displayed: false)
log.info "In mode $mode lowerSetpoint() to $targetvalue" log.info "In mode $mode lowerSetpoint() to $targetvalue"
runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite runIn(3, "alterSetpoint", [data: [value:targetvalue], overwrite: true]) //when user click button this runIn will be overwrite
@@ -706,7 +719,7 @@ void alterSetpoint(temp) {
} }
//step1: check thermostatMode, enforce limits before sending request to cloud //step1: check thermostatMode, enforce limits before sending request to cloud
if (mode == "heat" || mode == "auxHeatOnly"){ if (mode == "heat" || mode == "emergency heat"){ // emergency heat = auxHeatOnly
if (temp.value > coolingSetpoint){ if (temp.value > coolingSetpoint){
targetHeatingSetpoint = temp.value targetHeatingSetpoint = temp.value
targetCoolingSetpoint = temp.value targetCoolingSetpoint = temp.value
@@ -735,15 +748,18 @@ void alterSetpoint(temp) {
if (parent.setHold(heatingValue, coolingValue, deviceId, sendHoldType)) { if (parent.setHold(heatingValue, coolingValue, deviceId, sendHoldType)) {
sendEvent("name": "thermostatSetpoint", "value": temp.value, displayed: false) sendEvent("name": "thermostatSetpoint", "value": temp.value, displayed: false)
sendEvent("name": "displayThermostatSetpoint", "value": temp.value, displayed: false)
sendEvent("name": "heatingSetpoint", "value": targetHeatingSetpoint, "unit": location.temperatureScale) sendEvent("name": "heatingSetpoint", "value": targetHeatingSetpoint, "unit": location.temperatureScale)
sendEvent("name": "coolingSetpoint", "value": targetCoolingSetpoint, "unit": location.temperatureScale) sendEvent("name": "coolingSetpoint", "value": targetCoolingSetpoint, "unit": location.temperatureScale)
log.debug "alterSetpoint in mode $mode succeed change setpoint to= ${temp.value}" log.debug "alterSetpoint in mode $mode succeed change setpoint to= ${temp.value}"
} else { } else {
log.error "Error alterSetpoint()" log.error "Error alterSetpoint()"
if (mode == "heat" || mode == "auxHeatOnly"){ if (mode == "heat" || mode == "emergency heat"){ // emergency heat = auxHeatOnly
sendEvent("name": "thermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false) sendEvent("name": "thermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false)
sendEvent("name": "displayThermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false)
} else if (mode == "cool") { } else if (mode == "cool") {
sendEvent("name": "thermostatSetpoint", "value": coolingSetpoint.toString(), displayed: false) sendEvent("name": "thermostatSetpoint", "value": coolingSetpoint.toString(), displayed: false)
sendEvent("name": "displayThermostatSetpoint", "value": heatingSetpoint.toString(), displayed: false)
} }
} }
@@ -759,6 +775,7 @@ def generateStatusEvent() {
def coolingSetpoint = device.currentValue("coolingSetpoint") def coolingSetpoint = device.currentValue("coolingSetpoint")
def temperature = device.currentValue("temperature") def temperature = device.currentValue("temperature")
def statusText def statusText
def operatingState = "idle"
log.debug "Generate Status Event for Mode = ${mode}" log.debug "Generate Status Event for Mode = ${mode}"
log.debug "Temperature = ${temperature}" log.debug "Temperature = ${temperature}"
@@ -767,20 +784,29 @@ def generateStatusEvent() {
log.debug "HVAC Mode = ${mode}" log.debug "HVAC Mode = ${mode}"
if (mode == "heat") { if (mode == "heat") {
if (temperature >= heatingSetpoint) if (temperature >= heatingSetpoint) {
statusText = "Right Now: Idle" statusText = "Right Now: Idle"
else } else {
statusText = "Heating to ${heatingSetpoint} ${location.temperatureScale}" statusText = "Heating to ${heatingSetpoint} ${location.temperatureScale}"
operatingState = "heating"
}
} else if (mode == "cool") { } else if (mode == "cool") {
if (temperature <= coolingSetpoint) if (temperature <= coolingSetpoint) {
statusText = "Right Now: Idle" statusText = "Right Now: Idle"
else } else {
statusText = "Cooling to ${coolingSetpoint} ${location.temperatureScale}" statusText = "Cooling to ${coolingSetpoint} ${location.temperatureScale}"
operatingState = "cooling"
}
} else if (mode == "auto") { } else if (mode == "auto") {
statusText = "Right Now: Auto" statusText = "Right Now: Auto"
if (temperature < heatingSetpoint) {
operatingState = "heating"
} else if (temperature > coolingSetpoint) {
operatingState = "cooling"
}
} else if (mode == "off") { } else if (mode == "off") {
statusText = "Right Now: Off" statusText = "Right Now: Off"
} else if (mode == "auxHeatOnly") { } else if (mode == "emergency heat") { // emergency heat = auxHeatOnly
statusText = "Emergency Heat" statusText = "Emergency Heat"
} else { } else {
statusText = "?" statusText = "?"
@@ -788,6 +814,7 @@ def generateStatusEvent() {
log.debug "Generate Status Event = ${statusText}" log.debug "Generate Status Event = ${statusText}"
sendEvent("name":"thermostatStatus", "value":statusText, "description":statusText, displayed: true) sendEvent("name":"thermostatStatus", "value":statusText, "description":statusText, displayed: true)
sendEvent("name":"thermostatOperatingState", "value":operatingState, "description":operatingState, displayed: false)
} }
def generateActivityFeedsEvent(notificationMessage) { def generateActivityFeedsEvent(notificationMessage) {

View File

@@ -26,13 +26,13 @@ metadata {
capability "Sensor" capability "Sensor"
capability "Polling" capability "Polling"
capability "Configuration" capability "Configuration"
capability "Health Check" // capability "Health Check"
command "open" command "open"
command "close" command "close"
fingerprint deviceId: "0x1100", inClusters: "0x26,0x72,0x86,0x77,0x80,0x20" fingerprint deviceId: "0x1100", inClusters: "0x26,0x72,0x86,0x77,0x80,0x20"
fingerprint mfr:"0157", prod:"0100", model:"0100", deviceJoinName: "EcoNet Controls Z-Wave Vent" // fingerprint mfr:"0157", prod:"0100", model:"0100", deviceJoinName: "EcoNet Controls Z-Wave Vent"
} }
simulator { simulator {
@@ -88,7 +88,7 @@ def parse(String description) {
//send the command to stop polling //send the command to stop polling
def updated() { def updated() {
// Device-Watch simply pings if no device events received for 32min(checkInterval) // 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]) // sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
response("poll stop") response("poll stop")
} }

View File

@@ -0,0 +1,2 @@
.st-ignore
README.md

View File

@@ -0,0 +1,40 @@
# Everspring Flood Sensor
Cloud Execution
Works with:
* [Everspring Water Detector](https://www.smartthings.com/works-with-smartthings/sensors/everspring-water-detector)
## Table of contents
* [Capabilities](#capabilities)
* [Health](#device-health)
* [Battery](#battery-specification)
* [Troubleshooting](#troubleshooting)
## Capabilities
* **Water Sensor** - can detect presence of water (dry or wet)
* **Configuration** - _configure()_ command called when device is installed or device preferences updated
* **Sensor** - detects sensor events
* **Battery** - defines device uses a battery
* **Health Check** - indicates ability to get device health notifications
## Device Health
Everspring Water Detector is a Z-wave sleepy device and wakes up every 4 hours.
Device-Watch allows 2 check-in misses from device plus some lag time. So Check-in interval = (2*4*60 + 2)mins = 482 mins.
* __482min__ checkInterval
## Battery Specification
Three AA 1.5V batteries are required.
## 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:
* [Everspring Water Detector Troubleshooting Tips](https://support.smartthings.com/hc/en-us/articles/202088304-Everspring-Water-Detector)

View File

@@ -17,6 +17,7 @@ metadata {
capability "Configuration" capability "Configuration"
capability "Sensor" capability "Sensor"
capability "Battery" capability "Battery"
capability "Health Check"
fingerprint deviceId: "0xA102", inClusters: "0x86,0x72,0x85,0x84,0x80,0x70,0x9C,0x20,0x71" fingerprint deviceId: "0xA102", inClusters: "0x86,0x72,0x85,0x84,0x80,0x70,0x9C,0x20,0x71"
} }
@@ -138,6 +139,8 @@ def zwaveEvent(physicalgraph.zwave.Command cmd)
def configure() def configure()
{ {
// Device wakes up every 4 hours, this interval allows us to miss one wakeup notification before marking offline
sendEvent(name: "checkInterval", value: 8 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
if (!device.currentState("battery")) { if (!device.currentState("battery")) {
sendEvent(name: "battery", value:100, unit:"%", descriptionText:"(Default battery event)", displayed:false) sendEvent(name: "battery", value:100, unit:"%", descriptionText:"(Default battery event)", displayed:false)
} }

View File

@@ -7,7 +7,6 @@ metadata {
definition (name: "Logitech Harmony Hub C2C", namespace: "smartthings", author: "SmartThings") { definition (name: "Logitech Harmony Hub C2C", namespace: "smartthings", author: "SmartThings") {
capability "Media Controller" capability "Media Controller"
capability "Refresh" capability "Refresh"
capability "Health Check"
command "activityoff" command "activityoff"
command "alloff" command "alloff"
@@ -39,16 +38,6 @@ metadata {
} }
} }
def installed() {
log.debug "installed()"
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false)
}
def updated() {
log.debug "updated()"
sendEvent(name: "DeviceWatch-Enroll", value: JsonOutput.toJson([protocol: "cloud", scheme:"untracked"]), displayed: false)
}
def startActivity(String activityId) { def startActivity(String activityId) {
log.debug "Executing 'Start Activity'" log.debug "Executing 'Start Activity'"
log.trace parent.activity("$device.deviceNetworkId-$activityId","start") log.trace parent.activity("$device.deviceNetworkId-$activityId","start")
@@ -69,10 +58,6 @@ def poll() {
log.trace parent.poll() log.trace parent.poll()
} }
def ping() {
refresh()
}
def refresh() { def refresh() {
log.debug "Executing 'Refresh'" log.debug "Executing 'Refresh'"
log.trace parent.poll() log.trace parent.poll()

View File

@@ -18,7 +18,7 @@
metadata { metadata {
definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings") { definition (name: "Wemo Light Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Actuator" capability "Actuator"
capability "Switch" capability "Switch"
capability "Polling" capability "Polling"

View File

@@ -16,7 +16,7 @@
* Date: 2015-10-11 * Date: 2015-10-11
*/ */
metadata { metadata {
definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings") { definition (name: "Wemo Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.smartplug") {
capability "Actuator" capability "Actuator"
capability "Switch" capability "Switch"
capability "Polling" capability "Polling"

View File

@@ -13,7 +13,7 @@
*/ */
metadata { metadata {
definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings") { definition (name: "ZigBee Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Actuator" capability "Actuator"
capability "Configuration" capability "Configuration"
capability "Refresh" capability "Refresh"

View File

@@ -25,6 +25,7 @@ metadata {
capability "Refresh" capability "Refresh"
capability "Actuator" capability "Actuator"
capability "Sensor" capability "Sensor"
capability "Configuration"
fingerprint manufacturer: "015D", prod: "0651", model: "F51C", deviceJoinName: "Zooz ZEN 20 Power Strip" fingerprint manufacturer: "015D", prod: "0651", model: "F51C", deviceJoinName: "Zooz ZEN 20 Power Strip"
} }
@@ -65,6 +66,10 @@ def updated() {
} }
} }
def configure() {
refresh()
}
////////////////////// //////////////////////
// Event Generation // // Event Generation //
@@ -107,15 +112,17 @@ def zwaveBinaryEvent(cmd, endpoint) {
def result = [] def result = []
def children = childDevices def children = childDevices
def childDevice = children.find{it.deviceNetworkId.endsWith("$endpoint")} def childDevice = children.find{it.deviceNetworkId.endsWith("$endpoint")}
childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off") if (childDevice) {
childDevice.sendEvent(name: "switch", value: cmd.value ? "on" : "off")
if (cmd.value) { if (cmd.value) {
// One on and the strip is on // One on and the strip is on
result << createEvent(name: "switch", value: "on") result << createEvent(name: "switch", value: "on")
} else { } else {
// All off and the strip is off // All off and the strip is off
if (! children.any { it.currentValue("switch") == "on" }) { if (!children.any { it.currentValue("switch") == "on" }) {
result << createEvent(name: "switch", value: "off") result << createEvent(name: "switch", value: "off")
}
} }
} }
result result

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Dimmer Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Switch Level" capability "Switch Level"
capability "Actuator" capability "Actuator"
capability "Health Check" capability "Health Check"

View File

@@ -16,7 +16,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Metering Dimmer", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Switch" capability "Switch"
capability "Polling" capability "Polling"
capability "Power Meter" capability "Power Meter"

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Metering Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Energy Meter" capability "Energy Meter"
capability "Actuator" capability "Actuator"
capability "Switch" capability "Switch"
@@ -27,7 +27,7 @@ metadata {
command "reset" command "reset"
fingerprint inClusters: "0x25,0x32" fingerprint inClusters: "0x25,0x32"
fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch 2E" fingerprint mfr:"0086", prod:"0003", model:"0012", deviceJoinName: "Aeon Labs Micro Smart Switch"
} }
// simulator metadata // simulator metadata
@@ -86,7 +86,7 @@ def updated() {
def parse(String description) { def parse(String description) {
def result = null def result = null
if(description == "updated") return if(description == "updated") return
def cmd = zwave.parse(description, [0x20: 1, 0x32: 1, 0x72: 2]) def cmd = zwave.parse(description, [0x20: 1, 0x32: 1, 0x72: 2])
if (cmd) { if (cmd) {
result = zwaveEvent(cmd) result = zwaveEvent(cmd)

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Switch Generic", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Actuator" capability "Actuator"
capability "Health Check" capability "Health Check"
capability "Switch" capability "Switch"

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Switch Secure", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Switch" capability "Switch"
capability "Refresh" capability "Refresh"
capability "Polling" capability "Polling"

View File

@@ -12,7 +12,7 @@
* *
*/ */
metadata { metadata {
definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings") { definition (name: "Z-Wave Switch", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.switch") {
capability "Actuator" capability "Actuator"
capability "Indicator" capability "Indicator"
capability "Switch" capability "Switch"

View File

@@ -42,9 +42,9 @@ metadata {
status "auto" : "command: 4003, payload: 03" status "auto" : "command: 4003, payload: 03"
status "emergencyHeat" : "command: 4003, payload: 04" status "emergencyHeat" : "command: 4003, payload: 04"
status "fanAuto" : "command: 4403, payload: 00" status "auto" : "command: 4403, payload: 00" // "fanAuto"
status "fanOn" : "command: 4403, payload: 01" status "on" : "command: 4403, payload: 01" // "fanOn"
status "fanCirculate" : "command: 4403, payload: 06" status "circulate" : "command: 4403, payload: 06" // "fanCirculate
status "heat 60" : "command: 4303, payload: 01 09 3C" status "heat 60" : "command: 4303, payload: 01 09 3C"
status "heat 68" : "command: 4303, payload: 01 09 44" status "heat 68" : "command: 4303, payload: 01 09 44"
@@ -74,8 +74,9 @@ metadata {
} }
tiles { tiles {
valueTile("temperature", "device.temperature", width: 2, height: 2) { // Using standardTile instead of valueTile as it renders the icon better
state("temperature", label:'${currentValue}°', standardTile("temperature", "device.temperature", width: 2, height: 2) {
state("temperature", label:'${currentValue}°', icon: "st.thermostat.ac.air-conditioning",
backgroundColors:[ backgroundColors:[
[value: 31, color: "#153591"], [value: 31, color: "#153591"],
[value: 44, color: "#1e9cbb"], [value: 44, color: "#1e9cbb"],
@@ -88,19 +89,20 @@ metadata {
) )
} }
standardTile("mode", "device.thermostatMode", inactiveLabel: false, decoration: "flat") { standardTile("mode", "device.thermostatMode", inactiveLabel: false, decoration: "flat") {
state "off", label:'${name}', action:"switchMode", nextState:"to_heat" state "off", action:"switchMode", nextState:"to_heat", icon: "st.thermostat.heating-cooling-off"
state "heat", label:'${name}', action:"switchMode", nextState:"to_cool" state "heat", action:"switchMode", nextState:"to_cool", icon: "st.thermostat.heat"
state "cool", label:'${name}', action:"switchMode", nextState:"..." state "cool", action:"switchMode", nextState:"...", icon: "st.thermostat.cool"
state "auto", label:'${name}', action:"switchMode", nextState:"..." state "auto", action:"switchMode", nextState:"...", icon: "st.thermostat.auto"
state "emergency heat", label:'${name}', action:"switchMode", nextState:"..." state "emergency heat", action:"switchMode", nextState:"...", icon: "st.thermostat.emergency-heat"
state "to_heat", label: "heat", action:"switchMode", nextState:"to_cool" state "to_heat", action:"switchMode", nextState:"to_cool", icon: "st.thermostat.heat"
state "to_cool", label: "cool", action:"switchMode", nextState:"..." state "to_cool", action:"switchMode", nextState:"...", icon: "st.thermostat.cool"
state "...", label: "...", action:"off", nextState:"off" state "...", label: "...", action:"off", nextState:"off"
} }
standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") { standardTile("fanMode", "device.thermostatFanMode", inactiveLabel: false, decoration: "flat") {
state "fanAuto", label:'${name}', action:"switchFanMode" state "auto", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-auto" // "fanAuto"
state "fanOn", label:'${name}', action:"switchFanMode" state "on", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-on" // "fanOn"
state "fanCirculate", label:'${name}', action:"switchFanMode" state "circulate", action:"switchFanMode", nextState:"...", icon: "st.thermostat.fan-circulate" // "fanCirculate"
state "...", label: "...", nextState:"..."
} }
controlTile("heatSliderControl", "device.heatingSetpoint", "slider", height: 1, width: 2, inactiveLabel: false) { controlTile("heatSliderControl", "device.heatingSetpoint", "slider", height: 1, width: 2, inactiveLabel: false) {
state "setHeatingSetpoint", action:"quickSetHeat", backgroundColor:"#d04e00" state "setHeatingSetpoint", action:"quickSetHeat", backgroundColor:"#d04e00"
@@ -117,11 +119,8 @@ metadata {
standardTile("refresh", "device.thermostatMode", inactiveLabel: false, decoration: "flat") { standardTile("refresh", "device.thermostatMode", inactiveLabel: false, decoration: "flat") {
state "default", action:"polling.poll", icon:"st.secondary.refresh" state "default", action:"polling.poll", icon:"st.secondary.refresh"
} }
standardTile("configure", "device.configure", inactiveLabel: false, decoration: "flat") {
state "configure", label:'', action:"configuration.configure", icon:"st.secondary.configure"
}
main "temperature" main "temperature"
details(["temperature", "mode", "fanMode", "heatSliderControl", "heatingSetpoint", "coolSliderControl", "coolingSetpoint", "refresh", "configure"]) details(["temperature", "mode", "fanMode", "heatSliderControl", "heatingSetpoint", "coolSliderControl", "coolingSetpoint", "refresh"])
} }
} }
@@ -286,13 +285,13 @@ def zwaveEvent(physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanMod
def map = [:] def map = [:]
switch (cmd.fanMode) { switch (cmd.fanMode) {
case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_AUTO_LOW: case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_AUTO_LOW:
map.value = "fanAuto" map.value = "auto" // "fanAuto"
break break
case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_LOW: case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_LOW:
map.value = "fanOn" map.value = "on" // "fanOn"
break break
case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_CIRCULATION: case physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeReport.FAN_MODE_CIRCULATION:
map.value = "fanCirculate" map.value = "circulate" // "fanCirculate"
break break
} }
map.name = "thermostatFanMode" map.name = "thermostatFanMode"
@@ -309,15 +308,19 @@ def zwaveEvent(physicalgraph.zwave.commands.thermostatmodev2.ThermostatModeSuppo
if(cmd.auto) { supportedModes += "auto " } if(cmd.auto) { supportedModes += "auto " }
state.supportedModes = supportedModes state.supportedModes = supportedModes
// No events to be generated, return empty map
return [:]
} }
def zwaveEvent(physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeSupportedReport cmd) { def zwaveEvent(physicalgraph.zwave.commands.thermostatfanmodev3.ThermostatFanModeSupportedReport cmd) {
def supportedFanModes = "" def supportedFanModes = ""
if(cmd.auto) { supportedFanModes += "fanAuto " } if(cmd.auto) { supportedFanModes += "auto " } // "fanAuto "
if(cmd.low) { supportedFanModes += "fanOn " } if(cmd.low) { supportedFanModes += "on " } // "fanOn"
if(cmd.circulation) { supportedFanModes += "fanCirculate " } if(cmd.circulation) { supportedFanModes += "circulate " } // "fanCirculate"
state.supportedFanModes = supportedFanModes state.supportedFanModes = supportedFanModes
// No events to be generated, return empty map
return [:]
} }
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) { def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
@@ -412,7 +415,13 @@ def configure() {
delayBetween([ delayBetween([
zwave.thermostatModeV2.thermostatModeSupportedGet().format(), zwave.thermostatModeV2.thermostatModeSupportedGet().format(),
zwave.thermostatFanModeV3.thermostatFanModeSupportedGet().format(), zwave.thermostatFanModeV3.thermostatFanModeSupportedGet().format(),
zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId]).format() zwave.associationV1.associationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId]).format(),
zwave.sensorMultilevelV3.sensorMultilevelGet().format(), // current temperature
zwave.thermostatSetpointV1.thermostatSetpointGet(setpointType: 1).format(),
zwave.thermostatSetpointV1.thermostatSetpointGet(setpointType: 2).format(),
zwave.thermostatModeV2.thermostatModeGet().format(),
zwave.thermostatFanModeV3.thermostatFanModeGet().format(),
zwave.thermostatOperatingStateV1.thermostatOperatingStateGet().format()
], 2300) ], 2300)
} }
@@ -453,11 +462,11 @@ def switchToMode(nextMode) {
def switchFanMode() { def switchFanMode() {
def currentMode = device.currentState("thermostatFanMode")?.value def currentMode = device.currentState("thermostatFanMode")?.value
def lastTriedMode = state.lastTriedFanMode ?: currentMode ?: "off" def lastTriedMode = state.lastTriedFanMode ?: currentMode ?: "off"
def supportedModes = getDataByName("supportedFanModes") ?: "fanAuto fanOn" def supportedModes = getDataByName("supportedFanModes") ?: "auto on" // "fanAuto fanOn"
def modeOrder = ["fanAuto", "fanCirculate", "fanOn"] def modeOrder = ["auto", "circulate", "on"] // "fanAuto", "fanCirculate", "fanOn"
def next = { modeOrder[modeOrder.indexOf(it) + 1] ?: modeOrder[0] } def next = { modeOrder[modeOrder.indexOf(it) + 1] ?: modeOrder[0] }
def nextMode = next(lastTriedMode) def nextMode = next(lastTriedMode)
while (!supportedModes?.contains(nextMode) && nextMode != "fanAuto") { while (!supportedModes?.contains(nextMode) && nextMode != "auto") { // "fanAuto"
nextMode = next(nextMode) nextMode = next(nextMode)
} }
switchToFanMode(nextMode) switchToFanMode(nextMode)
@@ -468,11 +477,11 @@ def switchToFanMode(nextMode) {
if(supportedFanModes && !supportedFanModes.contains(nextMode)) log.warn "thermostat mode '$nextMode' is not supported" if(supportedFanModes && !supportedFanModes.contains(nextMode)) log.warn "thermostat mode '$nextMode' is not supported"
def returnCommand def returnCommand
if (nextMode == "fanAuto") { if (nextMode == "auto") { // "fanAuto"
returnCommand = fanAuto() returnCommand = fanAuto()
} else if (nextMode == "fanOn") { } else if (nextMode == "on") { // "fanOn"
returnCommand = fanOn() returnCommand = fanOn()
} else if (nextMode == "fanCirculate") { } else if (nextMode == "circulate") { // "fanCirculate"
returnCommand = fanCirculate() returnCommand = fanCirculate()
} else { } else {
log.debug("no fan mode '$nextMode'") log.debug("no fan mode '$nextMode'")

View File

@@ -511,10 +511,6 @@ def pollResponse(response, data) {
if (ResponseValues) { if (ResponseValues) {
def map = [:] def map = [:]
ResponseValues.hubs.each { ResponseValues.hubs.each {
// Device-Watch relies on the Logitech Harmony Cloud to get the Device state.
def isAlive = it.value.status
def d = getChildDevice("harmony-${it.key}")
d?.sendEvent(name: "DeviceWatch-DeviceStatus", value: isAlive!=504? "online":"offline", displayed: false, isStateChange: true)
if (it.value.message == "OK") { if (it.value.message == "OK") {
map["${it.key}"] = "${it.value.response.data.currentAvActivity},${it.value.response.data.activityStatus}" map["${it.key}"] = "${it.value.response.data.currentAvActivity},${it.value.response.data.activityStatus}"
def hub = getChildDevice("harmony-${it.key}") def hub = getChildDevice("harmony-${it.key}")