Sync Virtual Lock to Contact Sensor

I’m using a contact sensor (Visonic MCT-340E) to monitor the status of a dumb deadbolt. I’d like to have it show up as a lock in ST, mostly so it comes up alongside my Kwikset 910 in SHM status. Is there a way to do this?

  • I tried the Universal DT Translator but it seems to be set up to go in the opposite direction.
  • I looked at modifying a DTH but I didn’t know what to use as a template.
  • I created a virtual lock with type “Lock Capability” and tried to sync it using a webCoRE piston (my first), but all it does is send a lock/unlock command, the status is never set. Do I need another piston to act as the “guts” of the lock? Am I approaching this all the wrong way? I’m hoping this is simple enough to get an answer here instead of setting up a new account on the webCoRE forum.

I can’t say if this is the easiest, but it would be the approach I would try first, if I understand your requirement correctly.

Here is the code for the Visonic contact sensor (might be old). You can add Capability “Lock” to it and update the parse() method to sendEvent “locked” / “unlocked” as appropriate, whenever it also sends “closed” / “open”.

Thanks - I’ll try that tonight.

how do you have the sensor set up to monitor the status of the deadbolt?

Very crudely - the contact sensor stuck on the face of the door and the magnet on the end of the deadbolt knob. Eventually I’ll either embed a switch in the doorjamb or replace the lock with a smart lock, but for now this was an easy way to save myself a trip downstairs to check the status at bedtime (at least, it was easy until I spent two hours messing around trying to make it show up as a lock).

Someone did modify the code for this visonic sensor already. I don’t see lock but pretty sure the author would help.

1 Like

Hi, I updated the DTH to support lock function. Try the new version 01.06 to see if you have problem.
Just follow the link from Navat604 above.

2 Likes

Thanks! I was working on adding it myself and I think I got most of the way there, but I was still working out what to do with the “updating” section. This hack will have high WAF!

No problem. Enjoy. You are almost there. The update section is kind of messy since adding new function will need to modify all the existing function types.

1 Like

Finally got around to getting a photo of my short term solution:

15238346579037487677375224439408

1 Like