Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#54419 from SmartThingsCommuni…
Browse files Browse the repository at this point in the history
…ty/acceptance

Rolling up acceptance to production for deploy
  • Loading branch information
greens authored Dec 29, 2020
2 parents d0c5122 + 0dece40 commit 5f5b747
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 29 deletions.
1 change: 1 addition & 0 deletions devicetypes/qubino/qubino-dimmer.src/qubino-dimmer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def zwaveEvent(physicalgraph.zwave.Command cmd) {

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd, ep = null) {
log.debug "BasicReport: ${cmd}"
sendHubCommand(encapCommands(getPowerMeterCommands()))
dimmerEvents(cmd)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelR
createEvent(map)
}

def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd, ep = null) {
log.debug "Basic ${cmd}" + (ep ? " from endpoint $ep" : "")
changeSwitch(ep, cmd)
}

def zwaveEvent(physicalgraph.zwave.Command cmd, ep) {
log.warn "Unhandled ${cmd}" + (ep ? " from endpoint $ep" : "")
}
Expand Down
5 changes: 0 additions & 5 deletions devicetypes/smartthings/ge-link-bulb.src/ge-link-bulb.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ metadata {
capability "Sensor"
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 Light" //GE Link Bulb
Expand Down Expand Up @@ -98,10 +97,6 @@ def parse(String description) {
}
}

def poll() {
return zigbee.onOffRefresh() + zigbee.levelRefresh()
}

def updated() {

state.dOnOff = "0000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ metadata {

fingerprint profileId: "0104", inClusters: "0000,0003,0500,0502", outClusters: "0000", manufacturer: "ClimaxTechnology", model: "SRAC_00.00.00.16TC", vid: "generic-siren-8", deviceJoinName: "Ozom Siren" // Ozom Siren - SRAC-23ZBS //Ozom Smart Siren
fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0009,0500,0502", outClusters: "0003,0019", manufacturer: "Heiman", model: "WarningDevice", deviceJoinName: "HEIMAN Siren" //HEIMAN Smart Siren
fingerprint manufacturer: "frient A/S", model :"SIRZB-110", deviceJoinName: "frient Siren", mnmn: "SmartThingsCommunity", vid: "33d3bbac-144c-3a31-b022-0fc5c74240a3" // frient Smart Siren, 2B 0104 0403 00 05 0000 0003 0502 0500 0001 02 000A 0019
}

