close-circle
Close
0%
0%

CarontePass: Open Access Control

CarontePass is an access control designed for collaborative spaces. Ideal for Hackerspaces, Makerspace, FabLabs, Hacklabs...

Similar projects worth following
close
CarontePass is an access control designed for collaborative spaces where there is much movement of people and it is impossible that all people have conventional physical key. Ideal for Hackerspaces, Makerspace, FabLabs, Hacklabs...

Open Source, Open Hardware, Low Cost, Easy!

It supports Telegram.

The project is based on a client-server structure, where you have a single server (In Raspberry Pi 2) and clients are the doors.

As a client can stay a Raspberry Pi or ESP8266 Wifi.

Clients connect to wifi and establish communication through a REST API made with Django and Django REST framework that is in the server. As it is a very delicate service the idea is not to have the server on the Internet but in the local area.

The system creates a URL with the tag received by the reader and asks the server. Checks whether the tag has a user and if you have access permissions (as can be if the current monthly payments) to activate the relay which opens the door.


The system has stored users, which can be assigned different access tag.
As for areas where there are partners, you can specify whether the user is aware of your payments on time to access.
When entering or leaving a log is saved with the date and time.

It has integration with bot telegram that you can ask if the space is open or closed, which users inside or in the future, open the door or integrate other sensors IOT.

