Door monitor project made during IOT-Workshop

Door monitor project made during IOT-Workshop

Blog post by Leif Salminen and Sami Ryyppö

Made during:

We made an IOT-system with arduino that monitors doors using micro switches. In a typical apartment building with your outdoor and inner-door being close together, the system can figure out if you are coming or going. If the alarm is set, you can still leave the apartment without triggering it. The alarm will only trigger if someone tries to enter using the front door.

We 3d-printed a “case” for the project to make testing easier. We used an already made 3d model from thingiverse ( and modified it with Sketchup to add bottom layer and a place for the two micro switches. The print with the original size was just a little bit too small so the arduino, but was still usable.

One of the micro switches will monitor the outer-door and the other the inner-door. When someone opens the inner-door, then the outer-door, then closes the inner-door and after that closes the outer-door, we know they just left the apartment. This information can be sent to an server.

The arduino was connected to a pc by usb and pc had a python code listening the serial port and working as a link between the arduino and the server. The python code can be found on

Currently only the alarm is in use. Using a mobile application we can control the guardmode. The guardmode is part of the software that controls the alarm system. We can turn off the alarm without turning off the guardmode if needed. The mobile application is made with Framework7 and is in contact with the same backend that the arduino is. We were bit limited by the fact that we only had one variable to use in the backend. The backend was provided by

The really interesting part of the project is just how much data you can get from only two micro switches.

Parts used:

Funduino(Arduino) uno

2 X micro switches

4 X jumper cables

GitHub link to the code for the arduino:

Both arduino and the front end:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s