Aeon Labs DSB04100-ZWUS - Z-Wave Door & Window Sensor - "Z Wave Z-Wave Door/Window Sensor" type and Tamper

I’ve got a bunch of these sensors. Some of them have a habit of falling off the door (using the double sided adhesive pads :smile:) which should trigger the tamper alarm.

When installed, they are detected as generic Z-Wave Door & Windows sensors - that device type template code seems to detect and process Alarm z-wave messages, but doesn’t actually set the alarm capability - or even include it.

I’ve made a modified version that should set the tamper flag if the alarm triggers. Once I verify it is working (I’m not at the house, so I can’t test the changes by pulling off a sensor!) I’ll post the trivial change, should anyone want to detect their sensors falling off/being tampered with.


We’ve requested / proposed an official new Capability (“Tamper Alert”) to be added to the Taxonomy. This could help ensure more frequent and consistent implementation of this type of status into Device Handlers (for device types that have the actual ability).

No update from @duncan or @Ben or @April as to when we could expect new Capability requests to be put on the ST timeline, yet.

That sounds like a great idea. For now, I am happy to be able to detect "sensor fell off’ vs “door open” - since I’m not at the house when it happens.


It’s funny you should say that, I installed mine around 3 months ago and it just fell off in my face. Didn’t hurt but scared the bejezuz out of me.


Ok, I’ve had a chance to work on this a bit, and I like what it’s doing :smile: At least now I can guess that if the log shows a door sensor “tampered” and then “open” odds are fairly good the sensor just fell off. Especially if there is no motion in the house.

Edit: Still having issues clearing the Alarm once triggered, so there’s still something not quite right here. I’ll update it when I figure out what I’m doing wrong.

Edit2: fixed. use sendEvent not createEvent in reset code. Updated below Duh.

Modified Device UI - Normal state:

Tampered state:

At least for the Aeon device, it sends the Tamper alarm message when the tamper switch is activated (ie, it falls off) but does not send a secure message when its tamper switch is depressed. I’ve coded the device so the “tampered” state is a button - pressing it resets the alarm value to secure. Once you put your sensor back on the door, tap the button…

Changes from generic Z-Wave Door/Window Sensor.

Replace metadata() section

metadata {
    // Automatically generated. Make future change here.
    // add support for Aeon Labs DSB04100-ZWUS tamper sensor
    definition (name: "Z-Wave Door/Window Sensor With Tamper", namespace: "smartthings", author: "SmartThings") {
        capability "Contact Sensor"
        capability "Sensor"
        capability "Battery"
        capability "Configuration"
        capability     "Alarm"

        fingerprint deviceId: "0x2001", inClusters: "0x30,0x80,0x84,0x85,0x86,0x72"
        fingerprint deviceId: "0x07", inClusters: "0x30"
        fingerprint deviceId: "0x0701", inClusters: "0x5E,0x86,0x72,0x98", outClusters: "0x5A,0x82"
        command "reset" // reset tamper state

    // simulator metadata
    simulator {
        // status messages
        status "open":  "command: 2001, payload: FF"
        status "closed": "command: 2001, payload: 00"

    // UI tile definitions
    tiles {
        standardTile("contact", "", width: 2, height: 2) {
            state "open", label: '${name}', icon: "", backgroundColor: "#ffa81e"
            state "closed", label: '${name}', icon: "", backgroundColor: "#79b821"
        valueTile("battery", "device.battery", inactiveLabel: false, decoration: "flat") {
            state "battery", label:'${currentValue}% battery', unit:""
        standardTile("tamper", "device.alarm") {
            state("secure", label:'secure',    icon:"st.locks.lock.locked",   backgroundColor:"#ffffff")
            state("tampered", label:'tampered',  action:"reset", icon:"st.locks.lock.unlocked", backgroundColor:"#53a7c0")

        main "contact"
        details(["contact", "battery", "tamper"])

and replace zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd) function with these two functions:

// add tamper alarm
// The Aeon seems to only send the tampered message 
// Make the TAMPER tile a button. Pressing it clears the Tamper state
def zwaveEvent(physicalgraph.zwave.commands.sensoralarmv1.SensorAlarmReport cmd)
    if (cmd.sensorState) {
        createEvent(name: "alarm", value: "tampered", descriptionText: "$device.displayName has been tampered with")
    else {
        createEvent(name: "alarm", value: "secure", descriptionText: "$device.displayName is secure")

def reset() {
        sendEvent(displayed: true,  isStateChange: true, name: "alarm", value: "secure", descriptionText: "$device.displayName reset to secure")
// end tamper alarm

Sensor fell off last night :smile:
Tamper fired. Only thing I noticed is the message for the activity log isn’t working as I thought, it shows “open” twice, not alarm and then open.


I think they’re falling off by design, mine fell off again last night… Time to start investigating replacement adhesives. I could screw it in but I don’t want to permanently damage the door if I take it with me if and when I move.

A drop of Clear silicone solve this problem for me. You can get a small tube at home depot for a couple of bucks. Way better to do than screws. Especially on metal or vinyl frame.

1 Like

This sounds like a great plan, will try it!

1 Like

Hello , I have same multi sensor door/window can you please let me know how to add this thing to smartthings? i cant do myself

Guys how to add this device to ST?