[Withdrawn] - Aeon HEM V2 (Gen5) Driver

Ok, thanks. I will try your configuration now. But I need to check Aeotec config instructions. Thanks for the help!

I am having exactly the same issue.
When I save the preferences it always stops at " in progress (parameter: 7)"

The HEM joins "unsecured" and it won't give me any security options.

I want to try joining it securely to see if this helps with the parameter setting. I understand the HEM supports S2 security

So my question is:

How do I get my Hubitat C7 to offers me the Z Wave security options when joining this device!.

Reading various threads it appears there used to be an option in the Z Wave set up to force the security box option, but it seems to have disappeared (C7 with latest firmware) or am I missing something!

I want to keep this issue updated in case it's useful to other people (especially as HEM's seem to have lots of issues).

Been checking the Aeotec HEM Manuals and the one supplied with my Aeotec HEM's and the downloadable one are different! Also searching other Forums turns up information not listed in either manual.

1/ My Manual says when you exclude the device it factory resets. Well, I discovered somewhere online, if you hold down the button for more than 10 seconds, it will do a full factory reset. I never did believe it was done by removing the device from the network as the manual says.

2/ If you press the button twice in quick succession while joining it will include with security (Again can't see this in the Aeotec Manual). The hub still doesn't offer security options but it did join securely and found the Driver (ClassicGod version) straight away.

3/ Trying to set up the parameters again and it stops at exactly the same position:
" in progress (parameter: 7) ". At least this time it doesn't send stuff every 5 seconds but it doesn't update anything unless you click refresh.

So I am no further forward after 6 include/excludes attempts.

The built-in driver didn't work for me at all and having contacted Classic God he assures me his driver should work fine for UK single and 3 clamp versions on Hubitat.

The next step is to contact Aeotec support and see what they have to say.

As always any advice or ideas welcome

1 Like

Final Update

A really nice guy by the name of Chris Cheng at Aeotec has fixed this for me and is happy I share it on the forum.

He has moded classicgod code a little bit so it doesn't get stuck updating parameters.

Just to be clear this is now working for HEM ZW-095c single clamp in the UK (it may work for single clamps in the US although it's untested) and I think classicgod original code for the UK three clamp should still work fine. Anyway below I have posted the moded code for anyone who needs it.

/*
 *	Aeotec Home Energy Meter Gen 5
 *
 *	Copyright 2020 Artur Draga
 *	
 *
 */
import groovy.transform.Field 

metadata {
	definition (name: "Aeotec Home Energy Meter Gen 5 1P",namespace: "ClassicGOD", author: "Artur Draga") {
		capability "Energy Meter"
		capability "Power Meter"
		capability "Voltage Measurement"
		capability "Refresh"

		command "resetEnergy"
		
		attribute "syncStatus", "string"
		attribute "current", "number"
		
		fingerprint  mfr:"0086", prod:"0002", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0002", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
        fingerprint  mfr:"0086", prod:"0102", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0102", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
        fingerprint  mfr:"0086", prod:"0202", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0202", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
	}
	
	preferences {

		parameterMap.each {
			input (
				name: it.key,
				title: "${it.num}. ${it.title}",
				type: it.type,
				options: it.options,
				range: (it.min != null && it.max != null) ? "${it.min}..${it.max}" : null,
				defaultValue: it.def,
				required: false
			)
		}

		input name: "debugEnable", type: "bool", title: "Enable debug logging", defaultValue: true
		input name: "infoEnable", type: "bool", title: "Enable info logging", defaultValue: true}
}

def refresh(Integer ep = null) { 
	def cmds = []
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 2),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 4),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 5),ep)
	delayBetween(cmds,1000)
}

def resetEnergy(Integer ep = null) {
	def cmds = []
	cmds << encapCmd(zwave.meterV3.meterReset(),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0))
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),1)
	//cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),2)
	//cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),3)
	delayBetween(cmds,1000)
}

/*
###################
## Encapsulation ##
###################
*/
def encapCmd(hubitat.zwave.Command cmd, Integer ep=null) { 
	logging "encapCmd: ${cmd} ep: ${ep}"
	if (ep != null) cmd = zwave.multiChannelV3.multiChannelCmdEncap(destinationEndPoint: ep).encapsulate(cmd) 
	if (getDataValue("zwaveSecurePairingComplete") == "true") cmd = zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd) 
	return cmd.format()
}

