Doorman Arduino

Doorman Arduino is an open source project that controls the doors of your house. It uses a network connection and an Arduino to accomplish this function. As in domotic appliances, the main goal is to be in control of all your entrances (main door, garage door,…). On top of that, our goal is to achieve this functions without the need of any specialized software on the client side. A web browser is the only requirement to be able to control all the doors.

Doorman Arduino prototype

How does Doorman Arduino works?

The Doorman Arduino basic function is to open and close the different doors of your home. To do so, we open and close the electric circuits of  the house intercom. We use a set of relays to interface the door system. With the relays we are also electrically isolating the two circuits (intercom and Arduino) and any electrical problem that might arise from them.

The doorman Arduino have an Ethernet shield attached to Arduino Uno that allows connectivity to a wired network. In the prototype an Arduino Ethernet has been used instead of the shield to save some space in the final construction. There are no significant differences between using Arduino Ethernet and Arduino Uno + Ethernet shield other than the size and the price.

A web based server is implemented in the Arduino code, so Arduino (acting as a web server) accepts connections from external devices. Each time a client connects to the Arduino it is served a pre-programmed website. Buttons are showed in the website to enable the control of the open and closing actions. As many buttons can be included as doors we have in our home.

This is a screenshot of a web site working in my home network:

Doorman Arduino Webserver
Doorman Arduino Webserver Demo

In the next picture you can see a basic diagram of the system.

Doorman Arduino
Doorman Arduino connections diagram

There are times when the Arduino doorman server is called without the intention of opening doors. Also in other occasions communications can be broken so random actions can occur.  This cases can be for example:

  • when we refresh the web browser.
  • when we open the web browser and it opens itself to the last visited website.
  • when we press the back button reloading the last visited page.
  • when we have poor wireless signal.
  • when there are proxies in between the network.
  • when 2 clients are accessing the server at the same time.

To avoid all this situations I implemented a system of random seeds. Doorman Arduino generates a new random seed every time we load the main page. The seed will be valid to open or close the door one time. The seed is also passed to the client’s side so both seeds (client and server) have to match to be able to succeed. When the process of generating a new seed and opening a door is in the right order the seeds will match and the door will open. Otherwise an error will be generated.

Imagine that your web browser did cache the website and is calling it back from the memory. In this case client and server seeds won’t match and doors won’t open. Instead an error will be given and the main page re-loaded automatically. Then, a new random seed will be generated and the hole process will be restated in the right order.



Schematics can be found and reproduced looking to any tutorial on how to connect relays to Arduino. For example:

You can also buy a pre-made relays board and just connect them to Arduino.

Relay board for arduino
Relay board for arduino


Shields for Arduino are available at stores ready to plug in.

Remember that the Ethernet shield and also the Arduino Ethernet share some ports to control the network. This ports can not be used and must be left unconnected. In both the shield and the Arduino Ethernet ports are:


also pin 4 if you use the SD card

In the code you can easily change the ports that you will be using to control each relays.

Here is a pictures of the prototype I built as a proof of concept:

Doorman Arduino prototype
Doorman Arduino prototype



Due to lack of password and encryption of the communications the Doormen Arduino has no implemented security at all. The only security relies on the same network. So any attacker with access to the network will be able to gain control over the doors. Doorman Arduino is not intended as a secure method of controlling the doors in a residential house.

The installation of the Doorman Arduino is intended to be in a private network. Preferably without internet access. Of course, the network could be accessed remotely trough internet and a VPN tunnel securely. But we have to ask ourselves if it is really necessary to be able to open the doors from a remote location. Given the potential security risks of remote access that it’s not recommended.

Future developments

A password protected website would be a good future feature for adding an extra layer of security. A SHA5 encrypted password would be recommended along with a list of allowed devices via mac addresses control.

Also a Temperature sensor and Light sensor could be easily added to the board and have readings of the house.

With the use of external sensors we could also monitor the status of the doors so trigger alarms if a door has been left open.

The web server could also be read from the SD card instead of the memory of Arduino. This would make the task to update the server much easier. It would also allow for a better graphical interface with the extra space that the SD cards can provide.

Code repository

The code can be found in github here.

Doorman Arduino is a work inspired by the project The GarageUino

4 Responses to “ Doorman Arduino ”

  1. […] via Doorman Arduino – Doctor Bit's Projects | Doctor Bit's Projects. […]

  2. “Doorman Arduino is a work inspired by the project The GarageUino”.

    Nice work! Fun that I helped inspire yout to to this project, thanks for mentioning my project.

  3. Well done..But I have still question. I’ve bought relays (http://*********) but I don’t know how latching it better it make fixing dual coil or it doesn’t matter?

Leave a Reply