<div dir="ltr">As I just mentioned on the discuss list:<br><div><br>  <a href="http://lists.sudoroom.org/pipermail/sudo-discuss/2013-July/003061.html">http://lists.sudoroom.org/pipermail/sudo-discuss/2013-July/003061.html</a><br>
<br></div><div>We now have elevator access control.<br><br></div><div>The sudodoor and sudoor projects have been updated with new code:<br><br>  <a href="https://gitorious.org/sudodoor/sudodoor">https://gitorious.org/sudodoor/sudodoor</a><br>
<br></div><div>  <a href="https://gitorious.org/sudoor">https://gitorious.org/sudoor</a><br><br></div><div>The main changes are:<br><br></div><div>  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).<br>
<br></div><div>  opendoor.py now sends an https request to <a href="http://door.sudoroom.org">door.sudoroom.org</a> 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.<br>
</div><div><br></div><div></div><div>Here's how it works:<br><br></div><div>  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. <br>
<br>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_.<br>
<br></div><div>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.<br>
</div><div><br>Again: The relay is default closed, so if no power is applied the elevator works as normal.<br></div><div><br></div><div>The mosfet is screwed into the wall to the left of tamale.<br><br><div>A couple of things that need changing:<br>
<br></div><div>  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!<br>
<br></div> 
 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.<br><br></div><div>Thank you and good night.<br><br>-- <br></div><div>Marc Juul<br></div></div>