/*
######################
## Parse and events ##
######################
*/
void parse(String description){
	logging "parse: ${description}"
	hubitat.zwave.Command cmd = zwave.parse(description,commandClassVersions)
	if (cmd) zwaveEvent(cmd)
}

def zwaveEvent(hubitat.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
	logging "SecurityMessageEncapsulation: ${cmd}"
	def encapCmd = cmd.encapsulatedCommand()
	if (encapCmd) zwaveEvent(encapCmd)
	else logging "Unable to extract secure cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.crc16encapv1.Crc16Encap cmd) {
	logging "Crc16Encap: ${cmd}"
	def encapCmd = zwave.getCommand(cmd.commandClass, cmd.command, cmd.data, commandClassVersions[cmd.commandClass as Integer]?: 1)
	if (encapCmd) zwaveEvent(encapCmd)
	else logging "Unable to extract Crc16Encap cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
	logging "MultiChannelCmdEncap: ${cmd}"
	def encapCmd = cmd.encapsulatedCommand()
	if (encapCmd) zwaveEvent(encapCmd, cmd.sourceEndPoint as Integer)
	else logging "Unable to extract multi channel cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.meterv3.MeterReport cmd, Integer ep=null) {
	logging "MeterReport value: ${cmd.scaledMeterValue} scale: ${cmd.scale} ep: $ep"
	switch (cmd.scale) {
		case 0: type = "energy"; unit = "kWh"; break; 
		case 1: type = "totalEnergy"; unit = "kVAh"; break;
		case 2: type = "power"; unit = "W"; break;	
		case 4: type = "voltage"; unit = "V"; break;
		case 5: type = "current"; unit = "A"; break;
	}
	if (ep == null) sendEvent([name: type, value: cmd.scaledMeterValue, unit: unit])
	else getChildDevice("${device.deviceNetworkId}-${ep}")?.sendEvent([name: type, value: cmd.scaledMeterValue, unit: unit]) 
}

def zwaveEvent(hubitat.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) { 
	logging "DeviceSpecificReport: ${cmd}"
	String sN = ""
	if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {
		(0..14).each { sN += Integer.toHexString(cmd.deviceIdData[it]).toUpperCase() }
		updateDataValue("serialNumber", sN)
	}
}

def zwaveEvent(hubitat.zwave.commands.versionv3.VersionReport cmd) {	
	logging "VersionReport: ${cmd}"
	updateDataValue("firmwareVersion", "${cmd.firmware0Version}.${cmd.firmware0SubVersion}")
	updateDataValue("protocolVersion", "${cmd.zWaveProtocolVersion}.${cmd.zWaveProtocolSubVersion}")
}

void zwaveEvent(hubitat.zwave.Command cmd, Integer ep=null){ logging "unhandled zwaveEvent: ${cmd} ep: ${ep}", "warn" }

/*
########################
## Parameter Sync etc ##
########################
*/
def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelEndPointReport cmd) {
	logging "MultiChannelEndPointReport: dynamic: ${cmd.dynamic} endPoints: ${cmd.endPoints} identical: ${cmd.identical}"
	if ( !childDevices && cmd.endPoints > 1 ) {
		(1..cmd.endPoints).each() {
			addChildDevice(
				"ClassicGOD",
				"Aeotec Home Energy Meter Child Device", 
				"${device.deviceNetworkId}-${it}", 
				[isComponent: false, name: "${device.displayName} (Clamp ${it})"]
			)	
		}
	}
}

def zwaveEvent(hubitat.zwave.commands.configurationv2.ConfigurationReport cmd) {
	logging "ConfigurationReport: ${cmd}"
	def paramData = parameterMap.find( {it.num == cmd.parameterNumber } )
	def previousVal = state."${paramData.key}".toString()
	def expectedVal = this["${paramData.key}"].toString()
	def receivedVal = cmd.scaledConfigurationValue.toString()
	
	logging "Parameter ${paramData.key} value is ${receivedVal} expected ${expectedVal}", "info"
	if (previousVal == receivedVal && expectedVal == receivedVal) { //ignore
	} else if (expectedVal == receivedVal) {
		logging "Parameter ${paramData.key} as expected"
		state."${paramData.key}" = receivedVal
		syncNext()
	} else if (previousVal == receivedVal) {
		logging "Parameter ${paramData.key} not changed - sync failed"
		if (device.currentValue("syncStatus").contains("in progres")) { sendEvent([name: "syncStatus", value: "wrong value on param ${paramData.num}"]) }
	} else {
		logging "Parameter ${paramData.key} new value"
		device.updateSetting("${paramData.key}", [value:receivedVal, type: paramData.type])
		state."${paramData.key}" = receivedVal
	}
}

