[Rack] doorport - do you know how the door opener works?

Jonathan Lassoff jof at thejof.com
Tue Dec 6 12:35:42 PST 2011


On Tue, Dec 6, 2011 at 10:34 AM, Jonathan Lassoff <jof at thejof.com> wrote:

> On Tue, Dec 6, 2011 at 2:21 AM, Jake <jake at spaz.org> wrote:
>
>> 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.
>>
>> I promise there will be no complications or electrical nasties related to
>> the long wires.
>>
>> 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.
>
>
> Miloh, you already have an account on minotaur. Let me know if you need an
> SSH key pushed, or something.
>
> Jake, what is the difference between
> https://www.noisebridge.net/wiki/User:Jake and
> https://www.noisebridge.net/wiki/User:Jerkey
>
> Do you want your SSH key for "jake" pushed to minotaur?
>

I put the two most-helpful tools for dealing with the hardware on minotaur:
 - /usr/local/sbin/open-door (a setuid root binary that "buzzes" open the
door with the parallel port hardware)
 - /usr/local/sbin/parport_daemon (a setuid binary that takes control of
the parallel port, starts listening on UDP 0.0.0.0:30012, and talks a
simple protocol to query the state of the ringer and open the gate)

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).

So, to open the gate from pony, one could do something like: echo -n
'OPEN!' | socat stdio udp4:minotaur.noise:30012
I should probably make a wrapper script or controller around that next.

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?

Cheers,
jof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.noisebridge.net/pipermail/rack/attachments/20111206/649e6fd4/attachment.htm 


More information about the Rack mailing list