mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-23 21:03:54 +00:00
Merge pull request #1913 from SmartThingsCommunity/production
Rolling down production to staging
This commit is contained in:
@@ -114,9 +114,17 @@ def refresh() {
|
|||||||
|
|
||||||
def configure() {
|
def configure() {
|
||||||
log.debug "Configuring Reporting and Bindings."
|
log.debug "Configuring Reporting and Bindings."
|
||||||
|
def cmds = []
|
||||||
|
if (device.getDataValue("manufacturer") == "sengled") {
|
||||||
|
def startLevel = 0xFE
|
||||||
|
if ((device.currentState("level")?.value != null)) {
|
||||||
|
startLevel = Math.round(Integer.parseInt(device.currentState("level").value) * 0xFE / 100)
|
||||||
|
}
|
||||||
|
// Level Control Cluster, command Move to Level, level start level, transition time 0
|
||||||
|
cmds << zigbee.command(zigbee.LEVEL_CONTROL_CLUSTER, 0x00, sprintf("%02X0000", startLevel))
|
||||||
|
}
|
||||||
// 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 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
|
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
|
||||||
refresh()
|
cmds + refresh()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def bridgeDiscovery(params = [:]) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ssdpSubscribe()
|
ssdpSubscribe()
|
||||||
|
log.trace "bridgeRefreshCount: $bridgeRefreshCount"
|
||||||
//bridge discovery request every 15 //25 seconds
|
//bridge discovery request every 15 //25 seconds
|
||||||
if ((bridgeRefreshCount % 5) == 0) {
|
if ((bridgeRefreshCount % 5) == 0) {
|
||||||
discoverBridges()
|
discoverBridges()
|
||||||
@@ -207,6 +207,7 @@ def bulbDiscovery() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private discoverBridges() {
|
private discoverBridges() {
|
||||||
|
log.trace "Sending Hue Discovery message to the hub"
|
||||||
sendHubCommand(new physicalgraph.device.HubAction("lan discovery urn:schemas-upnp-org:device:basic:1", physicalgraph.device.Protocol.LAN))
|
sendHubCommand(new physicalgraph.device.HubAction("lan discovery urn:schemas-upnp-org:device:basic:1", physicalgraph.device.Protocol.LAN))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user