You can probably get the AI agent of your choice to code a suitable driver. Here's one from Gemini that permits the contact status to be inverted and also implements configurable debouncing.
You can, if you wish, try this out. It will probably need a few iterations of feedback & vibe-coding to get it work perfectly for your needs.
/**
* Ecolink DWZWAVE2.5-ECO Custom Driver (with Inversion and Debounce)
* Source/Reference: Hubitat Developer Guidelines
*/
metadata {
definition (name: "Ecolink DWZWAVE2.5-ECO Custom", namespace: "custom", author: "Community AI", importUrl: "") {
capability "ContactSensor"
capability "Battery"
capability "Configuration"
capability "Refresh"
attribute "tamper", "string"
// Fingerprint for the Ecolink DWZWAVE2.5-ECO
fingerprint mfr: "014A", prod: "0004", deviceId: "0002", inClusters: "0x5E,0x86,0x72,0x30,0x71,0x35,0x70,0x85,0x59,0x84,0x7A,0x80"
}
preferences {
input name: "invertContact", type: "boolean", title: "Invert Contact Status", description: "If enabled, open reports as closed and closed reports as open.", defaultValue: false
input name: "debounceDelay", type: "number", title: "Debounce Delay (ms)", description: "Time in milliseconds to wait before committing state change. Set to 0 to disable.", defaultValue: 0
input name: "logEnable", type: "boolean", title: "Enable debug logging", defaultValue: true
input name: "txtEnable", type: "boolean", title: "Enable descriptionText logging", defaultValue: true
}
}
// Parse incoming messages from the device
def parse(String description) {
if (logEnable) log.debug "parse description: ${description}"
def cmd = zwave.parse(description, [0x20: 1, 0x30: 1, 0x71: 3, 0x80: 1, 0x84: 1])
if (cmd) {
return zwaveEvent(cmd)
} else {
log.warn "Could not parse description to Z-Wave command: ${description}"
return null
}
}
// Handle Sensor Binary Reports (Alternative open/close method)
def zwaveEvent(hubitat.zwave.commands.sensorbinaryv1.SensorBinaryReport cmd) {
if (logEnable) log.debug "SensorBinaryReport received: ${cmd}"
def rawValue = (cmd.sensorValue == 0xFF) ? "open" : "closed"
processContactEvent(rawValue)
return null
}
// Handle Notification Reports (Standard modern Ecolink open/close & tamper)
def zwaveEvent(hubitat.zwave.commands.notificationv3.NotificationReport cmd) {
if (logEnable) log.debug "NotificationReport received: ${cmd}"
// Access Control (0x06) manages the contact state
if (cmd.notificationType == 0x06) {
if (cmd.event == 0x16) {
processContactEvent("open")
} else if (cmd.event == 0x17) {
processContactEvent("closed")
}
}
// Home Security (0x07) manages Tamper
else if (cmd.notificationType == 0x07) {
if (cmd.event == 0x03) {
if (txtEnable) log.info "${device.displayName} tamper detected"
sendEvent(name: "tamper", value: "detected", descriptionText: "${device.displayName} tamper detected")
} else if (cmd.event == 0x00) {
if (txtEnable) log.info "${device.displayName} tamper cleared"
sendEvent(name: "tamper", value: "clear", descriptionText: "${device.displayName} tamper cleared")
}
}
return null
}
// Handle Battery Reports
def zwaveEvent(hubitat.zwave.commands.batteryv1.BatteryReport cmd) {
if (logEnable) log.debug "BatteryReport received: ${cmd}"
def val = cmd.batteryLevel == 0xFF ? 0 : cmd.batteryLevel
if (txtEnable) log.info "${device.displayName} battery is ${val}%"
return createEvent(name: "battery", value: val, unit: "%", descriptionText: "${device.displayName} battery is ${val}%")
}
// Process state changes including inversion and debounce filtering
def processContactEvent(String rawValue) {
// 1. Apply inversion rules if preferred
def targetValue = rawValue
if (invertContact == true) {
targetValue = (rawValue == "open") ? "closed" : "open"
if (logEnable) log.debug "Inversion active. Raw value: ${rawValue} changed to: ${targetValue}"
}
// 2. Check if the incoming state is actually a change to prevent repeating events
if (device.currentValue("contact") == targetValue) {
if (logEnable) log.debug "Contact state is already ${targetValue}, filtering out event."
unschedule("commitDebouncedContact") // Cancel any pending conflicting debounce triggers
return
}
// 3. Handle Debouncing logic
int delay = debounceDelay ? debounceDelay.toInteger() : 0
if (delay > 0) {
if (logEnable) log.debug "Debounce active. Scheduling execution of state [${targetValue}] in ${delay}ms"
// Store target state in transient state to pass into the execution handler safely
runInMillis(delay, "commitDebouncedContact", [data: [value: targetValue]])
} else {
// Instant execution if delay is 0 or unassigned
commitDebouncedContact([value: targetValue])
}
}
// Handler execution tasked by Hubitat's job scheduler
def commitDebouncedContact(Map data) {
def finalValue = data.value
if (txtEnable) log.info "${device.displayName} is ${finalValue}"
sendEvent(name: "contact", value: finalValue, descriptionText: "${device.displayName} is ${finalValue}")
}
// Catch-all fallback for unhandled commands
def zwaveEvent(hubitat.zwave.Command cmd) {
if (logEnable) log.debug "Unhandled Z-Wave command: ${cmd}"
return null
}
def refresh() {
if (logEnable) log.debug "refresh()"
return [
zwave.batteryV1.batteryGet().format(),
zwave.sensorBinaryV1.sensorBinaryGet().format()
]
}
def configure() {
if (logEnable) log.debug "configure()"
return refresh()
}
def updated() {
log.info "Updating settings..."
if (logEnable) log.debug "Current preferences - Invert: ${invertContact}, Debounce: ${debounceDelay}ms"
if (!state.configured) {
state.configured = true
return configure()
}
return null
}