Door access using NFC

I am currently using an RFID based hardware to open my door at home. The problem is that the hardware is expensive and has only a serial port to configure the device and read the events. I am currently running OpenHAB on a Beaglebone Black and I’am curious if it would be possible to replace my existing door access system with OpenHAB and an NFC reader. These are my requirements to the system:

  • There is some space between my Beaglebone and the door, so the cable to the NFC reader should support lengths of about 10 to 20 meters and the device should be outdoor proofed.
  • The system should support normal NFC tags (e.g. to attach to a keyring) and tags sent by a Smartphone. (so that I can just send a key to a guest via e-mail etc.)
  • The system should record every access to my house and send an e-mail if an invalid nfc uid is used. (I think this should be possible using rules and persistence)
  • User management should be easy.

To open the door should be no problem. (For this I just have to switch a relais) I also found a thread where an NFC binding is disussed: Bindings for NFC-Reader, Fingerprint-Reader, Barcode-Scanner, Kodi (XMBC)

Has somebody already realized something like this with OpenHAB? What would be the best hardware for the NFC reader and are there any examples on how to configure such a system?

Update: I just found out that I can also use my existing hardware for this. I can set a configuration on my RFID reader so that every RFID number is sent out via serial port and I can also control the relais of the door via serial port from OpenHAB. So I would just have to disable all RFID’s on the device itself and handle the serial port data in OpenHAB and open the relais if a valid id is sent.

I tried to implement this using a map file which maps the id’s to the users name. If no mapping is found the door will not open. Are there maybe better ways to do this with OpenHAB?

I also tested how much time it takes until the id is checked via the rule and the door is opened and it takes about 2-3 seconds. Is there maybe a way to speed this up?

Update: I am now developing a new binding for my RFID reader which directly opens the door when a valid transponder detected. This way the door opens much faster because there is no delay calling the rule. The question now is only how I could implement a proper user management. I would prefere to store the user management in a mysql database. Or is there a better way to do this?

1 Like

That looks nice… did u manage to do it?
Im currently thinking of something similar.

Which RFID reader do you use?

Yes I was able to create a plugin for my Codatex transponder reader. I’am currently using this reader:

It also needs an additional power module and a TTL to RS232 converter. It works very good. The only problem is that a serial port and a separate cable for every door is required.

You can find my plugin code here: