On Tue, Dec 6, 2011 at 10:34 AM, Jonathan Lassoff <span dir="ltr"><<a href="mailto:jof@thejof.com">jof@thejof.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Tue, Dec 6, 2011 at 2:21 AM, Jake <span dir="ltr"><<a href="mailto:jake@spaz.org" target="_blank">jake@spaz.org</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

There is no need for an ethernet-powered arduino or another pc, because now the door is connected to a usb parallel port on minotaur.<br>
<br>
I promise there will be no complications or electrical nasties related to the long wires.<br>
<br>
please put any info or code you have on the wiki page so it's more easy to collaborate on this thing.  Also miloh says to ask you for access to stallion or minotaur or whatever.  i think i'm already on pony.  I want someone to test stuff.</blockquote>

<div><br></div></div><div>Miloh, you already have an account on minotaur. Let me know if you need an SSH key pushed, or something.</div><div><br></div><div>Jake, what is the difference between <a href="https://www.noisebridge.net/wiki/User:Jake" target="_blank">https://www.noisebridge.net/wiki/User:Jake</a> and <a href="https://www.noisebridge.net/wiki/User:Jerkey" target="_blank">https://www.noisebridge.net/wiki/User:Jerkey</a></div>

<div><br></div><div>Do you want your SSH key for "jake" pushed to minotaur?</div></div></blockquote><div><br></div><div>I put the two most-helpful tools for dealing with the hardware on minotaur:</div><div> - /usr/local/sbin/open-door (a setuid root binary that "buzzes" open the door with the parallel port hardware)</div>
<div> - /usr/local/sbin/parport_daemon (a setuid binary that takes control of the parallel port, starts listening on UDP <a href="http://0.0.0.0:30012">0.0.0.0:30012</a>, and talks a simple protocol to query the state of the ringer and open the gate)</div>
<div><br></div><div>Personally, I'd like to use the parport_daemon program going forward, though most of the scripts others use are not setup to use it just yet. The protocol is dead simple. Ask it "Sup?" and it will respond with "Nothing." (nobody's ringing) or "RING!" (someone is or just rang the gate buzzer). If you send it "OPEN!" it will respond "Acknowledged. Buzzing it open." (buzzes open the door) or "Already opened recently." (if someone beat you to it -- there's a timeout to avoid wailing on the solenoid).</div>
<div><br></div><div>So, to open the gate from pony, one could do something like: echo -n 'OPEN!' | socat stdio udp4:minotaur.noise:30012</div><div>I should probably make a wrapper script or controller around that next.</div>
<div><br></div><div>I'm also thinking it would be cute to have the computer hosting the daemon to also announce a Zeroconf/Avahi service records for the door. Maybe _door._udp?</div><div><br></div><div>Cheers,</div><div>
jof</div></div>