Home made door lock sensor

project_locks
project_sensors

(David Tucker) #1

I’m looking to build a door lock sensor which will be based on a microswitch buried into the rebate on the door, that switches when the deadbolt is extended into the cavity.

The question is, how to get the state of that microswitch reported back to SmartThings? one option I looked at already is the Fibaro FGK-101 which is a z wave contact sensor with an extra set of screw terminals inside allowing a NC or NO external switch to be wired in…almost perfect, but if the extra terminals are used the regular contact sensor does not function, which seems a waste.

I also wondered if this could be done with a Raspberry Pi, since I have an unused one, and that could perhaps become a multiple sensor used as a doorbell, lock sensor (as above), motion detector, mail delivery sensor, door camera, BLE beacon etc.

What do you think - any better suggestions out there?

edit: I should also add that I am a UK user

edit: I am marking this solved as I am returning my SmartThings kit due to lack of useable functions at this time in the UK. I may be back !


New(?) Way To Monitor A Deadbolt Lock
Best inexpensive door lock?
Report Locked Unlocked Status Larson Storm Door 3-Point Lock
Monitor Regular 4 burner gas stove
#2

ThingShield. It’s a bridge between and arduino and smartthings. Very popular for just this kind of project. It’s what many of the makers use.

You’ll find most of them in the following topic. This is a clickable link.

Also see the pressure mat topic. There’s discussion there on connecting contacts sensors to other devices.


(David Tucker) #3

Thanks @JDRoberts for those ideas. Unfortunately I cannot source any of those products in the UK…I will try and edit my original post to show I am in UK. Cheers


#4

I believe the Thingshield uses zigbee, it should be the same for all countries unless you can’t get compatible Arduinos.


(David Tucker) #5

No problem getting Arduinos, and yes zigbee would be fine…but Samsung does not ship Thingshield to UK. One guy on UK eBay is trying to sell one for $100 !


#6

Yikes! Must have some “no export” technology, then, some of the encryption technology falls into that. Or it may be boosted zigbee. That does make it more challenging.

Perhaps check with some of the maker groups in the UK to see what they use for Zigbee or Z wave communication. Zigbee needs to use the zigbee home automation protocol, 1.2, usually abbreviated ZHA 1.2

You could also check with robotics groups, but they’re more likely to use the zigbee green energy profile, which is not compatible with SmartThings.

Based on something someone else said earlier today, mysensors might be a European option, but no one is written an interface yet so you’d have a pretty big project. The people in the thingshield topic could probably help.


#7

@djtucker @JDRoberts,

I used an Ecolink zwave sensor and a tiny microswitch that I mounted inside the lock itself. I also created a device type for it as well. Needs a little cleaning up, but it works:


Security Issue with a Fifteen Exterior Door Church
#8

John - I really liked your solution for checking if the door is locked - do you have any further pictures/tips on how I could go about making this? Would most sensors work this way? I’m good with prying open electronics and soldering wires and hope to engineer something like this as well.


(Kevin) #9

@shashvat - GoControl WADWAZ-1 sensors (and Ecolink?) have internal screw terminals so you don’t have to do any soldering in the sensor. I had some wired contact sensors with my previous home automation system and used those rather than mounting the GoControl

@johnconstantelo - That is really slick! Could one sensor be used with magnet on door frame AND using the internal contacts for the lock as you did? Does/can the DTH report both separately? I thought about attaching magnet to my sliding door “bar” (1" dowel rod) to make sure it was in place since the “locks” on sliding doors are pretty much useless. Its pretty easy to shake the door up and down to unlock them (on cheap/older ones anyway).


#10

Thanks @shashvat. Those are the only 2 pictures I took, but they are big and you can zoom in to see a lot of detail. Click on the picture, and then click on it again to see it in it’s original size.

Here are some tips on doing this with a microswitch:

  • Use a thin and small microswitch like the one I used from Radioshack so that it fits within the turn knob’s housing. Take the housing with you if needed to make sure. Notice in the second picture where I had to use a plastic spacer to make sure the switch made good contact on the barrel.

  • Rotate the knob all the way to the locked position and tape it that position so it doesn’t move on you while placing the switch and the high tech piece of toothpick on the barrel. :wink:

  • Hot melt glue is awesome for a little project like this. Be careful not to get glue by the switch’s hinge or button. You want smooth operation.

  • Give yourself plenty of wire to work with, and don’t go too thin. You can accidentally cut the wires if you put the housing back on too tight. The extra wire you give yourself can easily be tucked away.

As @kevin said, the sensors that work best are the ones with screw terminals inside. The sensors I know of like that are Monoprice, GoControl, Ecolink, and Schlage. You could use something like an Iris sensor by soldering wires too where the reed sensor is, but that’s a lot of work in my opinion.

I believe there was a question about that somewhere in the Community in another discussion, and the answer was yes you can, and yes regarding the DH. Let me do some searching and I’ll post back the link as soon as I find it. Be right back…


#11

Found it! Sounds like the GoControl Contact Sensor may be the one to use.

I have a few of the Monoprice ones,so I may have to try this out for fun.


Old fashioned manual door lock - but is it locked?
(Ana) #12

Hello! I’m taking a subject of entrepreneurship and we have to present an idea to put in the market. My group thought about a keychain with a little light that warns us if we locked our front door or forgot. In case we forgot, the red light of the keychain will light up. Otherwise the light will be green.
We don’t have a deep understanding of electronics, but from what I searched I think the best way to do this would be with a piezoelectric sensor installed in the lock, so that when the door latch goes into the cavity, the sensor will be activated. I probably also need a arduino, right? To receive the information of the sensor.
My question is: what else do I need to send that information to the keychain? How can that be done?

What are the main components to do something like this?

If anyone could explain me just the basics, it would be a big help already.
Thanks.


(Ana) #13

Hello! I’m taking a subject of entrepreneurship and we have to present an idea to put in the market. My group thought about a keychain with a little light that warns us if we locked our front door or forgot. In case we forgot, the red light of the keychain will light up. Otherwise the light will be green.
We don’t have a deep understanding of electronics, but from what I searched I think the best way to do this would be with a piezoelectric sensor installed in the lock, so that when the door latch goes into the cavity, the sensor will be activated. I probably also need a arduino, right? To receive the information of the sensor.
My question is: what else do I need to send that information to the keychain? How can that be done?

What are the main components to do something like this?

If anyone could explain me just the basics, it would be a big help already.
Thanks.


(Douglas Krug) #14

NYCE sensors have been working on a way to do this, but have not released a product to date. A hub or bridge in between will be required to translate the communication type of the sensor to internet protocol. Examples are Bluetooth to IP, Zigbee to IP and Z-Wave to IP. A keychain is an idea that might have been better accepted some years ago, but with pretty much everyone in the world now caring a smartphone and home automation on track to be embedded in TV, set top boxes, kitchen appliances and voice assistants, the preferred notification device will be via smartphone.

The current sensors available from NYCE could be modified to sense a door has lock and they’re some of the smallest available with Zigbee radios built-in.

http://nycesensors.com/products/

There’s also a very small Z-Wave radio sensor called Strips. This video could show how a product like this could be made to react with the bolt of a lock interfering in the path of the sensor to indicate door locked/unlocked.


(Michele “Mike” Vinciguerra) #15

Hi there

I made something similar to this after seeing your post. I was using a Xiaomi door sensor.
The only hick-up I have is being able to edit the DH to make it say Lock and Unlocked instead of Open and Closed. I thought I could just take the door and change the Labels but it doesn’t seem that simple.

Any idea are appreciated.

Thanks
-mike


#16

Point me to the DTH you’re using and I can help.