From telegram sends an open or closed to a group telegram to your users know when entering and leaving the last user site. Also send a personalized message to each user to enter or leave the space.

  • 1 × Raspberry Pi 2 For Server
  • 1 × ESP8266 (Wemos D1 Mini) For Client 1
  • 1 × RC522 (RFID and NFC lector) For Clients
  • 1 × Relay Module For Clients
  • 1 × Electric Lock For Clients

  • Hardware with 2 rfid RC522

    torehc03/29/2016 at 13:19 0 comments

    This is important for a reader on the side of the entrance door and another on the side of the exit.

    Code Github

    I leave the scheme has finally worked:

    carontepass-two-rc522_bb

    PINOUT:

    WEMOS D1 MINI BOARDCONECT TO PIN
    PINFUCTIONESP-8266 PINRC522RELAY
    3.3VPOWER3.3V3.3V
    5VPOWER5V VCC
    GNDGNDGNDGNDGND
    D13SCKGPIO-14SCK
    D12MISOGPIO-12MISO
    D11MOSIGPIO-13MOSI
    D8SS (SDA)GPIO-15SDA - 1
    D3IOGPIO-0RESET - 1
    D8SS (SDA)GPIO-15SDA - 2
    D0IOGPIO-16RESET - 2
    D4IOGPIO-2 IN1


    Testing bench:

    IMG_20160329_010017

  • Hardware Scheme

    torehc03/29/2016 at 13:00 0 comments

    Here you can find everything you need for mounting hardware part of clients (doors).


    Assembly diagram
    :

    carontepass-rc522

    PINOUT:

    WEMOS D1 MINI BOARD CONECT TO PIN
    PIN FUCTION ESP-8266 PIN RC522 RELAY
    3.3V POWER 3.3V 3.3V
    5V POWER 5V
    VCC
    GND GND GND GND GND
    D13 SCK GPIO-14 SCK
    D12 MISO GPIO-12 MISO
    D11 MOSI GPIO-13 MOSI
    D8 SS (SDA) GPIO-15 SDA
    D3 IO GPIO-0 RESET
    D0 IO GPIO-16
    IN1

    Schema Wemos D1 Mini:

    mini

    Technical specs

    Microcontroller ESP-8266EX
    Operating Voltage 3.3V
    Digital I/O Pins 11
    Analog Input Pins 1(Max input: 3.2V)
    Clock Speed 80MHz/160MHz
    Flash 4M bytes
    Length 34.2mm
    Width 25.6mm
    Weight 10g

    WeMos D1 mini

    Pin

    Pin Function ESP-8266 Pin
    TX TXD TXD
    RX RXD RXD
    A0 Analog input, max 3.3V input A0
    D0 IO GPIO16
    D1 IO, SCL GPIO5
    D2 IO, SDA GPIO4
    D3 IO, 10k Pull-up GPIO0
    D4 IO, 10k Pull-up, BUILTIN_LED GPIO2
    D5 IO, SCK GPIO14
    D6 IO, MISO GPIO12
    D7 IO, MOSI GPIO13
    D8 IO, 10k Pull-down, SS GPIO15
    G Ground GND
    5V 5V
    3V3 3.3V 3.3V
    RST Reset RST

    All IO have interrupt/pwm/I2C/one-wire supported(except D0)

    Warnings

    All IO is work at 3.3V.

  • Access API (current operation)

    torehc03/27/2016 at 16:27 0 comments

      Here's how it works now, now asks username and password to access the info.

      But I'm already working on a version with access token and under https.


      By raising the project I thought many ways to do it, but the scalability thinking I was left with the option of that clients (doors) to be as "dumb / simple" possible.

      To achieve this required a part of the powerful server, so I chose Django and ... How to have N doors? How to make it cheaper-single doors possible?

      The easy thing would have been to put a guy Raspberry Pi computer-door, but that was not what I wanted (if it was the easiest).

      The best option I found was to make an API, which could use different technologies to clients but to run only need an Internet connection to make inquiries.


      How does it work now?

      A web request to the url defined in Django project is:

      yourdomain/api/1/device/code

      Explanation:

      1. The client (a door) NFC reader reads and gets the tag.
      2. That tag puts it in "code" and makes the previous request.
      3. The server parses the url, receives the "code" and searches the table of "devices" where all tag IDs are stored.
      4. The tag is an associated usaurio so already has the identidicación.


      Here is an example:

      django-admin-device

      There are a user with Tag "123456" of the NFC type. Passing this NFC reader gets the Tag creates the url and makes the web request:

      yourdomain/api/1/device/123456

      For the answer we will have to authenticate:

      django-api-auth

      If you have access to the API devuleve following the Django framework REST:

      django-api-response

      Responds to the request in JSON format, we parser on the client to get the data that interests us.

      For example, to activate the relay to open the door should be fixed in the "result" field. If the user meets the access requirements will result "True" and the relay will be activated.

      Now security is not the maximum possible from my point of view, so I'm studying how to implement HTTPS.


      Other forms of access


      The project leaves open the possibility to add different forms of access.

      One may be for Telegram, having the only Chatid each user could search for it using the "/ open" command Bot Telegram. I like it because it is a safe and smart way to enter a space with any device that has application without any extra hardware card carry any type NFC / RFID, etc ...


  • Support for Telegram

    torehc03/24/2016 at 16:39 0 comments

    La gran evolución de Telegram en apenas dos años

    I edit the database by adding a table related to the user and the Chatid field that is used by Telegram to identify users.

    Improved Admin to see the table Telegram and created the "message_detect_tag" class in the models to detect if the user enters or leaves the space and thus send a personalized greeting or farewell.

    This message system is independent of bots Telegram to fall if continue to send these "simple" messages.
    Also warns a group of Telegram when the first user (Site Open) enters or exits the last (Closed Site).

    Add the Bot Telegram, programmed in python using the TelegramBotApi.

    This includes Bot functions:
    • Know if the space is open or closed by the command "/status".
    • Return a list of users who are within the space at that moment in the command "/users_in".
    • (Coming soon) Option to open the doors using the command "/open" to persons authorized to do this.


    Can you think of a new option?

    TelegramBot

  • Back-end (Django Web)

    torehc03/24/2016 at 15:28 0 comments

    Today I want to show the "engine" of the project management section Django.


    In it you can manage everything related to user management (personal data), user fees, the tags with which they can access the space, the table chatid of Telegram, system messages and access logs ( logs).

    It also allows the creation of groups and give special permissions to users, but this for later, so that the member of a group to be allowed access to a restricted space to rest.



    The database has the following structure:

    Therefore when signing the Django Admin see ...


    Then we will see each section separately to have more detail the operation of the system.


    Devices: Devices that can be accessed. There may be several types and number per person.


    System Logs: View a record with dates of inputs and outputs of users. See also allows simple so that users are in space at that time.


    Messages: Topic to manage messages. These can be of various types.

    When entering or leaving a user searches for a message of that type (input or ouput) and sent it by Telegram, it is a good way to surprise with the user every time you pass your tag to enter or exit.


    He also writes a group of Telegram when entering the first or the last saying out if the site is closed or open.


    Payments: As spaces is very crowded, usually have partners who have monthly fees. This is a way to control salt in if the user is aware of your payments.


    Telegram: This table is used to store chatid providing users if they want to receive personalized messages.

    In the future it will also serve to give physical access to space just write "/ open" to the bot Telergam.


    Users: Personal information of usaurios. Nicks, name, email, password, etc ...


View all 5 project logs

Enjoy this project?

Share

Discussions

hugo wrote 05/03/2017 at 17:29 point

Hello, is it some instruction for how to install software on raspberry side?

  Are you sure? yes | no

Anool Mahidharia wrote 01/25/2017 at 10:12 point

Do you have a link or specific model no for the RC522 (RFID and NFC lector) ? I'm trying to build a system for our local maker space.

  Are you sure? yes | no

torehc wrote 01/25/2017 at 10:58 point

Hi! You can use any rfid-rc522 model, get the cheapest from Aliexpress or Ebay.
If you have any question you can open a issues in the github of the project.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates