Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#57258 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 Feb 2, 2021
2 parents be756f8 + 35bae36 commit 05e3ddb
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 26 deletions.
12 changes: 9 additions & 3 deletions devicetypes/qubino/qubino-dimmer.src/qubino-dimmer.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
*/
metadata {
definition(name: "Qubino Dimmer", namespace: "qubino", author: "SmartThings", mnmn: "SmartThings", vid:"generic-dimmer-power-energy", ocfDeviceType: "oic.d.switch", runLocally: false, executeCommandsLocally: false) {
definition(name: "Qubino Dimmer", namespace: "qubino", author: "SmartThings", mnmn: "SmartThings", vid:"qubino-dimmer-power-energy", ocfDeviceType: "oic.d.switch", runLocally: false, executeCommandsLocally: false) {
capability "Actuator"
capability "Configuration"
capability "Energy Meter"
Expand All @@ -33,7 +33,7 @@ metadata {

// Qubino Flush Dimmer 0-10V - ZMNHVD
// Raw Description: zw:L type:1100 mfr:0159 prod:0001 model:0053 ver:2.04 zwv:4.34 lib:03 cc:5E,86,5A,72,73,27,25,26,85,8E,59,70 ccOut:20,26 role:05 ff:9C00 ui:9C00
fingerprint mfr: "0159", prod: "0001", model: "0053", deviceJoinName: "Qubino Dimmer", mnmn: "SmartThings", vid:"generic-dimmer"
fingerprint mfr: "0159", prod: "0001", model: "0053", deviceJoinName: "Qubino Dimmer", mnmn: "SmartThings", vid:"qubino-dimmer"

//Qubino Mini Dimmer
// Raw Description: zw:Ls type:1101 mfr:0159 prod:0001 model:0055 ver:20.02 zwv:5.03 lib:03 cc:5E,6C,55,98,9F sec:86,25,26,85,59,72,5A,70,32,71,73
Expand Down Expand Up @@ -233,6 +233,10 @@ def configure() {
commands << zwave.multiChannelAssociationV2.multiChannelAssociationRemove(groupingIdentifier:1, nodeId:[])
commands << zwave.multiChannelAssociationV2.multiChannelAssociationSet(groupingIdentifier:1, nodeId:[zwaveHubNodeId])
commands << zwave.multiChannelAssociationV2.multiChannelAssociationGet(groupingIdentifier: 1)
if (isDINDimmer()) {
//parameter 42 - power reporting time threshold
commands << zwave.configurationV1.configurationSet(parameterNumber: 42, size: 2, scaledConfigurationValue: 2 * 15 * 60 + 2 * 60)
}
commands += getRefreshCommands()
commands += getReadConfigurationFromTheDeviceCommands()

Expand Down Expand Up @@ -327,7 +331,6 @@ 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 All @@ -351,6 +354,9 @@ def handleMeterReport(cmd) {
createEvent(name: "energy", value: cmd.scaledMeterValue, unit: "kVAh")
} else if (cmd.scale == 2) {
log.debug("createEvent power")
if (isDINDimmer()) {
sendHubCommand(encap(zwave.meterV3.meterGet(scale: 0x00)))
}
createEvent(name: "power", value: Math.round(cmd.scaledMeterValue), unit: "W")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def setCoolingSetpoint(setpoint) {

def updateSetpoint(setpoint, setpointType) {
setpoint = temperatureScale == 'C' ? setpoint : fahrenheitToCelsius(setpoint)
setpoint = Math.max(Math.min(setpoint, maxSetpointTemperature), minSetpointTemperature)
setpoint = Math.max(Math.min(setpoint.doubleValue(), maxSetpointTemperature.doubleValue()), minSetpointTemperature.doubleValue())
[
secure(zwave.thermostatSetpointV2.thermostatSetpointSet([precision: 1, scale: 0, scaledValue: setpoint, setpointType: setpointType, size: 2])),
"delay 2000",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ metadata {
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-134", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SPLZB-137", deviceJoinName: "frient Outlet" // frient smart plug mini, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
fingerprint profileId: "0104", manufacturer: "frient A/S", model: "SMRZB-143", deviceJoinName: "frient Outlet" // frient smart cable, raw description: 02 0104 0051 10 09 0000 0702 0003 0009 0B04 0006 0004 0005 0002 05 0000 0019 000A 0003 0406
fingerprint manufacturer: "Jasco Products", model: "43095", deviceJoinName: "Enbrighten Outlet" //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: "Jasco Outlet" //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
fingerprint manufacturer: "Jasco Products", model: "43078", deviceJoinName: "Enbrighten Switch", ocfDeviceType: "oic.d.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
}

tiles(scale: 2){
Expand Down Expand Up @@ -160,13 +163,17 @@ def configure() {
}

private int getPowerDiv() {
isSengledOutlet() ? 10 : 1
(isSengledOutlet() || isJascoProductsOutlet()) ? 10 : 1
}

private int getEnergyDiv() {
isSengledOutlet() ? 10000 : 100
(isSengledOutlet() || isJascoProductsOutlet()) ? 10000 : 100
}

private boolean isSengledOutlet() {
device.getDataValue("model") == "E1C-NB7"
}

private boolean isJascoProductsOutlet() {
device.getDataValue("manufacturer") == "Jasco Products"
}
49 changes: 40 additions & 9 deletions devicetypes/smartthings/zigbee-non-holdable-button.src/zigbee-non-holdable-button.groovy
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ metadata {
capability "Sensor"

fingerprint profileId: "0104", inClusters: "0000, 0001, 0003, 0500", outClusters: "0019", manufacturer: "HEIMAN", model: "SOS-EM", deviceJoinName: "HEIMAN Button" //HEIMAN Emergency Button
fingerprint manufacturer: "frient A/S", model: "MBTZB-110", deviceJoinName: "frient Button" // Frient Smart Button, 20 0104 0007 00 05 0000 0001 0003 000F 0020 04 0003 0006 000A 0019
}

tiles(scale: 2) {
Expand All @@ -51,6 +52,9 @@ def installed() {
sendEvent(name: "numberOfButtons", value: 1, displayed: false)
}

private getBINARY_INPUT_CLUSTER() { 0x000f }
private getATTRIBUTE_PRESENT_VALUE() { 0x0055 }

private List<Map> collectAttributes(Map descMap) {
List<Map> descMaps = new ArrayList<Map>()

Expand Down Expand Up @@ -86,6 +90,8 @@ def parse(String description) {
map = translateZoneStatus(zs)
} else if (descMap?.clusterInt == zigbee.IAS_ZONE_CLUSTER && descMap.attrInt == zigbee.ATTRIBUTE_IAS_ZONE_STATUS && descMap?.value) {
map = translateZoneStatus(new ZoneStatus(zigbee.convertToInt(descMap?.value)))
} else if (isFrientButton() && descMap?.clusterInt == BINARY_INPUT_CLUSTER && descMap.attrInt == ATTRIBUTE_PRESENT_VALUE && descMap?.value == "01") {
map = getButtonResult('pushed')
}
}
}
Expand All @@ -108,7 +114,7 @@ private Map parseIasMessage(String description) {
}

private Map translateZoneStatus(ZoneStatus zs) {
if (zs.isAlarm1Set()) {
if (zs.isAlarm1Set() || (isFrientButton() && zs.isAlarm2Set())) {
return getButtonResult('pushed')
}
}
Expand All @@ -126,13 +132,17 @@ private Map getBatteryResult(rawValue) {
result.translatable = true
result.descriptionText = "{{ device.displayName }} battery was {{ value }}%"

def minVolts = 2.1
def maxVolts = 3.0
def pct = (volts - minVolts) / (maxVolts - minVolts)
def roundedPct = Math.round(pct * 100)
if (roundedPct <= 0)
roundedPct = 1
result.value = Math.min(100, roundedPct)
if (isFrientButton()) {
result.value = liIon3VTable.find { threshold, perc -> (threshold <= volts) }.value
} else {
def minVolts = 2.1
def maxVolts = 3.0
def pct = (volts - minVolts) / (maxVolts - minVolts)
def roundedPct = Math.round(pct * 100)
if (roundedPct <= 0)
roundedPct = 1
result.value = Math.min(100, roundedPct)
}
}

return result
Expand Down Expand Up @@ -192,5 +202,26 @@ def configure() {

return zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, 0x0020) +
zigbee.enrollResponse() +
zigbee.batteryConfig()
zigbee.batteryConfig() +
(isFrientButton() ? zigbee.configureReporting(BINARY_INPUT_CLUSTER, ATTRIBUTE_PRESENT_VALUE, DataType.BOOLEAN, 0, 600, null) : [])
}

private Boolean isFrientButton() {
device.getDataValue("manufacturer") == "frient A/S"
}

// Capacity discharge curve for 3v Lithium Ion (voltage: remaining %)
private getLiIon3VTable() {[
2.9: 100,
2.8: 80,
2.75: 60,
2.7: 50,
2.65: 40,
2.6: 30,
2.5: 20,
2.4: 15,
2.2: 10,
2.0: 1,
1.9: 0,
0.0: 0
]}
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ metadata {
fingerprint profileId: "0104", deviceId: "0051", inClusters: "0000, 0003, 0004, 0005, 0006, 0B04, 1000, 0702", outClusters: "0019", manufacturer: "AduroSmart Eria", model: "AD-SmartPlug3001", deviceJoinName: "Eria Switch" //Eria Zigbee Smart Plug
fingerprint profileId: "0104", deviceId: "010A", inClusters: "0000, 0003, 0004, 0005, 0006, 1000", outClusters: "0019", manufacturer: "AduroSmart Eria", model: "BPU3", deviceJoinName: "Eria Switch" //Eria Zigbee On/Off Plug
fingerprint profileId: "0104", deviceId: "0101", inClusters: "0000, 0003, 0004, 0005, 0006, 0008, 1000", outClusters: "0019", manufacturer: "AduroSmart Eria", model: "BDP3001", deviceJoinName: "Eria Switch" //Eria Zigbee Dimmable Plug

// 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
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ metadata {

fingerprint profileId: "0104", inClusters: "0000,0001,0003,0004,0005,0020,0201,0202,0204,0B05", outClusters: "000A, 0019", manufacturer: "LUX", model: "KONOZ", deviceJoinName: "LUX Thermostat" //LUX KONOz Thermostat
fingerprint profileId: "0104", inClusters: "0000,0003,0020,0201,0202,0405", outClusters: "0019, 0402", manufacturer: "Umbrela", model: "Thermostat", deviceJoinName: "Umbrela Thermostat" //Umbrela UTee
fingerprint manufacturer: "Danfoss", model: "eTRV0100", deviceJoinName: "Danfoss Thermostat", vid: "SmartThings-smartthings-Danfoss_Ally_Radiator_Thermostat" //Danfoss Ally Radiator thermostat, Raw Description 01 0104 0301 01 08 0000 0001 0003 000A 0020 0201 0204 0B05 02 0000 0019 //Danfoss Thermostat
fingerprint manufacturer: "Danfoss", model: "eTRV0100", deviceJoinName: "Danfoss Thermostat", vid: "SmartThings-smartthings-Danfoss_Ally_Radiator_Thermostat" //Danfoss Ally Radiator thermostat, Raw Description 01 0104 0301 01 08 0000 0001 0003 000A 0020 0201 0204 0B05 02 0000 0019
fingerprint manufacturer: "D5X84YU", model: "eT093WRO", deviceJoinName: "POPP Thermostat", vid: "SmartThings-smartthings-Danfoss_Ally_Radiator_Thermostat" //POPP Smart Thermostat POPE701721, Raw Description 01 0104 0301 01 08 0000 0001 0003 000A 0020 0201 0204 0B05 02 0000 0019
}

tiles {
Expand Down Expand Up @@ -281,7 +282,7 @@ private parseAttrMessage(description) {
def installed() {
sendEvent(name: "checkInterval", value: 2 * 60 * 60 + 2 * 60, displayed: false, data: [protocol: "zigbee", hubHardwareId: device.hub.hardwareID, offlinePingable: "1"])

if (isDanfossAlly()) {
if (isDanfossAlly() || isPOPP()) {
state.supportedThermostatModes = ["heat"]
} else {
state.supportedThermostatModes = ["off", "heat", "cool", "emergency heat"]
Expand Down Expand Up @@ -309,7 +310,7 @@ def refresh() {
}

def getBatteryRemainingCommand() {
if (isDanfossAlly()) {
if (isDanfossAlly() || isPOPP()) {
zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, BATTERY_PERCENTAGE_REMAINING)
} else {
zigbee.readAttribute(zigbee.POWER_CONFIGURATION_CLUSTER, BATTERY_VOLTAGE)
Expand All @@ -324,7 +325,7 @@ def configure() {
def binding = zigbee.addBinding(THERMOSTAT_CLUSTER) + zigbee.addBinding(FAN_CONTROL_CLUSTER)
def startValues = zigbee.writeAttribute(THERMOSTAT_CLUSTER, HEATING_SETPOINT, DataType.INT16, 0x07D0)

if (isDanfossAlly()) {
if (isDanfossAlly() || isPOPP()) {
// setting Min/Max HeatSetPointLimits for Danfoss Ally - MinHeatSetpointLimit: 500 (0x01F4), MaxHeatSetpointLimit: 3500 (0x0DAC)
startValues += zigbee.writeAttribute(THERMOSTAT_CLUSTER, MIN_HEAT_SETPOINT_LIMIT, DataType.INT16, 0x01F4) +
zigbee.writeAttribute(THERMOSTAT_CLUSTER, MAX_HEAT_SETPOINT_LIMIT, DataType.INT16, 0x0DAC)
Expand Down Expand Up @@ -360,7 +361,7 @@ def getBatteryPercentage(rawValue) {
}

def getVoltageRange() {
if (isDanfossAlly()) {
if (isDanfossAlly() || isPOPP()) {
// Danfoss Ally's volage ranges: 2.4V - 0%, 3.2V - 100% (for some types of batteries it will be 3.4V - 100%)
[minVolts: 2.4, maxVolts: 3.2]
} else {
Expand Down Expand Up @@ -504,12 +505,16 @@ private boolean isDanfossAlly() {
device.getDataValue("model") == "eTRV0100"
}

private boolean isPOPP() {
device.getDataValue("model") == "eT093WRO"
}

// TODO: Get these from the thermostat; for now they are set to match the UI metadata
def getCoolingSetpointRange() {
(getTemperatureScale() == "C") ? [10, 35] : [50, 95]
}
def getHeatingSetpointRange() {
if (isDanfossAlly()) {
if (isDanfossAlly() || isPOPP()) {
(getTemperatureScale() == "C") ? [4, 35] : [39, 95]
} else {
(getTemperatureScale() == "C") ? [7.22, 32.22] : [45, 90]
Expand Down

0 comments on commit 05e3ddb

Please sign in to comment.