tiles {
Expand Down Expand Up @@ -57,6 +58,9 @@ private getMODE_BOTH() { "17" }
private getMODE_OFF() { "00" }
private getSTROBE_DUTY_CYCLE() { "40" }
private getSTROBE_LEVEL() { "03" }
private getBASIC_DUTY_CYCLE() { "00" }
private getBASIC_LEVEL() { "00" }
private getFRIENT_MODE_SIREN() { "C1" }

private getALARM_OFF() { 0x00 }
private getALARM_SIREN() { 0x01 }
Expand Down Expand Up @@ -167,16 +171,21 @@ def startCmd(cmd) {
state.lastDuration = warningDuration

def paramMode;
def paramDutyCycle = STROBE_DUTY_CYCLE;
def paramStrobeLevel = STROBE_LEVEL;
def paramDutyCycle;
def paramStrobeLevel;

if (cmd == ALARM_SIREN) {
paramMode = MODE_SIREN
paramDutyCycle = "00"
paramStrobeLevel = "00"
paramMode = isFrientSiren() ? FRIENT_MODE_SIREN : MODE_SIREN
paramDutyCycle = BASIC_DUTY_CYCLE
paramStrobeLevel = BASIC_LEVEL
} else if (cmd == ALARM_STROBE) {
paramMode = MODE_STROBE
paramMode = isFrientSiren() ? FRIENT_MODE_SIREN : MODE_STROBE
paramDutyCycle = isFrientSiren() ? BASIC_DUTY_CYCLE : STROBE_DUTY_CYCLE
paramStrobeLevel = isFrientSiren() ? BASIC_LEVEL : STROBE_LEVEL
} else if (cmd == ALARM_BOTH) {
paramMode = MODE_BOTH
paramMode = isFrientSiren() ? FRIENT_MODE_SIREN : MODE_BOTH
paramDutyCycle = isFrientSiren() ? BASIC_DUTY_CYCLE : STROBE_DUTY_CYCLE
paramStrobeLevel = isFrientSiren() ? BASIC_LEVEL : STROBE_LEVEL
}

zigbee.command(IAS_WD_CLUSTER, COMMAND_IAS_WD_START_WARNING, paramMode, DataType.pack(warningDuration, DataType.UINT16), paramDutyCycle, paramStrobeLevel)
Expand All @@ -202,3 +211,7 @@ def off() {
private isOzomSiren() {
device.getDataValue("manufacturer") == "ClimaxTechnology"
}

private Boolean isFrientSiren() {
device.getDataValue("manufacturer") == "frient A/S"
}
46 changes: 29 additions & 17 deletions devicetypes/smartthings/zigbee-power-meter.src/zigbee-power-meter.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ metadata {
capability "Configuration"

fingerprint profileId: "0104", deviceId:"0053", inClusters: "0000, 0003, 0004, 0B04, 0702", outClusters: "0019", manufacturer: "", model: "E240-KR080Z0-HA", deviceJoinName: "Energy Monitor" //Smart Sub-meter(CT Type)

fingerprint profileId: "0104", deviceId:"0007", inClusters: "0000,0003,0702", outClusters: "000A", manufacturer: "Develco", model: "ZHEMI101", deviceJoinName: "frient Energy Monitor" // frient External Meter Interface (develco) 02 0104 0007 00 03 0000 0003 0702 01 000A
fingerprint profileId: "0104", manufacturer: "Develco Products A/S", model: "EMIZB-132", deviceJoinName: "frient Energy Monitor" // frient Norwegian HAN (develco) 02 0104 0053 00 06 0000 0003 0020 0702 0704 0B04 03 0003 000A 0019
}

// tile definitions
Expand Down Expand Up @@ -55,14 +56,14 @@ def parse(String description) {
def descMap = zigbee.parseDescriptionAsMap(description)
log.debug "event : Desc Map: $descMap"
if (descMap.clusterInt == 0x0B04 && descMap.attrInt == 0x050b) {
event.value = event.value/10
event.value = event.value/activePowerDivisor
event.unit = "W"
} else {
event.value = event.value/1000
event.value = event.value/powerDivisor
event.unit = "W"
}
} else if (event.name == "energy") {
event.value = event.value/1000000
event.value = event.value/(energyDivisor * 1000)
event.unit = "kWh"
}
log.info "event outer:$event"
Expand All @@ -72,29 +73,31 @@ def parse(String description) {
def descMap = zigbee.parseDescriptionAsMap(description)
log.debug "Desc Map: $descMap"

List attrData = [[clusterInt: descMap.clusterInt ,attrInt: descMap.attrInt, value: descMap.value]]
List attrData = [[clusterInt: descMap.clusterInt ,attrInt: descMap.attrInt, value: descMap.value, isValidForDataType: descMap.isValidForDataType]]
descMap.additionalAttrs.each {
attrData << [clusterInt: descMap.clusterInt, attrInt: it.attrInt, value: it.value]
attrData << [clusterInt: descMap.clusterInt, attrInt: it.attrInt, value: it.value, isValidForDataType: it.isValidForDataType]
}
attrData.each {
def map = [:]
if (it.clusterInt == 0x0702 && it.attrInt == 0x0400) {
if (it.isValidForDataType && (it.value != null)) {
if (it.clusterInt == 0x0702 && it.attrInt == 0x0400) {
log.debug "meter"
map.name = "power"
map.value = zigbee.convertHexToInt(it.value)/1000
map.value = zigbee.convertHexToInt(it.value)/powerDivisor
map.unit = "W"
}
if (it.clusterInt == 0x0B04 && it.attrInt == 0x050b) {
}
if (it.clusterInt == 0x0B04 && it.attrInt == 0x050b) {
log.debug "meter"
map.name = "power"
map.value = zigbee.convertHexToInt(it.value)/10
map.value = zigbee.convertHexToInt(it.value)/activePowerDivisor
map.unit = "W"
}
if (it.clusterInt == 0x0702 && it.attrInt == 0x0000) {
log.debug "energy"
map.name = "energy"
map.value = zigbee.convertHexToInt(it.value)/1000000
map.unit = "kWh"
}
if (it.clusterInt == 0x0702 && it.attrInt == 0x0000) {
log.debug "energy"
map.name = "energy"
map.value = zigbee.convertHexToInt(it.value)/(energyDivisor * 1000)
map.unit = "kWh"
}
}

if (map) {
Expand Down Expand Up @@ -129,3 +132,12 @@ def configure() {
zigbee.simpleMeteringPowerConfig() +
zigbee.electricMeasurementPowerConfig()
}

private getActivePowerDivisor() { 10 }
private getPowerDivisor() { isFrientSensor() ? 1 : 1000 }
private getEnergyDivisor() { isFrientSensor() ? 1 : 1000 }

private Boolean isFrientSensor() {
device.getDataValue("manufacturer") == "Develco Products A/S" ||
device.getDataValue("manufacturer") == "Develco"
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ metadata {
// Enbrighten
fingerprint manufacturer: "Jasco Products", model: "43078", deviceJoinName: "Enbrighten Switch" //Enbrighten In-Wall Smart Switch With Energy Monitoring 43078, Raw Description: 01 0104 0100 00 07 0000 0003 0004 0005 0006 0702 0B05 02 000A 0019
fingerprint manufacturer: "Jasco Products", model: "43095", deviceJoinName: "Enbrighten Switch" //Enbrighten Plug-in Smart Switch With Energy Monitoring 43095, Raw Description: 01 0104 0100 00 07 0000 0003 0004 0005 0006 0702 0B05 02 000A 0019
fingerprint manufacturer: "Jasco Products", model: "43132", deviceJoinName: "Enbrighten Switch" //Enbrighten In-Wall Smart Outlet With Energy Monitoring 43132, Raw Description: 01 0104 0100 00 07 0000 0003 0004 0005 0006 0702 0B05 02 000A 0019
}

tiles(scale: 2) {
Expand Down

0 comments on commit 5f5b747

Please sign in to comment.