mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-28 21:04:16 +00:00
Merge branch 'master' of github.com:SmartThingsCommunity/SmartThingsPublic
# By Lars Finander # Via Lars Finander * 'master' of github.com:SmartThingsCommunity/SmartThingsPublic: DVCSMP-1516 Hue (Connect) throws 15k groovy.lang.MissingPropertyException per day
This commit is contained in:
@@ -455,7 +455,7 @@ def locationHandler(evt) {
|
|||||||
log.error "/description.xml returned a bridge that didn't exist"
|
log.error "/description.xml returned a bridge that didn't exist"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(headerString?.contains("json")) {
|
} else if(headerString?.contains("json") && isValidSource(parsedEvent.mac)) {
|
||||||
log.trace "description.xml response (application/json)"
|
log.trace "description.xml response (application/json)"
|
||||||
def body = new groovy.json.JsonSlurper().parseText(parsedEvent.body)
|
def body = new groovy.json.JsonSlurper().parseText(parsedEvent.body)
|
||||||
if (body.success != null) {
|
if (body.success != null) {
|
||||||
@@ -494,6 +494,11 @@ def doDeviceSync(){
|
|||||||
discoverBridges()
|
discoverBridges()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def isValidSource(macAddress) {
|
||||||
|
def vbridges = getVerifiedHueBridges()
|
||||||
|
return (vbridges?.find {"${it.value.mac}" == macAddress}) != null
|
||||||
|
}
|
||||||
|
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
//CHILD DEVICE METHODS
|
//CHILD DEVICE METHODS
|
||||||
/////////////////////////////////////
|
/////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user