Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devicetypes/axis/axis-gear-st.src/axis-gear-st.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def configure() {
sendEvent(name: "windowShade", value: "unknown")
log.debug "Configuring Reporting and Bindings."
sendEvent(name: "checkInterval", value: (2 * 60 * 60 + 10 * 60), displayed: true, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID])
sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]))
sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]), displayed: false)

def attrs_refresh = zigbee.readAttribute(CLUSTER_BASIC, BASIC_ATTR_SWBUILDID) +
zigbee.readAttribute(CLUSTER_WINDOWCOVERING, WINDOWCOVERING_ATTR_LIFTPERCENTAGE) +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,14 @@ private channelNumber(String dni) {
private void createChildDevices() {
state.oldLabel = device.label
for (i in 1..2) {
addChildDevice("Switch Child Device", "${device.deviceNetworkId}-ep${i}", null, [completedSetup: true, label: "${device.displayName} (CH${i})",
isComponent: true, componentName: "ep$i", componentLabel: "Channel $i"
addChildDevice("Switch Child Device",
"${device.deviceNetworkId}-ep${i}",
device.hubId,
[completedSetup: true,
label: "${device.displayName} (CH${i})",
isComponent: true,
componentName: "ep$i",
componentLabel: "Channel $i"
])
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,10 @@ private createChildDevices() {
addChildDevice(
"Fibaro Double Switch 2 - USB",
"${device.deviceNetworkId}-2",
null,
[completedSetup: true, label: "${device.displayName} (CH2)", isComponent: false]
device.hubId,
[completedSetup: true,
label: "${device.displayName} (CH2)",
isComponent: false]
)
} catch (Exception e) {
logging("${device.displayName} - error attempting to create child device: "+e, "debug")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,10 @@ private createChildDevices() {
addChildDevice(
"Fibaro Wall Plug USB",
"${device.deviceNetworkId}-2",
null,
[completedSetup: true, label: "${device.displayName} (CH2)", isComponent: false]
device.hubId,
[completedSetup: true,
label: "${device.displayName} (CH2)",
isComponent: false]
)
}

Expand Down
12 changes: 9 additions & 3 deletions devicetypes/smartthings/Orvibo-Contact-Sensor.src/Orvibo-Contact-Sensor.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,15 @@ def refresh() {
}

def configure() {
sendEvent(name: "checkInterval", value:20 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
def cmds = []
def manufacturer = getDataValue("manufacturer")

if (manufacturer == "eWeLink") {
sendEvent(name: "checkInterval", value:2 * 60 * 60 + 5 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
} else {
sendEvent(name: "checkInterval", value:20 * 60 + 1 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
}
def cmds = []

log.debug "Configuring Reporting, IAS CIE, and Bindings."
//The electricity attribute is reported without bind and reporting CFG. The TI plan reports the power once in about 10 minutes; the NXP plan reports the electricity once in 20 minutes
if (manufacturer == "Aurora") {
Expand Down Expand Up @@ -185,4 +191,4 @@ def getContactResult(value) {
value : value,
descriptionText: descriptionText
]
}
}
11 changes: 8 additions & 3 deletions devicetypes/smartthings/aeon-key-fob.src/aeon-key-fob.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,14 @@ private void createChildDevices() {
Integer buttons = (device.currentState("numberOfButtons").value).toBigInteger()

for (i in 1..buttons) {
def child = addChildDevice("Child Button", "${device.deviceNetworkId}/${i}", null,
[completedSetup: true, label: "${device.displayName} button ${i}",
isComponent: true, componentName: "button$i", componentLabel: "Button $i"])
def child = addChildDevice("Child Button",
"${device.deviceNetworkId}/${i}",
device.hubId,
[completedSetup: true,
label: "${device.displayName} button ${i}",
isComponent: true,
componentName: "button$i",
componentLabel: "Button $i"])

child.sendEvent(name: "supportedButtonValues", value: JsonOutput.toJson(["pushed", "held"]), displayed: false)
child.sendEvent(name: "button", value: "pushed", data: [buttonNumber: 1], displayed: false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metadata {

fingerprint mfr: "0371", prod: "0103", model: "0001", deviceJoinName: "Aeon LED Bulb 6 Multi-White" //US
fingerprint mfr: "0371", prod: "0003", model: "0001", deviceJoinName: "Aeon LED Bulb 6 Multi-White" //EU
fingerprint mfr: "0300", prod: "0003", model: "0004", deviceJoinName: "ilumin Tunable White"
}

simulator {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,15 @@ private updateLocalSwitchState(childId, state) {
private addChildSwitches() {
for (i in 2..5) {
String childDni = "${device.deviceNetworkId}/$i"
def child = addChildDevice("Child Switch", childDni, null, [
completedSetup: true,
label : "$device.displayName Switch $i",
isComponent : true,
componentName : "switch$i",
componentLabel: "Switch $i"
])
def child = addChildDevice("Child Switch",
childDni,
device.hubId,
[completedSetup: true,
label : "$device.displayName Switch $i",
isComponent : true,
componentName : "switch$i",
componentLabel: "Switch $i"
])
child.sendEvent(name: "switch", value: "off")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
* for the specific language governing permissions and limitations under the License.
*
*/
import groovy.json.JsonOutput


metadata {
definition (name: "Springs Window Fashions Shade", namespace: "smartthings", author: "SmartThings", ocfDeviceType: "oic.d.blind") {
capability "Window Shade"
Expand Down Expand Up @@ -111,6 +114,7 @@ def getCheckInterval() {

def installed() {
sendEvent(name: "checkInterval", value: checkInterval, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]), displayed: false)
response(refresh())
}

Expand Down Expand Up @@ -242,6 +246,11 @@ def presetPosition() {
zwave.switchMultilevelV1.switchMultilevelSet(value: 0xFF).format()
}

def pause() {
log.debug "pause()"
stop()
}

def stop() {
log.debug "stop()"
zwave.switchMultilevelV3.switchMultilevelStopLevelChange().format()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ def parse(String description) {

attrData.each {
def map = [:]
if (it.clusterInt == zigbee.SIMPLE_METERING_CLUSTER && it.attrInt == ATTRIBUTE_HISTORICAL_CONSUMPTION) {
if (it.value && it.clusterInt == zigbee.SIMPLE_METERING_CLUSTER && it.attrInt == ATTRIBUTE_HISTORICAL_CONSUMPTION) {
log.debug "power"
map.name = "power"
map.value = zigbee.convertHexToInt(it.value)/powerDiv
map.unit = "W"
}
else if (it.clusterInt == zigbee.SIMPLE_METERING_CLUSTER && it.attrInt == ATTRIBUTE_READING_INFO_SET) {
else if (it.value && it.clusterInt == zigbee.SIMPLE_METERING_CLUSTER && it.attrInt == ATTRIBUTE_READING_INFO_SET) {
log.debug "energy"
map.name = "energy"
map.value = zigbee.convertHexToInt(it.value)/energyDiv
Expand Down
9 changes: 7 additions & 2 deletions devicetypes/smartthings/zigbee-motion-detector.src/zigbee-motion-detector.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ def refresh() {

def configure() {
log.debug "configure"
sendEvent(name: "checkInterval", value:20 * 60 + 2*60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
def manufacturer = getDataValue("manufacturer")
if (manufacturer == "eWeLink") {
sendEvent(name: "checkInterval", value:2 * 60 * 60 + 5 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
} else {
sendEvent(name: "checkInterval", value:20 * 60 + 2*60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])
}
return zigbee.configureReporting(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0021, DataType.UINT8, 30, 1200, 0x10) + refresh()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
* for the specific language governing permissions and limitations under the License.
*/

import groovy.json.JsonOutput
import physicalgraph.zigbee.zcl.DataType

metadata {
Expand Down Expand Up @@ -201,6 +203,10 @@ def refresh() {
return cmds
}

def installed() {
sendEvent(name: "supportedWindowShadeCommands", value: JsonOutput.toJson(["open", "close", "pause"]), displayed: false)
}

def configure() {
// Device-Watch allows 2 check-in misses from device + ping (plus 2 min lag time)
log.info "configure()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,14 @@ private void onOffCmd(value, endpoint = null) {
private void createChildDevices() {
state.oldLabel = device.label
for (i in 1..5) {
addChildDevice("Zooz Power Strip Outlet", "${device.deviceNetworkId}-ep${i}", null,
[completedSetup: true, label: "${device.displayName} (CH${i})",
isComponent: true, componentName: "ch$i", componentLabel: "Channel $i"])
addChildDevice("Zooz Power Strip Outlet",
"${device.deviceNetworkId}-ep${i}",
device.hubId,
[completedSetup: true,
label: "${device.displayName} (CH${i})",
isComponent: true,
componentName: "ch$i",
componentLabel: "Channel $i"])
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ metadata {
fingerprint mfr: "0371", prod: "0003", model: "00AF", deviceJoinName: "Aeotec Smart Switch 7", ocfDeviceType: "oic.d.smartplug" //EU
fingerprint mfr: "0371", prod: "0103", model: "00AF", deviceJoinName: "Aeotec Smart Switch 7", ocfDeviceType: "oic.d.smartplug" //US
fingerprint mfr: "0060", prod: "0004", model: "000B", deviceJoinName: "Everspring Smart Plug", ocfDeviceType: "oic.d.smartplug" //US
fingerprint mfr: "031E", prod: "0002", model: "0001", deviceJoinName: "Inovelli Switch Red Series" //US
}

// simulator metadata
Expand Down
Loading