def zwaveEvent(hubitat.zwave.commands.applicationstatusv1.ApplicationRejectedRequest cmd) {
	logging "Rejected Configuration!", "warn"
	for ( param in parameterMap ) {
		if (state."$param.key".toString() != this["$param.key"].toString()) {
			sendEvent(name: "syncStatus", value: "rejected request for parameter: ${param.num}")
			break
		}
	}
}

private syncNext() {
	logging "syncNext()"
	def cmds = []
	for ( param in parameterMap ) {
		if ( this["$param.key"] != null && state."$param.key".toString() != this["$param.key"].toString() ) {
			cmds << encapCmd(zwave.configurationV2.configurationSet(scaledConfigurationValue: this["$param.key"].toInteger(), parameterNumber: param.num, size: param.size))
			cmds << encapCmd(zwave.configurationV2.configurationGet(parameterNumber: param.num))
			sendEvent([name: "syncStatus", value: "in progress (parameter: ${param.num})"])
			break
		} 
	}
	if (cmds) { 
		sendHubCommand(new hubitat.device.HubMultiAction(delayBetween(cmds,500), hubitat.device.Protocol.ZWAVE))
	} else {
		logging "Sync End", "info"
		if (device.currentValue("syncStatus").contains("in progress")) { sendEvent(name: "syncStatus", value: "complete") }
	}
}

/*
#############################
## Configure, Updated etc. ##
#############################
*/
def updated() {
	logging "updated"
	cmds = []
	runIn(3,"syncNext")
	cmds << encapCmd(zwave.multiChannelV4.multiChannelEndPointGet())
	if ( getDataValue("serialNumber") == null ) cmds << encapCmd(zwave.manufacturerSpecificV2.deviceSpecificGet(deviceIdType: 0))
	cmds << encapCmd(zwave.versionV3.versionGet())
	return delayBetween(cmds,1000)
}

/*
###########
## Other ##
###########
*/
void logging(String text, String type = "debug") { if ( this["${type}Enable"] || this["${type}Enable"] == null ) log."${type}" text } 

/*
###################
## Device config ##
###################
*/
@Field static Map commandClassVersions = [0x5E: 2, 0x86: 3, 0x72: 1, 0x32: 3, 0x56: 1, 0x60: 3, 0x8E: 2, 0x70: 2, 0x59: 1, 0x85: 2, 0x7A: 2, 0x73: 1, 0x5A: 1, 0x98: 1]

@Field static parameterMap = [
	[key: "reportingThreshold", title: "Reporting Threshold", type: "enum", options: [0: "0 - disable", 1: "1 - enable"], num: 3, size: 1, def: 0, min: 0, max: 1],
	[key: "crcReporting", title: "CRC-16 reporting", type: "enum", options: [0: "0 - disable", 1: "1 - enable"], num: 13, size: 1, def: 0, min: 0, max: 1],
	[key: "group1", title: "Group 1", type: "number", num: 101, size: 4, def: 2, min: 0, max: 4210702],
	[key: "group2", title: "Group 2", type: "number", num: 102, size: 4, def: 1, min: 0, max: 4210702],
	[key: "group3", title: "Group 3", type: "number", num: 103, size: 4, def: 0, min: 0, max: 4210702],
	[key: "timeGroup1", title: "Group 1 time interval", type: "number", num: 111, size: 4, def: 5, min: 0, max: 268435456],
	[key: "timeGroup2", title: "Group 2 time interval", type: "number", num: 112, size: 4, def: 120, min: 0, max: 268435456],
	[key: "timeGroup3", title: "Group 3 time interval", type: "number", num: 113, size: 4, def: 120, min: 0, max: 268435456]
]

He also recommended the following parameters but I am sure they can be changed if needed.

Hope this is useful to someone!

It seems to have split the code into several sections above. If you cant follow it or put it back together I can send it to anyone interested.

3 Likes

Somehow, the code you provided isn't clean. There's a break and the forum software is formatting a section that makes it hard to read and copy/paste.

Any chance you can attach a text file or post it on github?

Thank you.

Try again... I didn't check the code, but formatted the post for easier copy/paste.

