Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #3484 from SmartThingsCommunity/staging
Rolling down staging to master
  • Loading branch information
workingmonk committed Sep 14, 2018
2 parents e506a82 + 228165b commit 34ecce3
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 33 deletions.
Expand Up @@ -150,7 +150,7 @@ private syncStart() {
}
}

private syncNext() {
def syncNext() {
logging("${device.displayName} - Executing syncNext()","info")
def cmds = []
for ( param in parameterMap() ) {
Expand All @@ -170,7 +170,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("${device.displayName} - Executing syncCheck()","info")
def failed = []
def incorrect = []
Expand Down Expand Up @@ -210,7 +210,7 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {

cmds << zwave.batteryV1.batteryGet()
cmds << zwave.sensorMultilevelV5.sensorMultilevelGet()
runIn(1,"syncNext")
runIn(1, "syncNext")
[response(encapSequence(cmds,1000))]
}

Expand Down
Expand Up @@ -148,11 +148,11 @@ def configure(){
def updated() {
if ( state.lastUpdated && (now() - state.lastUpdated) < 500 ) return
logging("${device.displayName} - Executing updated()","info")
runIn(3,"syncStart")
runIn(3, "syncStart")
state.lastUpdated = now()
}

private syncStart() {
def syncStart() {
boolean syncNeeded = false
parameterMap().each {
if(settings."$it.key" != null) {
Expand Down
Expand Up @@ -199,7 +199,7 @@ private syncStart() {
}
}

private syncNext() {
def syncNext() {
logging("${device.displayName} - Executing syncNext()","debug")
def cmds = []
for ( param in parameterMap() ) {
Expand All @@ -219,7 +219,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("${device.displayName} - Executing syncCheck()","debug")
def failed = []
def incorrect = []
Expand Down Expand Up @@ -264,7 +264,7 @@ def zwaveEvent(physicalgraph.zwave.commands.wakeupv2.WakeUpNotification cmd) {
}
cmds << zwave.batteryV1.batteryGet()
cmds << zwave.sensorMultilevelV5.sensorMultilevelGet(sensorType: 1)
runIn(1,"syncNext")
runIn(1, "syncNext")
[response(encapSequence(cmds,1000))]
}

Expand Down
Expand Up @@ -157,12 +157,12 @@ def initialize() {
if (device.currentValue("numberOfButtons") != 6) { sendEvent(name: "numberOfButtons", value: 6) }

cmds << zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier: 1) //verify if group 1 association is correct
runIn(3,"syncStart")
runIn(3, "syncStart")
state.lastUpdated = now()
response(encapSequence(cmds,1000))
}

private syncStart() {
def syncStart() {
boolean syncNeeded = false
parameterMap().each {
if(settings."$it.key" != null) {
Expand Down Expand Up @@ -202,7 +202,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("${device.displayName} - Executing syncCheck()","info")
def failed = []
def incorrect = []
Expand Down
Expand Up @@ -118,6 +118,7 @@ metadata {
def installed() {
sendEvent(name: "tamper", value: "clear", displayed: false)
sendEvent(name: "motionText", value: "Disabled", displayed: false)
sendEvent(name: "motion", value: "inactive", displayed: false)
multiStatusEvent("Sync OK.", true, true)
}

Expand Down Expand Up @@ -406,7 +407,7 @@ private motionEvent(Integer sensorType, value) {
}
}

private axisEvent() {
def axisEvent() {
logging("${device.displayName} - Executing axisEvent() values are: ${device.currentValue("xAxis")}, ${device.currentValue("yAxis")}, ${device.currentValue("zAxis")}", "debug")
def xAxis = Math.round((device.currentValue("xAxis") as Float) * 100)
def yAxis = Math.round((device.currentValue("yAxis") as Float) * 100)
Expand Down Expand Up @@ -445,7 +446,7 @@ private syncStart() {
}
}

private syncNext() {
def syncNext() {
logging("${device.displayName} - Executing syncNext()", "debug")
def cmds = []
for (param in parameterMap()) {
Expand All @@ -465,7 +466,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("${device.displayName} - Executing syncCheck()", "debug")
def failed = []
def incorrect = []
Expand Down
Expand Up @@ -175,7 +175,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("Executing syncCheck()","info")
def failed = []
def incorrect = []
Expand Down
Expand Up @@ -167,7 +167,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("Executing syncCheck()","info")
def failed = []
def incorrect = []
Expand Down
Expand Up @@ -210,7 +210,7 @@ private syncNext() {
}
}

private syncCheck() {
def syncCheck() {
logging("Executing syncCheck()","info")
def failed = []
def incorrect = []
Expand Down
Expand Up @@ -232,7 +232,7 @@ def generateEvent(Map results) {
}

//return descriptionText to be shown on mobile activity feed
private getThermostatDescriptionText(name, value, linkText) {
def getThermostatDescriptionText(name, value, linkText) {
if(name == "temperature") {
return "temperature is ${value}°${location.temperatureScale}"

Expand Down
Expand Up @@ -51,6 +51,7 @@ metadata {
capability "Switch"
capability "Switch Level"
capability "Polling"
capability "Light"

fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE_Appliances", model: "ZLL Light", deviceJoinName: "GE Link Bulb"
fingerprint profileId: "0104", inClusters: "0000,0003,0004,0005,0006,0008,1000", outClusters: "0019", manufacturer: "GE", model: "SoftWhite", deviceJoinName: "GE Link Soft White Bulb"
Expand Down
Expand Up @@ -30,10 +30,7 @@ metadata {
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,0006,0008,0009,0B04", outClusters: "0019", manufacturer: "Samjin", model: "outlet", deviceJoinName: "Outlet"


//01 0104 0101 00 08 0000 0003 0004 0005 0006 0008 0702 0B05 01 0019
fingerprint profileId: "0104", inClusters: "0000,0003,0006,0009,0B04", outClusters: "0019", manufacturer: "Samjin", model: "outlet", deviceJoinName: "Outlet"
fingerprint profileId: "0010", inClusters: "0000 0003 0004 0005 0006 0008 0702 0B05", outClusters: "0019", manufacturer: "innr", model: "SP 120", deviceJoinName: "Outlet"

}
Expand Down Expand Up @@ -139,4 +136,4 @@ def configure() {

// OnOff minReportTime 0 seconds, maxReportTime 5 min. Reporting interval if no activity
refresh() + zigbee.onOffConfig(0, 300) + zigbee.electricMeasurementPowerConfig()
}
}
Expand Up @@ -720,7 +720,7 @@ private startSimHvac() {
}
}

private runSimHvacCycle() {
def runSimHvacCycle() {
def operatingState = getOperatingState()
def currentTemp = getTemperature()
def heatSet = getHeatingSetpoint()
Expand Down
Expand Up @@ -17,7 +17,7 @@
*/

metadata {
definition(name: "Z-Wave Temp/Light Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.sensor", runLocally: true, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false) {
definition(name: "Z-Wave Temp/Light Sensor", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "x.com.st.d.sensor.multifunction", runLocally: true, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false) {
capability "Sensor"
capability "Battery"
capability "Health Check"
Expand Down
Expand Up @@ -1200,7 +1200,7 @@ def setSensorName(name, deviceId) {
*
* @return true if the command was accepted by Ecobee without error, false otherwise.
*/
private boolean sendCommandToEcobee(Map bodyParams) {
boolean sendCommandToEcobee(Map bodyParams) {
// no need to try sending a command if authToken is null
if (!state.authToken) {
log.warn "sendCommandToEcobee failed due to authToken=null"
Expand Down Expand Up @@ -1259,7 +1259,7 @@ def getCallbackUrl() { return "${serverUrl}/oauth/callback" }
def getBuildRedirectUrl() { return "${serverUrl}/oauth/initialize?appId=${app.id}&access_token=${state.accessToken}&apiServerUrl=${apiServerUrl}" }
def getApiEndpoint() { return "https://api.ecobee.com" }
def getSmartThingsClientId() { return appSettings.clientId }
private getVendorIcon() { return "https://s3.amazonaws.com/smartapp-icons/Partner/ecobee.png" }
def getVendorIcon() { return "https://s3.amazonaws.com/smartapp-icons/Partner/ecobee.png" }

//send both push notification and mobile activity feeds
def sendPushAndFeeds(notificationMessage) {
Expand Down Expand Up @@ -1302,7 +1302,7 @@ def getThermostatData(data) {
* Stores data about the thermostats in atomicState.
* @param thermostats - a list of thermostats as returned from the Ecobee API
*/
private void storeThermostatData(thermostatData) {
void storeThermostatData(thermostatData) {
def data
def remoteSensors = state.remoteSensors2 ?: [:]
def thermostatList = state.thermostats ?: [:]
Expand Down
4 changes: 2 additions & 2 deletions smartapps/smartthings/lifx-connect.src/lifx-connect.groovy
Expand Up @@ -51,7 +51,7 @@ def getCallbackUrl() { return "${getServerUrl()}/oauth/callback" }
def apiURL(path = '/') { return "https://api.lifx.com/v1${path}" }
def getSecretKey() { return appSettings.secretKey }
def getClientId() { return appSettings.clientId }
private getVendorName() { "LIFX" }
def getVendorName() { "LIFX" }

def authPage() {
if (state.lifxAccessToken) {
Expand Down Expand Up @@ -294,7 +294,7 @@ def initialize() {
}

// Misc
private setupDeviceWatch() {
def setupDeviceWatch() {
def hub = location.hubs[0]
// Make sure that all child devices are enrolled in device watch
getChildDevices().each {
Expand Down
Expand Up @@ -978,11 +978,11 @@ def deleteHarmony() {
render status: 204, data: "{}"
}

private getAllDevices() {
def getAllDevices() {
([] + switches + motionSensors + contactSensors + thermostats + presenceSensors + temperatureSensors + accelerationSensors + waterSensors + lightSensors + humiditySensors + alarms + locks)?.findAll()?.unique { it.id }
}

private deviceItem(device) {
def deviceItem(device) {
[
id: device.id,
label: device.displayName,
Expand All @@ -1006,7 +1006,7 @@ private deviceItem(device) {
]
}

private hubItem(hub) {
def hubItem(hub) {
[
id: hub.id,
name: hub.name,
Expand Down

0 comments on commit 34ecce3

Please sign in to comment.