Help to modify the default DH for Z-wave Door/Window Sensor

Hi! :slight_smile:
I have a Telldus Door/Window magnet sensor (15110) with a tamper switch on the back and need some help to make the tamper work as an extra switch to be able to automate other devices.
(I wanna use it to monitor a door for both open/closed state as well as locked unlocked state via modifying the tamper lever switch)

I use the default “Z-wave Door/Window sensor” example device handler and it works almost as intended, except that it automatically clears the tamper alarm after 10 seconds in up state and thats the problem I need help solving. I want to be able to see if the tamper switch is in down or up state all the time.

I know there are a lot of supersmart people on this forum and that its probably easy to modify the DH code but I dont have the skills (I have tried but with no success) so now Im asking you all for help :slight_smile:

Facts:
Sensor: Telldus Door/Window Sensor 15110

Log output is as follows…
Door opens:

debug parsed 'zw device: 25, command: 8003, payload: 64 ’ to [[name:battery, unit:%, value:100, linkText:Telldus Door Sensor 15110, descriptionText:Telldus Door Sensor 15110 battery is 100%, isStateChange:false, displayed:false]]

Door closes:

debug parsed 'zw device: 25, command: 8003, payload: 64 ’ to [[name:battery, unit:%, value:100, linkText:Telldus Door Sensor 15110, descriptionText:Telldus Door Sensor 15110 battery is 100%, isStateChange:false, displayed:false]]

Tamper pushed down:

debug parsed 'zw device: 25, command: 7105, payload: 00 00 00 FF 07 00 01 03 00 ’ to [[name:tamper, value:clear, linkText:Telldus Door Sensor 15110, descriptionText:Telldus Door Sensor 15110 tamper is clear, isStateChange:false, displayed:false]]

debug parsed 'zw device: 25, command: 8003, payload: 64 ’ to [[name:battery, unit:%, value:100, linkText:Telldus Door Sensor 15110, descriptionText:Telldus Door Sensor 15110 battery is 100%, isStateChange:false, displayed:false]]

Tamper pulled up:

debug parsed 'zw device: 25, command: 7105, payload: 00 00 00 FF 07 03 00 00 ’ to [[name:tamper, value:detected, descriptionText:Telldus Door Sensor 15110 was tampered, linkText:Telldus Door Sensor 15110, isStateChange:true, displayed:true]]

debug parsed 'zw device: 25, command: 8003, payload: 64 ’ to [[name:battery, unit:%, value:100, linkText:Telldus Door Sensor 15110, descriptionText:Telldus Door Sensor 15110 battery is 100%, isStateChange:false, displayed:false]]

If its possible to clean out the “reset tamper to clear” in the Smartthings IDE "Z-wave example code it would solve my problem.
Please tell me if I should provide the code for the Z-wave Door/window sensor below (Its the same code that you get in the Samsung Groovy IDE when trying to create a new DH from example)

If anyone could help it would mean the world to me.
Kind regards and thanks in advance!

It’s good to have you back, @aquastealth!
I believe this schedule is the one that clears the tamper event after 10 seconds:
You can change the value 10 in runIn() (this value must be in seconds). If you want it to clear the event after 5 minutes, you can use 60*5

Hello Nayely and thanks you for a quick reply. :slight_smile:
Thats a great idea and I actually modified it even more by deleting the full row so that it wont reset at all.
I also deleted the row saying that if the device have been inactive for a long time (482 minutes) it will reset to clear.
So far it seems to work but at the same time I have now idea if any of my edits could cause the device to freeze or work poorly after some time or for no reason so I will have to test it out for a longer period of time.

Im also interested in changing the code so that the capability “Tamper Alert” will instead be closed/open or even better locked/unlocked instead of tamper clear/tampered but that may cause other devices or functions in smartthings to break I guess so I don’t dare?

Up to now, you cannot edit the options that belong to a standard Capability.
You can use the capabilities Contact Sensor or Lock instead, but you will have to:

  • Add the capability to your custom DTH (in metadata)
    • Here you have to change the events that belong to tamper to send them to the new capability
  • Create a device-config to get a VID (device presentation)
    • This device-config generator can help you out. (it only provides the structure)
  • To avoid cache issues, you need to create a new DTH and assign the new VID. Eg:
 definition(name: "DTH 2", ... , vid: "xxxx-xxxx-xxxx", mnmn: "SmartThingsCommunity") {

You can also create a custom capability to custom the capability states. Here’s a tutorial on how to create them:

Let me know if you have any questions. :grinning_face_with_smiling_eyes:

Hello again Nayely and thanks for your kind reply and for putting your time and effort into solving this.
I will try to make a separate new DHT based on your info so that I don’t break the one I have already edited.
I can’t pomise that I will get it to work but I’ll do my best :slight_smile:

I think a lock cabability would be great for my need so I’ll try with that option first.

I really appreciate your help, its thanks to you and others on this forum that things that seem impossible suddenly becomes possible :blush:

I’m happy to help @aquastealth! :smiley:
I’m always around so, if you have any other questions, remember you can mention me and I’ll gladly help you out.

Thanks for such a friendly gesture, I appreciate it a lot and will for sure keep it in mind. :slight_smile:

1 Like