3 Likes

The same code tried to format a different way. Think the format is OK now.

/*
 *	Aeotec Home Energy Meter Gen 5
 *
 *	Copyright 2020 Artur Draga
 *	
 *
 */
import groovy.transform.Field 

metadata {
	definition (name: "Aeotec Home Energy Meter Gen 5 1P",namespace: "ClassicGOD", author: "Artur Draga") {
		capability "Energy Meter"
		capability "Power Meter"
		capability "Voltage Measurement"
		capability "Refresh"

		command "resetEnergy"
		
		attribute "syncStatus", "string"
		attribute "current", "number"
		
		fingerprint  mfr:"0086", prod:"0002", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0002", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
        fingerprint  mfr:"0086", prod:"0102", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0102", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
        fingerprint  mfr:"0086", prod:"0202", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A" 
		fingerprint  mfr:"0086", prod:"0202", deviceId:"005F", inClusters:"0x5E,0x86,0x72,0x32,0x56,0x60,0x8E,0x70,0x59,0x85,0x7A,0x73,0x5A,0x98" 
	}
	
	preferences {

		parameterMap.each {
			input (
				name: it.key,
				title: "${it.num}. ${it.title}",
				type: it.type,
				options: it.options,
				range: (it.min != null && it.max != null) ? "${it.min}..${it.max}" : null,
				defaultValue: it.def,
				required: false
			)
		}

		input name: "debugEnable", type: "bool", title: "Enable debug logging", defaultValue: true
		input name: "infoEnable", type: "bool", title: "Enable info logging", defaultValue: true}
}

def refresh(Integer ep = null) { 
	def cmds = []
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 2),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 4),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 5),ep)
	delayBetween(cmds,1000)
}

def resetEnergy(Integer ep = null) {
	def cmds = []
	cmds << encapCmd(zwave.meterV3.meterReset(),ep)
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0))
	cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),1)
	//cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),2)
	//cmds << encapCmd(zwave.meterV3.meterGet(scale: 0),3)
	delayBetween(cmds,1000)
}

/*
###################
## Encapsulation ##
###################
*/
def encapCmd(hubitat.zwave.Command cmd, Integer ep=null) { 
	logging "encapCmd: ${cmd} ep: ${ep}"
	if (ep != null) cmd = zwave.multiChannelV3.multiChannelCmdEncap(destinationEndPoint: ep).encapsulate(cmd) 
	if (getDataValue("zwaveSecurePairingComplete") == "true") cmd = zwave.securityV1.securityMessageEncapsulation().encapsulate(cmd) 
	return cmd.format()
}

/*
######################
## Parse and events ##
######################
*/
void parse(String description){
	logging "parse: ${description}"
	hubitat.zwave.Command cmd = zwave.parse(description,commandClassVersions)
	if (cmd) zwaveEvent(cmd)
}

