From Whitespace (Hackerspace Gent)
Revision as of 04:07, 25 July 2010 by Sandb (Talk | contribs)

Jump to: navigation, search

Gatekeeper is a Python script that opens a gate when calling to +32493604143. It only opens the gate for whitelisted numbers. The hardware used:

  • A beagle board with a Debian based distro on, kindly donated by Bert.
  • A remote controller for the gate connected to the beagle board. The pinout on the beagleboard towards the remote:
    • Pin 24: white: steering, goes low (0v) when the remote needs to be activated, and high when the remote needs not be activated.
    • Pin 20: orange (or any other ubused 1.8v pin): continuous 1.8v.
  • A Huawei e220 GSM modem with a SIM card to perform caller ID. It is connected with the board using USB-serial.

Configuring Gatekeeper

The gatekeeper script can be found at /home/ubuntu/gatekeeper/ and is started at boot.

#setup logging
LOG_FILENAME = 'gatekeeper.log'
FORMAT = "%(asctime)-12s: %(levelname)-8s - %(message)s"
log = logging.getLogger("GateKeeper")

The whitelist file can be found Whitelist syntax

098098987 name
080989790 other name

Connecting to the BeagleBoard

The beagle board runs a debian based distro so it can be used as a general purpose server. If you want to do something with it ask for a login and sudo rights. Connecting with the board is possible using ssh. Internally it has as IP address, ssh on port 22 (default ssh port). Externally it is accesible with ssh on, port 2222.

Ideas, Feedback & Comments

Add your own!

  • We can make the door opening for all people on Thursday, and only for members on the others...? @Joren: Is this pythonable?
    • Something like that has been implemented: adding an empty line with * to the whitelist puts the script in public mode. In public mode everyone is allowed to open the gate when calling +32493604143. Removing the line with the wildcard puts the script in private mode, then only whitelisted members can open the gate.
  • We can sound a alarm when people try to open the door but are not allowed.