Door lock(ed) MQTT sensor

I wanted a door lock sensor so that i can see if the door is locked. Our door has three bolts and two of them come out of the door and hook into the frame:

This is known as a ‘driepuntssluiting’ in the netherlands.

I wanted to make use of the fact that the hook moves downwards when the door is locked.

I placed two combined dip switches in the frame and connected them to a low power MySensors compatible switch node.

Parts i used:

I glued together two switches and added a small plastic plate to the levers. I placed them inside the frame like this:

The switch node is placed on the inside of the frame like this:

I connected the node to my MySensors gateway and if the state of the lock chenges, a MQTT message is sent to Mosquitto and it’s picked up from thre by Home assistant.

The node runs a couple of weeks now and it’s pretty stable. It works very reliable.

2 Likes

hey there
any chance you could share some photos of your state card and your configuration

Sorry, missed this one…

Configuration is simple:

- platform: mqtt
  state_topic: 'mysensors-out/78/1/1/0/3'
  name: Deur
  payload_on: "1"
  payload_off: "0"

Card is even simpeler:

Quick question - why TWO sensors glued together?

These microswitches are really narrow (5.7mm) and two together makes the chance that they are correctly pressed, bigger.