def zwaveEvent(hubitat.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {
	logging "SecurityMessageEncapsulation: ${cmd}"
	def encapCmd = cmd.encapsulatedCommand()
	if (encapCmd) zwaveEvent(encapCmd)
	else logging "Unable to extract secure cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.crc16encapv1.Crc16Encap cmd) {
	logging "Crc16Encap: ${cmd}"
	def encapCmd = zwave.getCommand(cmd.commandClass, cmd.command, cmd.data, commandClassVersions[cmd.commandClass as Integer]?: 1)
	if (encapCmd) zwaveEvent(encapCmd)
	else logging "Unable to extract Crc16Encap cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelCmdEncap cmd) {
	logging "MultiChannelCmdEncap: ${cmd}"
	def encapCmd = cmd.encapsulatedCommand()
	if (encapCmd) zwaveEvent(encapCmd, cmd.sourceEndPoint as Integer)
	else logging "Unable to extract multi channel cmd from: ${cmd}", "warn"
}

def zwaveEvent(hubitat.zwave.commands.meterv3.MeterReport cmd, Integer ep=null) {
	logging "MeterReport value: ${cmd.scaledMeterValue} scale: ${cmd.scale} ep: $ep"
	switch (cmd.scale) {
		case 0: type = "energy"; unit = "kWh"; break; 
		case 1: type = "totalEnergy"; unit = "kVAh"; break;
		case 2: type = "power"; unit = "W"; break;	
		case 4: type = "voltage"; unit = "V"; break;
		case 5: type = "current"; unit = "A"; break;
	}
	if (ep == null) sendEvent([name: type, value: cmd.scaledMeterValue, unit: unit])
	else getChildDevice("${device.deviceNetworkId}-${ep}")?.sendEvent([name: type, value: cmd.scaledMeterValue, unit: unit]) 
}

def zwaveEvent(hubitat.zwave.commands.manufacturerspecificv2.DeviceSpecificReport cmd) { 
	logging "DeviceSpecificReport: ${cmd}"
	String sN = ""
	if (cmd.deviceIdType == 1 && cmd.deviceIdDataFormat == 1) {
		(0..14).each { sN += Integer.toHexString(cmd.deviceIdData[it]).toUpperCase() }
		updateDataValue("serialNumber", sN)
	}
}

def zwaveEvent(hubitat.zwave.commands.versionv3.VersionReport cmd) {	
	logging "VersionReport: ${cmd}"
	updateDataValue("firmwareVersion", "${cmd.firmware0Version}.${cmd.firmware0SubVersion}")
	updateDataValue("protocolVersion", "${cmd.zWaveProtocolVersion}.${cmd.zWaveProtocolSubVersion}")
}

void zwaveEvent(hubitat.zwave.Command cmd, Integer ep=null){ logging "unhandled zwaveEvent: ${cmd} ep: ${ep}", "warn" }

/*
########################
## Parameter Sync etc ##
########################
*/
def zwaveEvent(hubitat.zwave.commands.multichannelv3.MultiChannelEndPointReport cmd) {
	logging "MultiChannelEndPointReport: dynamic: ${cmd.dynamic} endPoints: ${cmd.endPoints} identical: ${cmd.identical}"
	if ( !childDevices && cmd.endPoints > 1 ) {
		(1..cmd.endPoints).each() {
			addChildDevice(
				"ClassicGOD",
				"Aeotec Home Energy Meter Child Device", 
				"${device.deviceNetworkId}-${it}", 
				[isComponent: false, name: "${device.displayName} (Clamp ${it})"]
			)	
		}
	}
}

def zwaveEvent(hubitat.zwave.commands.configurationv2.ConfigurationReport cmd) {
	logging "ConfigurationReport: ${cmd}"
	def paramData = parameterMap.find( {it.num == cmd.parameterNumber } )
	def previousVal = state."${paramData.key}".toString()
	def expectedVal = this["${paramData.key}"].toString()
	def receivedVal = cmd.scaledConfigurationValue.toString()
	
	logging "Parameter ${paramData.key} value is ${receivedVal} expected ${expectedVal}", "info"
	if (previousVal == receivedVal && expectedVal == receivedVal) { //ignore
	} else if (expectedVal == receivedVal) {
		logging "Parameter ${paramData.key} as expected"
		state."${paramData.key}" = receivedVal
		syncNext()
	} else if (previousVal == receivedVal) {
		logging "Parameter ${paramData.key} not changed - sync failed"
		if (device.currentValue("syncStatus").contains("in progres")) { sendEvent([name: "syncStatus", value: "wrong value on param ${paramData.num}"]) }
	} else {
		logging "Parameter ${paramData.key} new value"
		device.updateSetting("${paramData.key}", [value:receivedVal, type: paramData.type])
		state."${paramData.key}" = receivedVal
	}
}

def zwaveEvent(hubitat.zwave.commands.applicationstatusv1.ApplicationRejectedRequest cmd) {
	logging "Rejected Configuration!", "warn"
	for ( param in parameterMap ) {
		if (state."$param.key".toString() != this["$param.key"].toString()) {
			sendEvent(name: "syncStatus", value: "rejected request for parameter: ${param.num}")
			break
		}
	}
}

private syncNext() {
	logging "syncNext()"
	def cmds = []
	for ( param in parameterMap ) {
		if ( this["$param.key"] != null && state."$param.key".toString() != this["$param.key"].toString() ) {
			cmds << encapCmd(zwave.configurationV2.configurationSet(scaledConfigurationValue: this["$param.key"].toInteger(), parameterNumber: param.num, size: param.size))
			cmds << encapCmd(zwave.configurationV2.configurationGet(parameterNumber: param.num))
			sendEvent([name: "syncStatus", value: "in progress (parameter: ${param.num})"])
			break
		} 
	}
	if (cmds) { 
		sendHubCommand(new hubitat.device.HubMultiAction(delayBetween(cmds,500), hubitat.device.Protocol.ZWAVE))
	} else {
		logging "Sync End", "info"
		if (device.currentValue("syncStatus").contains("in progress")) { sendEvent(name: "syncStatus", value: "complete") }
	}
}

/*
#############################
## Configure, Updated etc. ##
#############################
*/
def updated() {
	logging "updated"
	cmds = []
	runIn(3,"syncNext")
	cmds << encapCmd(zwave.multiChannelV4.multiChannelEndPointGet())
	if ( getDataValue("serialNumber") == null ) cmds << encapCmd(zwave.manufacturerSpecificV2.deviceSpecificGet(deviceIdType: 0))
	cmds << encapCmd(zwave.versionV3.versionGet())
	return delayBetween(cmds,1000)
}

/*
###########
## Other ##
###########
*/
void logging(String text, String type = "debug") { if ( this["${type}Enable"] || this["${type}Enable"] == null ) log."${type}" text } 

/*
###################
## Device config ##
###################
*/
@Field static Map commandClassVersions = [0x5E: 2, 0x86: 3, 0x72: 1, 0x32: 3, 0x56: 1, 0x60: 3, 0x8E: 2, 0x70: 2, 0x59: 1, 0x85: 2, 0x7A: 2, 0x73: 1, 0x5A: 1, 0x98: 1]

@Field static parameterMap = [
	[key: "reportingThreshold", title: "Reporting Threshold", type: "enum", options: [0: "0 - disable", 1: "1 - enable"], num: 3, size: 1, def: 0, min: 0, max: 1],
	[key: "crcReporting", title: "CRC-16 reporting", type: "enum", options: [0: "0 - disable", 1: "1 - enable"], num: 13, size: 1, def: 0, min: 0, max: 1],
	[key: "group1", title: "Group 1", type: "number", num: 101, size: 4, def: 15, min: 0, max: 4210702],
	[key: "group2", title: "Group 2", type: "number", num: 102, size: 4, def: 0, min: 0, max: 4210702],
	[key: "group3", title: "Group 3", type: "number", num: 103, size: 4, def: 0, min: 0, max: 4210702],
	[key: "timeGroup1", title: "Group 1 time interval", type: "number", num: 111, size: 4, def: 60, min: 0, max: 268435456],
	[key: "timeGroup2", title: "Group 2 time interval", type: "number", num: 112, size: 4, def: 120, min: 0, max: 268435456],
	[key: "timeGroup3", title: "Group 3 time interval", type: "number", num: 113, size: 4, def: 120, min: 0, max: 268435456]
]
1 Like

i thinks it’s some unicode combination that’s causing it. I was able to copy/paste and the Driver code didn’t have errors when i saved it. fingers crossed.

Edit/Update: Working as expected. Thank you!

To properly format code, use the "Preformatted" option "</>" in the upper menu bar as shown in the picture below (or use ctrl + shift + C on your keyboard):

1 Like

I have the DSB28-ZWEU 3 Clamp which Vesternet sent by mistake, They gave me the option to keep it as they said it can be run with just 1 Clamp or could read three different circuits. Well, I tried to get one clamp working last night and didn't get a power led. Do all three power leads need power for the device to even turn on? Seems unnecessary.

Just tried this driver but it stays saying this: In progress (parameter 7) seems to be stuck. Any clue what this is?

Just looked at mine and it says rejected request for parameter: 13.

Never really paid much attention to it, it's has been working great for years now. I have been using this driver for around 3 years, since I switched it to from ST to HE. I have a gen2 not a gen5, bought it back in 2015 when I was still on the Iris system, before switching it to ST.

Try saving the settings again. Also make sure that the meter is on latest firmware.
Sometimes the z-wave device will reject regest when it's busy and you just need to retry, sometimes it will reject value if it's incorrect.

Also there are ports in this thread with possible solutions to your issue. I have not looked at this diver for years since it's working well for my 3 clamp meter.

I ended up simply removing the device completely, then I installed your driver, along with the child driver. So far, it's working great. Thanks for providing this driver.

Does the child driver have to be installed in order to get readings from clamp 1 and 2?

I know this is a old thread but wanted to put this out there for anyone else struggling with this device like I have for years.

Look into the Iotawatt device. It's pretty much a standalone unit, but there is a driver to pull details into hubitat. It also natively supports uploading to influx or whatever database you run.

If you can get the HEM working, you can install and setup one of these. I wish I discovered it sooner.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.