[sudo-sys] elevator access control

Marc Juul marcjc at gmail.com
Wed Jul 10 03:39:04 PDT 2013


As I just mentioned on the discuss list:

  http://lists.sudoroom.org/pipermail/sudo-discuss/2013-July/003061.html

We now have elevator access control.

The sudodoor and sudoor projects have been updated with new code:

  https://gitorious.org/sudodoor/sudodoor

  https://gitorious.org/sudoor

The main changes are:

  doorman.py and portal.html now has code to enable the downstairs elevator
call button. it does so for 20 seconds if you use the "unlock elevator"
button and for 40 seconds if you do "open outside door" (it of course still
opens the outside door).

  opendoor.py now sends an https request to door.sudoroom.org to unlock the
elevator button for 40 seconds after the 5 second outer door unlock
sequence. This means that all code depending on opendoor.py should now also
unlock the elevator for 40 seconds.

Here's how it works:

  A relay is hooked to the elevator call button on the ground floor. It is
inside of the wall. I spliced the relay into the intercom cable, since
there were some wires in that cable that weren't being used anyway. Two of
those wires now connect the relay to a 12 volt power supply in the bottom
left of the server/bio closet upstairs and via a mosfet to the raspberry pi
(tamale). It is also connected to a manual override just outsider of the
sudo room main door.

When GPIO pin 11 is set to high on tamale, then if the switch outside the
space is set to "access control enabled", the relay is triggered and the
elevator call button on the ground floor will be _disabled_.

If GPIO pin 11 is set to low, or the manual override is toggled to "access
control disabled", or the raspberri pi is off, or something gets
disconnected, then the call button will function as normal.

Again: The relay is default closed, so if no power is applied the elevator
works as normal.

The mosfet is screwed into the wall to the left of tamale.

A couple of things that need changing:

  I had to change the /etc/init.d/doorman script to run the doorman.py
webserver as root since the python GPIO library wouldn't work otherwise. If
someone has a good idea for how to fix this, please do so!

  I hardcoded a password in opendoor.py in the sudodoor project (don't
worry i didn't commit it with a correct password). It's late and I want to
go home. Sorry.

Thank you and good night.

-- 
Marc Juul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sudoroom.org/pipermail/sudo-sys/attachments/20130710/b6a20a0d/attachment.html>


More information about the sudo-sys mailing list