@CommanderQ , here is the DTH for the Smart Switch 6 (posted in 2 parts):
def clientVersion() {
return â5.3.2â
}
metadata {
definition(name: âAeon Labs Smart Switch 6 Gen5_V5.3.2â, namespace: âdmohabirâ, author: âD. Mohabirâ) {
capability âSwitchâ
capability âPollingâ
capability âPower Meterâ
capability âEnergy Meterâ
capability âRefreshâ
capability âSwitch Levelâ
capability âSensorâ
capability âActuatorâ
capability âConfigurationâ
capability âColor Controlâ
command "energy"
command "momentary"
command "nightLight"
command "reset"
command "factoryReset"
command "setBrightnessLevel"
command "getDeviceInfo"
attribute "deviceMode", "String"
// Base on https://community.smartthings.com/t/new-z-wave-fingerprint-format/48204
fingerprint mfr: "0086", prod: "0103", model: "0060" // Aeon brand
fingerprint mfr: "0086", prod: "0003", model: "004B" // Foxx Project (UK)
fingerprint mfr: "0134", prod: "0259", model: "0096" // AT&T rebrand
fingerprint type: "1001", cc: "5E,25,26,33,70,27,32,81,85,59,72,86,7A,73", ccOut: "5A,82"
}
tiles(scale: 2) {
multiAttributeTile(name: "mainPanel", type: "lighting", width: 6, height: 4, canChangeIcon: true) {
tileAttribute("device.switch", key: "PRIMARY_CONTROL") {
attributeState "on", label: '${name}', action: "switch.off", icon: "st.Appliances.appliances17", backgroundColor: "#00a0dc", nextState: "turningOff"
attributeState "off", label: '${name}', action: "switch.on", icon: "st.Appliances.appliances17", backgroundColor: "#ffffff", nextState: "turningOn"
attributeState "turningOn", label: '${name}', action: "switch.off", icon: "st.Appliances.appliances17", backgroundColor: "#00a0dc", nextState: "turningOff"
attributeState "turningOff", label: '${name}', action: "switch.on", icon: "st.Appliances.appliances17", backgroundColor: "#ffffff", nextState: "turningOn"
}
tileAttribute("statusText3", key: "SECONDARY_CONTROL") {
attributeState "statusText3", label: '${currentValue}'
}
}
standardTile("deviceMode", "deviceMode", canChangeIcon: true, canChangeBackground: false, width: 2, height: 2) {
state "energy", label: 'energy', action: "momentary", icon: "http://mail.lgk.com/aeonv6orange.png"
state "momentary", label: 'momentary', action: "nightLight", icon: "http://mail.lgk.com/aeonv6white.png"
state "nightLight", label: 'NightLight', action: "energy", icon: "http://mail.lgk.com/aeonv6blue.png"
}
valueTile("power", "device.power", width: 2, height: 1, decoration: "flat") {
state "default", label: '${currentValue} W'
}
valueTile("energy", "device.energy", width: 2, height: 1, decoration: "flat") {
state "default", label: '${currentValue} kWh'
}
valueTile("amperage", "device.amperage", width: 2, height: 1, decoration: "flat") {
state "default", label: '${currentValue} A'
}
valueTile("voltage", "device.voltage", width: 2, height: 1, decoration: "flat") {
state "default", label: '${currentValue} v'
}
valueTile("currentEnergyCostTxt", "currentEnergyCostTxt", width: 2, height: 1, decoration: "flat") {
state "default", label: 'Energy Cost \n(Current Usage):'
}
valueTile("currentEnergyCostDay", "currentEnergyCostDay", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nDay\n$${currentValue}'
}
valueTile("currentEnergyCostWeek", "currentEnergyCostWeek", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nWeek\n$${currentValue}'
}
valueTile("currentEnergyCostMonth", "currentEnergyCostMonth", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nMonth\n$${currentValue}'
}
valueTile("currentEnergyCostYear", "currentEnergyCostYear", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nYear\n$${currentValue}'
}
valueTile("cumulativeEnergyCostTxt", "cumulativeEnergyCostTxt", width: 2, height: 1, decoration: "flat") {
state "default", label: 'Energy Cost Since\n${currentValue}:'
}
valueTile("cumulativeEnergyCostActual", "cumulativeEnergyCostActual", width: 2, height: 1, decoration: "flat") {
state "default", label: 'Cost: \n$${currentValue}'
}
valueTile("resetDate", "resetDate", width: 4, height: 1, decoration: "flat") {
state "default", label: '${currentValue}'
}
valueTile("cumulativeEnergyCostDay", "cumulativeEnergyCostDay", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nDay \n$${currentValue}'
}
valueTile("cumulativeEnergyCostWeek", "cumulativeEnergyCostWeek", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nWeek\n$${currentValue}'
}
valueTile("cumulativeEnergyCostMonth", "cumulativeEnergyCostMonth", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nMonth\n$${currentValue}'
}
valueTile("cumulativeEnergyCostYear", "cumulativeEnergyCostYear", width: 1, height: 1, decoration: "flat") {
state "default", label: 'Per\nYear \n$${currentValue}'
}
controlTile("levelSliderControl", "device.brightnessLevel", "slider", width: 2, height: 1) {
state "level", action: "switch level.setLevel"
}
valueTile("levelSliderTxt", "device.brightnessLevel", decoration: "flat") {
state "brightnessLevel", label: '${currentValue} %'
}
standardTile("refresh", "device.switch", decoration: "flat", width: 2, height: 2) {
state "default", label: "", action: "refresh.refresh", icon: "st.secondary.refresh"
}
standardTile("reset", "device.energy", decoration: "flat", width: 2, height: 2) {
state "default", label: 'reset', action: "reset", icon: "st.secondary.refresh-icon"
}
controlTile("rgbSelector", "device.color", "color", height: 3, width: 2) {
state "color", action: "setColor"
}
standardTile("configure", "device.power", inactiveLabel: false, decoration: "flat", width: 1, height: 1) {
state "configure", label: '', action: "configuration.configure", icon: "st.secondary.configure"
}
valueTile("deviceInfo", "deviceInfo", decoration: "flat", width: 6, height: 2) {
state "default", label: '${currentValue}', action: "getDeviceInfo"
}
main(["mainPanel", "power", "energy", "voltage", "amperage"])
details(["mainPanel", "cumulativeEnergyCostActual", "resetDate", "deviceMode", "power", "energy", "amperage", "voltage",
"currentEnergyCostTxt", "currentEnergyCostDay", "currentEnergyCostWeek", "currentEnergyCostMonth", "currentEnergyCostYear",
"cumulativeEnergyCostTxt", "cumulativeEnergyCostDay", "cumulativeEnergyCostWeek", "cumulativeEnergyCostMonth", "cumulativeEnergyCostYear",
"rgbSelector", "levelSliderControl", "levelSliderTxt", "configure", "refresh", "reset", "deviceInfo"])
}
}
preferences {
input title: ââ, description: âAeon Smart Switch 6 (gen5) v${clientVersion()}â, displayDuringSetup: true, type: âparagraphâ, element: âparagraphâ
input name: "switchDisabled", type: "bool", title: "Disable switch on/off\n", defaultValue: "false", displayDuringSetup: true, required: true
input name: "refreshInterval", type: "number", title: "Refresh interval \n\nSet the refresh time interval (seconds) between each report [Default (300)].\n", displayDuringSetup: true, required: true
input name: "switchAll", type: "enum", title: "Respond to switch all?\n", description: "How does switch respond to the 'Switch All' command", options: ["Disabled", "Off Enabled", "On Enabled", "On and Off Enabled"], defaultValue: "On and Off Enabled", displayDuringSetup: true, required: false
input name: "forceStateChangeOnReport", type: "bool", title: "Force state change when receiving a report ? If true, you'll always get notification even if report data doesn't change.\n", defaultValue: "false", displayDuringSetup: true, required: true
input name: "secureInclusionOverride", type: "bool", title: "Is this device in secure inclusive mode?\n", defaultValue: "false", displayDuringSetup: true, required: true
input name: "onlySendReportIfValueChange", type: "bool", title: "Only send report if value change (either in terms of wattage or a %)\n", defaultValue: "false", displayDuringSetup: true, required: true
input title: "", description: "The next two parameters are only functional if the 'only send report' is set to true.", type: "paragraph", element: "paragraph", displayDuringSetup: true, required: true
input name: "minimumChangeWatts", type: "number", title: "Minimum change in wattage for a report to be sent (0 - 60000) [Default (25)].\n", range: "0..60000", displayDuringSetup: true, required: true
input name: "minimumChangePercent", type: "number", title: "Minimum change in percentage for a report to be sent (0 - 100) [Default (5)]\n", range: "0..100", displayDuringSetup: true, required: true
input name: "costPerKwh", type: "decimal", title: "Cost per kWh (Used for energy cost /per kWh) [Default (0.12)]\n", displayDuringSetup: true, required: true
input name: "includeWattInReport", type: "bool", title: "Include energy meter (W) in report?\n", defaultValue: "true", displayDuringSetup: true, required: true
input name: "includeVoltageInReport", type: "bool", title: "Include voltage (V) in report?\n", defaultValue: "true", displayDuringSetup: true, required: true
input name: "includeCurrentInReport", type: "bool", title: "Include current (A) in report?\n", defaultValue: "true", displayDuringSetup: true, required: true
input name: "includeCurrentUsageInReport", type: "bool", title: "Include current usage (kWh) in report?\n", defaultValue: "true", displayDuringSetup: true, required: true
input title: "", description: "Logging", type: "paragraph", element: "paragraph"
input name: "isLogLevelTrace", type: "bool", title: "Show trace log level ?\n", defaultValue: "false", displayDuringSetup: true, required: true
input name: "isLogLevelDebug", type: "bool", title: "Show debug log level ?\n", defaultValue: "true", displayDuringSetup: true, required: true
}
/*******************************************************************************
- Z-WAVE PARSE / EVENTS *
******************************************************************************/
/**
-
parse - Called when messages from a device are received from the hub
-
-
The parse method is responsible for interpreting those messages and returning Event definitions.
-
-
String description The message from the device
*/
def parse(String description) {
def result = null
logTrace âparse: â$descriptionââ
if (description != âupdatedâ) {
if (description.contains(âcommand: 5E02â)) {
logInfo âIgnoring command 5E02 has itâs not supported by the platform.â
return
}
def cmd = zwave.parse(description, [0x98: 1, 0x20: 1, 0x26: 3, 0x70: 1, 0x32: 3])
logTrace "cmd: '$cmd'"
if (cmd) {
result = zwaveEvent(cmd)
//log.debug("'$description' parsed to $result $result?.name")
} else {
logError "Couldn't zwave.parse '$description'"
}
}
updateStatus()
result
}
/**
- COMMAND_CLASS_SECURITY (0x98)
-
-
*/
def zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
def encapsulatedCommand = cmd.encapsulatedCommand([0x20: 1, 0x26: 3, 0x70: 1, 0x32: 3])
logTrace âsecure cmd: â$cmdââ
state.deviceInfo[âsecureInclusionâ] = true;
// can specify command class versions here like in zwave.parse
if (encapsulatedCommand) {
return zwaveEvent(encapsulatedCommand)
} else {
logError "Unable to extract encapsulated cmd from $cmd"
}
}
/**
- COMMAND_CLASS_SECURITY (0x98)
-
-
*/
def zwaveEvent(physicalgraph.zwave.commands.securityv1.NetworkKeyVerify cmd) {
log.debug âNetworkKeyVerify with cmd: $cmd (node is securely included)â
//after device securely joined the network, call configure() to config device
state.deviceInfo['secureInclusion'] = true;
updateDeviceInfo()
}
/**
-
COMMAND_CLASS_SWITCH_BINARY (0x25)
-
-
Short value 0xFF for on, 0x00 for off
*/
def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinarySet cmd) {
createEvent(name: âswitchâ, value: cmd.switchValue ? âonâ : âoffâ)
//return createEvent(name: âswitchâ, value: cmd.value ? âonâ : âoffâ)
}
/**
- COMMAND_CLASS_SWITCH_BINARY (0x25)
-
- Short value 0xFF for on, 0x00 for off
*/
def zwaveEvent(physicalgraph.zwave.commands.switchbinaryv1.SwitchBinaryReport cmd) {
createEvent(name: âswitchâ, value: cmd.value ? âonâ : âoffâ, displayed: false, isStateChange: true)
}
def zwaveEvent(physicalgraph.zwave.commands.sensormultilevelv5.SensorMultilevelReport cmd) {
}
/**
- COMMAND_CLASS_BASIC (0x20)
- This command is being ignored in secure inclusion mode.
-
- Short value 0xFF for on, 0x00 for off
*/
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {
return createEvent(name: âswitchâ, value: cmd.value ? âonâ : âoffâ, displayed: false)
}
/**
- COMMAND_CLASS_BASIC (0x20)
-
- This command is being ignored in secure inclusion mode.
- Short value 0xFF for on, 0x00 for off
*/
def zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {
return createEvent(name: âswitchâ, value: cmd.value ? âonâ : âoffâ)
}
/**
- COMMAND_CLASS_SWITCH_MULTILEVEL (0x26)
-
- Short value
*/
def zwaveEvent(physicalgraph.zwave.commands.switchmultilevelv3.SwitchMultilevelReport cmd) {
}
/**
-
COMMAND_CLASS_METER (0x32)
-
-
Integer deltaTime Time in seconds since last report
-
Short meterType Unknown = 0, Electric = 1, Gas = 2, Water = 3
-
List meterValue Meter value as an array of bytes
-
Double scaledMeterValue Meter value as a double
-
List previousMeterValue Previous meter value as an array of bytes
-
Double scaledPreviousMeterValue Previous meter value as a double
-
Short size The size of the array for the meterValue and previousMeterValue
-
Short scale The scale of the values: âkWhâ=0, âkVAhâ=1, âWattsâ=2, âpulsesâ=3, âVoltsâ=4, âAmpsâ=5, âPower Factorâ=6, âUnknownâ=7
-
Short precision The decimal precision of the values
-
Short rateType ???
-
Boolean scale2 ???
*/
def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd) {
if (cmd.meterType == 1) {
def eventList =
if ("$costPerKwh" == "null") {
logError "costPerKwh is null, please go through the configuration page first"
return
}
if (cmd.scale == 0) {
logDebug " got kwh $cmd.scaledMeterValue"
BigDecimal costDecimal = ( costPerKwh as BigDecimal )
def batteryRunTimeHours = getBatteryRuntimeInHours()
eventList.push(internalCreateEvent([name: "energy", value: cmd.scaledMeterValue, unit: "kWh"]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostTxt", value: getBatteryRuntime()]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostActual", value: String.format("%5.2f", cmd.scaledMeterValue * costDecimal)]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostDay", value: String.format("%5.2f", cmd.scaledMeterValue / batteryRunTimeHours * costDecimal * 24)]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostWeek", value: String.format("%5.2f", cmd.scaledMeterValue / batteryRunTimeHours * costDecimal * 24 * 7)]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostMonth", value: String.format("%5.2f", cmd.scaledMeterValue / batteryRunTimeHours * costDecimal * 24 * 30.42)]));
eventList.push(internalCreateEvent([name: "cumulativeEnergyCostYear", value: String.format("%5.2f", cmd.scaledMeterValue / batteryRunTimeHours * costDecimal * 24 * 365)]));
} else if (cmd.scale == 1) {
logDebug " got kVAh $cmd.scaledMeterValue"
eventList.push(internalCreateEvent([name: "energy", value: cmd.scaledMeterValue, unit: "kVAh"]));
} else if (cmd.scale == 2) {
logDebug " got wattage $cmd.scaledMeterValue"
eventList.push(internalCreateEvent([name: "power", value: Math.round(cmd.scaledMeterValue), unit: "W"]));
BigDecimal costDecimal = ( costPerKwh as BigDecimal )
eventList.push(internalCreateEvent([name: "currentEnergyCostDay", value: String.format("%5.2f", (cmd.scaledMeterValue / 1000) * 24 * costDecimal)]));
eventList.push(internalCreateEvent([name: "currentEnergyCostWeek", value: String.format("%5.2f", (cmd.scaledMeterValue / 1000) * 24 * 7 * costDecimal)]));
eventList.push(internalCreateEvent([name: "currentEnergyCostMonth", value: String.format("%5.2f", (cmd.scaledMeterValue / 1000) * 24 * 30.42 * costDecimal)]));
eventList.push(internalCreateEvent([name: "currentEnergyCostYear", value: String.format("%5.2f", (cmd.scaledMeterValue / 1000) * 24 * 365 * costDecimal)]));
} else if (cmd.scale == 4) { // Volts
logDebug " got voltage $cmd.scaledMeterValue"
eventList.push(internalCreateEvent([name: "voltage", value: Math.round(cmd.scaledMeterValue), unit: "V"]));
} else if (cmd.scale == 5) { //amps scale 5 is amps even though not documented
logDebug " got amperage = $cmd.scaledMeterValue"
eventList.push(internalCreateEvent([name: "amperage", value: cmd.scaledMeterValue, unit: "A"]));
} else {
eventList.push(internalCreateEvent([name: "electric", value: cmd.scaledMeterValue, unit: ["pulses", "V", "A", "R/Z", ""][cmd.scale - 3]]));
}
return eventList
}
}
/**
- COMMAND_CLASS_CONFIGURATION (0x70)
-
- List configurationValue
- Short parameterNumber
- Short size
*/
def zwaveEvent(physicalgraph.zwave.commands.configurationv1.ConfigurationReport cmd) {
logTrace âreceived ConfigurationReport for " + cmd.parameterNumber + " (hex:â + Integer.toHexString(cmd.parameterNumber) + ") cmd: " + cmd
switch (cmd.parameterNumber) {
case 0x51:
logTrace âreceived device mode eventâ
if (cmd.configurationValue[0] == 0) {
return createEvent(name: âdeviceModeâ, value: âenergyâ, displayed: true)
} else if (cmd.configurationValue[0] == 1) {
return createEvent(name: âdeviceModeâ, value: âmomentaryâ, displayed: true)
} else if (cmd.configurationValue[0] == 2) {
return createEvent(name: âdeviceModeâ, value: ânightLightâ, displayed: true)
}
break;
case 0x54:
logTrace âreceived brightness level eventâ
return createEvent(name: âlevelâ, value: cmd.configurationValue[0], displayed: true)
break;
}
}
/**
- COMMAND_CLASS_HAIL (0x82)
-
*/
def zwaveEvent(physicalgraph.zwave.commands.hailv1.Hail cmd) {
logDebug âSwitch button was pressedâ
return createEvent(name: âhailâ, value: âhailâ, descriptionText: âSwitch button was pressedâ)
}
/**
-
COMMAND_CLASS_VERSION (0x86)
-
-
Short applicationSubVersion
-
Short applicationVersion
-
Short zWaveLibraryType
-
Short zWaveProtocolSubVersion
-
Short zWaveProtocolVersion
*/
def zwaveEvent(physicalgraph.zwave.commands.versionv1.VersionReport cmd) {
state.deviceInfo[âapplicationVersionâ] = â${cmd.applicationVersion}â
state.deviceInfo[âapplicationSubVersionâ] = â${cmd.applicationSubVersion}â
state.deviceInfo[âzWaveLibraryTypeâ] = â${cmd.zWaveLibraryType}â
state.deviceInfo[âzWaveProtocolVersionâ] = â${cmd.zWaveProtocolVersion}â
state.deviceInfo[âzWaveProtocolSubVersionâ] = â${cmd.zWaveProtocolSubVersion}â
return updateDeviceInfo()
}
/**
- COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72)
-
- Integer manufacturerId
- Integer productId
- Integer productTypeId
-
*/
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.ManufacturerSpecificReport cmd) {
state.deviceInfo[âmanufacturerIdâ] = â${cmd.manufacturerId}â
state.deviceInfo[âmanufacturerNameâ] = â${cmd.manufacturerName}â
state.deviceInfo[âproductIdâ] = â${cmd.productId}â
state.deviceInfo[âproductTypeIdâ] = â${cmd.productTypeId}â
return updateDeviceInfo()
}
/**
- COMMAND_CLASS_MANUFACTURER_SPECIFIC (0x72)
-
- List deviceIdData
- Short deviceIdDataFormat
- Short deviceIdDataLengthIndicator
- Short deviceIdType
-
*/
def zwaveEvent(physicalgraph.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) {
logTrace âdeviceIdData: ${cmd.deviceIdData}â
logTrace âdeviceIdDataFormat: ${cmd.deviceIdDataFormat}â
logTrace âdeviceIdDataLengthIndicator:${cmd.deviceIdDataLengthIndicator}â
logTrace âdeviceIdType: ${cmd.deviceIdType}â
return updateDeviceInfo()
}
/**
- COMMAND_CLASS_FIRMWARE_UPDATE_MD_V2 (0x7a)
-
- Integer checksum
- Integer firmwareId
- Integer manufacturerId
-
*/
def zwaveEvent(physicalgraph.zwave.commands.firmwareupdatemdv2.FirmwareMdReport cmd) {
state.deviceInfo[âchecksumâ] = â${cmd.checksum}â
state.deviceInfo[âfirmwareIdâ] = â${cmd.firmwareId}â
return updateDeviceInfo()
}
/*******************************************************************************
- CAPABILITITES *
******************************************************************************/
/**
-
configure - Configures the parameters of the device
-
-
Required for the âConfigurationâ capability
*/
def configure() {
logInfo âconfigure()â
if (â$refreshIntervalâ == ânullâ || â$minimumChangeWattsâ == ânullâ) {
logError âSome preferences are null, please go through the configuration page firstâ
return
}
updateDeviceInfo()
def switchAllMode = physicalgraph.zwave.commands.switchallv1.SwitchAllSet.MODE_INCLUDED_IN_THE_ALL_ON_ALL_OFF_FUNCTIONALITY
if (switchAll == âDisabledâ) {
switchAllMode = physicalgraph.zwave.commands.switchallv1.SwitchAllSet.MODE_EXCLUDED_FROM_THE_ALL_ON_ALL_OFF_FUNCTIONALITY
} else if (switchAll == âOff Enabledâ) {
switchAllMode = physicalgraph.zwave.commands.switchallv1.SwitchAllSet.MODE_EXCLUDED_FROM_THE_ALL_ON_FUNCTIONALITY_BUT_NOT_ALL_OFF
} else if (switchAll == âOn Enabledâ) {
switchAllMode = physicalgraph.zwave.commands.switchallv1.SwitchAllSet.MODE_EXCLUDED_FROM_THE_ALL_OFF_FUNCTIONALITY_BUT_NOT_ALL_ON
}
logTrace "forceStateChangeOnReport value: " + forceStateChangeOnReport
logTrace "switchAll value: " + switchAll
def reportGroup;
reportGroup = (â$includeVoltageInReportâ == âtrueâ ? 1 : 0)
reportGroup += (â$includeCurrentInReportâ == âtrueâ ? 2 : 0)
reportGroup += (â$includeWattInReportâ == âtrueâ ? 4 : 0)
reportGroup += (â$includeCurrentUsageInReportâ == âtrueâ ? 8 : 0)
logTrace âsetting configuration refresh interval: " + new BigInteger(â$refreshInterval")
/***************************************************************
Device specific configuration parameters
Param Size Default Description
0x03 (3) 1 0 Current Overload Protection. Load will be closed when the Current overrun (US: 15.5A, other country: 16.2A) and the
time more than 2 minutes (0=disabled, 1=enabled).
0x14 (20) 1 0 Configure the output load status after re-power on (0=last status, 1=always on, 2=always off)
0x21 (33) 4 Set the RGB LED color value for testing. alternate rgb color level ie res,blue,green,red ie 00ffffff
0x50 (80) 1 0 Enable to send notifications to associated devices in Group 1 when load changes (0=nothing, 1=hail CC, 2=basic CC report)
0x51 (81) 1 0 mode 0 - energy, 1 - momentary indicator, 2 - night light
0x53 (83) 3 0 hex value ffffff00 ⌠only night light mode
0x54 (84) 1 50 dimmer level 0 -100 (doesnât work in night light mode)
0x5A (90) 1 1 Enables/disables parameter 0x5A and 0x5B below
0x5B (91) 2 25 The value here represents minimum change in wattage (in terms of wattage) for a REPORT to be sent (default 50W, size 2 bytes).
0x5C (92) 1 5 The value here represents minimum change in wattage (in terms of percentage) for a REPORT to be sent (default 10%, size 1 byte).
0x65 (101) 4 0x00 00 00 04 Which reports need to send in Report group 1
0x66 (102) 4 0x00 00 00 08 Which reports need to send in Report group 2
0x67 (103) 4 0 Which reports need to send in Report group 3
0x6F (111) 4 0x00 00 02 58 The time interval in seconds for sending Report group 1 (Valid values 0x01-0x7FFFFFFF).
0x70 (112) 4 0x00 00 02 58 The time interval in seconds for sending Report group 2 (Valid values 0x01-0x7FFFFFFF).
0x71 (113) 4 0x00 00 02 58 The time interval in seconds for sending Report group 3 (Valid values 0x01-0x7FFFFFFF).
0xC8 (200) 1 0 Partner ID
0xFC (252) 1 0 Enable/disable Configuration Locked (0 =disable, 1 =enable).
0xFE (254) 2 0 Device Tag.
0xFF (255) 1 N/A Reset to factory default setting
Configuration Values for parameters 0x65-0x67:
BYTE | 7 6 5 4 3 2 1 0
MSB 0 | 0 0 0 0 0 0 0 0
Val 1 | 0 0 0 0 0 0 0 0
VAL 2 | 0 0 0 0 0 0 0 0
LSB 3 | 0 0 0 0 A B C 0
Bit A - Send Meter REPORT (for kWh) at the group time interval
Bit B - Send Meter REPORT (for watt) at the group time interval
Bit C - Automatically send(1) or donât send(0) Multilevel Sensor Report Command
***************************************************************/
delayBetween([
formatCommand(zwave.switchAllV1.switchAllSet(mode: switchAllMode)),
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x50, size: 1, scaledConfigurationValue: 0)), //Enable to send notifications to associated devices when load changes (0=nothing, 1=hail CC, 2=basic CC report)
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x5A, size: 1, scaledConfigurationValue: (â$onlySendReportIfValueChangeâ == âtrueâ ? 1 : 0))), //Enables parameter 0x5B and 0x5C (0=disabled, 1=enabled)
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x5B, size: 2, scaledConfigurationValue: new BigInteger(â$minimumChangeWattsâ))), //Minimum change in wattage for a REPORT to be sent (Valid values 0 - 60000)
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x5C, size: 1, scaledConfigurationValue: new BigInteger(â$minimumChangePercentâ))), //Minimum change in percentage for a REPORT to be sent (Valid values 0 - 100)
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x65, size: 4, scaledConfigurationValue: reportGroup)), //Which reports need to send in Report group 1
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x66, size: 4, scaledConfigurationValue: 0)), //Which reports need to send in Report group 2
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x67, size: 4, scaledConfigurationValue: 0)), //Which reports need to send in Report group 3
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x6F, size: 4, scaledConfigurationValue: new BigInteger("$refreshInterval"))), // change reporting time
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x70, size: 4, scaledConfigurationValue: new BigInteger(0xFFFFF))),
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x71, size: 4, scaledConfigurationValue: new BigInteger(0xFFFFF))),
formatCommand(zwave.configurationV1.configurationSet(parameterNumber: 0x3, size: 1, scaledConfigurationValue: 0)), // Current Overload Protection.
], 200)
}