mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
Merge pull request #163 from SmartThingsCommunity/hue-mac-check
Handle incorrect mac address reporting
This commit is contained in:
@@ -722,6 +722,11 @@ private getBridgeIP() {
|
||||
if (host == null || host == "") {
|
||||
def serialNumber = selectedHue
|
||||
def bridge = getHueBridges().find { it?.value?.serialNumber?.equalsIgnoreCase(serialNumber) }?.value
|
||||
if (!bridge) {
|
||||
//failed because mac address sent from hub is wrong and doesn't match the hue's real mac address and serial number
|
||||
//in this case we will look up the bridge by comparing the incorrect mac addresses
|
||||
bridge = getHueBridges().find { it?.value?.mac?.equalsIgnoreCase(serialNumber) }?.value
|
||||
}
|
||||
if (bridge?.ip && bridge?.port) {
|
||||
if (bridge?.ip.contains("."))
|
||||
host = "${bridge?.ip}:${bridge?.port}"
|
||||
|
||||
Reference in New Issue
Block a user