Door control system: Difference between revisions

From London Hackspace Wiki
(path for door wavs has changed slightly)
Line 31: Line 31:
* Run the "Add card to Doorbot" script on Tesla and follow the instructions (basically, swipe your card and then enter your login details).
* Run the "Add card to Doorbot" script on Tesla and follow the instructions (basically, swipe your card and then enter your login details).


* If you have a card reader get the code at [https://github.com/londonhackspace/Doorbot Github] and run <code>addcard.sh</code>.  If you have another reader that can give you the UID, log in to the website and add it at the [https://london.hackspace.org.uk/members/addcard.php secret page].
* If you have a card reader get the code at [https://github.com/londonhackspace/Doorbot Github] and run <code>addcard.sh</code>.  If you have another reader that can give you the UID, log in to the website and add it at the [https://london.hackspace.org.uk/members/addcard.php secret page]. Note that doorbot is case sensitive; enter the (hex encoded) ID using upper case letters only.


* If you have an Android phone that supports NFC you can use this App ([http://pointless.net/blog/2012/01/03/doorbot-app/ More details]):
* If you have an Android phone that supports NFC you can use this App ([http://pointless.net/blog/2012/01/03/doorbot-app/ More details]):

Revision as of 13:03, 24 October 2012

Preface

The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair.

- Douglas Adams, 'Mostly Harmless'

Overview

We have a Tikitag RFID reader, embedded in the door, which we use to automatically open the door when authenticated.


Doorbot diagram.png

Name

Named after Alexander Graham Bell.

See also: System naming

Details

The software runs on Bell, and its code is on Github. Bell is a tiny 1GHz Via Nehemiah, with Debian and very little hard disk space.

The access list is JSON file, downloaded from Turing.

The door opener broadcasts on the network whenever the door is opened or the bell is pressed.

There are listeners on Babbage that connect to robonaut to announce on IRC, and flash the lights using Lighted.

The announcement listener uses the GLaDOS voice. You can generate and use your own file as a greeting.

Adding a card

There are three ways to add a card:

  • Run the "Add card to Doorbot" script on Tesla and follow the instructions (basically, swipe your card and then enter your login details).
  • If you have a card reader get the code at Github and run addcard.sh. If you have another reader that can give you the UID, log in to the website and add it at the secret page. Note that doorbot is case sensitive; enter the (hex encoded) ID using upper case letters only.

Glados Voice

Glados audio files are stored on Babbage at /home/glados/wavefiles/members. Set your wave file on the members site. Generate your own from text using Tom's script at http://niceface.dyndns.org/glados/

Old guide

There is a guide on Youtube that I've made to show the process as its hard to describe in text: http://www.youtube.com/watch?v=OE8S9knXcW0

The Glados voices were generated by oni following the method found by Tom Wyatt. To create a glados voice one must do the following:

  • Go to ATandT's Text to Speech page. Type in your name and download the file
  • Load up the program Melodyne
  • Select the entire Waveform
  • Using the melodic algorithm, double click on one section of the waveform. I believe this moves the form to its nearest notes.
  • Using the zig Zag looking tool, flatten the pitch.
  • Up the pitch by dragging upwards by 160 or so.
  • Save

Tom and I have looked for a vocoder or similar in Audacity that will do this for you. I'll make a video of this and stick it on YouTube at some point. Believe it or not, it is faster than the website as this is exactly what that website in the links is doing.

I'll see about implementing the processing algorithm in ChucK so it can be a command-line operation the next time I'm prototyping some FFT analysis stuff with it. -- Anthony

Managing Bell

Due to the delicateness of the server, we like to limit access to people who are confident with managing shared Linux systems. If you need access, please ask one of the Directors.

Override

Please use this with caution. Once unlocked, the door must be physically opened and closed again to relock. If you unlock the door remotely, use the door webcam to check someone has entered the space.

ssh root@bell
Doorbot/openDoor.py

If the arduino has somehow changed port, you might need to edit that in openDoor.py

  • If this ambiguity becomes a problem (eg if another serial port is added), update the udev rules : debian distributions create /dev/serial/by-id where the links in that directory include in their names the unique serial number assigned to the FTDI chip on the arduino board.
    • This will happen when I/someone gets around to it :D Ms7821 08:38, 27 August 2010 (UTC)

Logging & maintenance

If you make changes or discover a problem with doorbot, please add it to the logbook.

  • The main script is rundoorbot, which announces to irccat on Babbage if the python script dies.
  • The python script (doorbot.py) announces on successful initialisation.

The service currently runs in screen, to avoid any disk syncing issues. Note that killing the python script with Ctrl+C will be announced. To start or stop doorbot without connecting to screen, use:

/etc/init.d/doorbot start
/etc/init.d/doorbot stop

Bell software

Bell is a minimal install of Voyage Linux (Debian) with (wifi, iw, wireless) packages removed and the requirements for Doorbot added.

New packages include:

git netcat tcpdump vim screen ntp
python-serial pcscd python-pyscard avrdude gcc-avr
alsa-base alsa-modules-2.6.32-voyage alsa-utils alsa-oss bplay 

This leaves about 25MB free.

The clean install needs the following to be added to /etc/dhcp/dhclient.conf:

send host-name "bell";

If a newer version has <hostname> instead, leave that.

Doorbell

green & blue = wires from doorbell

button green wire A0

redLED yellow wire A2

greenLED red wire A1