Door System: Unterschied zwischen den Versionen

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen
Zeile 112: Zeile 112:
 
*[[Door System/unlock.php]]
 
*[[Door System/unlock.php]]
 
*[[Door System/doorsys.sql]]
 
*[[Door System/doorsys.sql]]
 +
*[[Door System/config.php]]

Version vom 18. April 2008, 17:15 Uhr

Oh hi, da ich weder ein grosser grafiker noch ein wiki syntax benutzer bin 
wuerde ich jemanden der sich zustaendig fuehlt bitten diese seite richtig zu formatieren ;)
Okay here we go. Lange schon ist es her das viel diskutiert wurde und keienr was gemacht hat.
Nun bau ich (naxx) das tuer system wobei mir marius bei der hardware helfen wird.
Ich habe keine lust jetzt zig jabber/email messages zu bekommen oder hier wieder ne grundsatz
diskussion loszutreten. Ich mach das jetzt und basta. wer denkt er kann es besser oder 
umbedingt das nutzlose feature will -> mach was und wenns besser ist als meine loesung 
machen wirs (write code and show us the whole thing works)

Concept

*Lock Policy:
 Members have tokens that can unlock the door(for 1 minute)!
 "Keymembers" also have a real key for the door (about 10 keys or so)
  Other persons have to use the door bell
  Partymode can and will be implemented!
*Webinterface:
 Es wird ein webinterface geben welches auf einem der server im metalab laufen wird.
 Options:
          - Log in (using nickname + tokenid/password)
          - Adduser (all full members can add new tokens to the system(will be logged))
          - List/Edit User
          - Unlock Door (can be turned off)
*Hw Side:
          - Arduino
          - Fonero
          - 2x Keyreader
          - Tokens        (cost about 2 euros each)
          - Steampunk pc (for user management) 
          - Metalab Server
*Sw Side:
          - Arduino Software (ask marius)
          - Web interface (same as unlock script)
          - Unlock Script (requires mysql, httpd, php, php-mysql, ssl certs)
          - Door Deamon (runs on the fonera -> on openwrt)

Unlock

The Token touches the pad or whatever


                                

 #############                *********                      +++++++++++++++
 #Tokenreader# -> 64bit id -> *Arduino*  -> (if rs232 ==1) ->++ Door.open ++
 #############                *********                      +++++++++++++++
                              |     |
                              |   32 char                       
                 .-->---------.    String (over rs232)          
                 |                  |                           
      0/1(rs232) |   ********<------.                           
                 .--<*FONERA*<-----------------------------. 
                     ********                              |
                       |                                   |
                       |                                 https_GET(over ethernet) result: TRUE/FALSE/TEMP 
                      https_GET(over ethernet)             |
                       |                                   |
                       .-> XXXXXXXXXX ---------------------.                                     
                           X Server X (https://authserver.in.metalab.at/unlock.php?id=$id => TRUE/FALSE/TEMP)
                           XXXXXXXXXx


Eigentlich ist alles recht simpel:
Der arduino kriegt ein signal from tokenreader welches ne 64bit beinhaltet.
Er macht draus nen 32 chracter string und schickt diesen ueber rs232 an den fonero.
dieser macht daraufhin ein request ueber https an https://authserver.in.metalab.at/unlock.php?id=32charidgoeshere
und je nachdem ob es ein TRUE oder FALSE ist geben wir das ergebnis per rs232 zurueck an den Arduino 
Welcher dann die tuer entsperrt.

New Token

Um Neue tokens in system hinzufuegen zu koennen
werden wir den steampunk pc mit einem tokenreader austatten
funktioniert dann per commandozeilen app die entweder fullscreen läuft
oder per http using firefox

Unlock.now

Theory:
 If a member has forgotten his key/token
 they still can unlock the door
Method:
 -Go to the webinterface (only thru https over wireless lan4unlock.now)
 -Log in (username:password)
 -Klick unlock me+Get logged out
 -Go to the door
 -Hit the Letmein button
 - .. and pray ;)

FAIL

Power Fail:
 - usv 4 the lock system (aruino, fonero, lock, keyreader)
Network Fail:
 - fonero chaches full members for unlimited, but checks if they still are members
   on every login (removes members from the list if needed)
Human Fail:
 the "gau" scenario -> kill the person by throwing paper balls at her/him ;)
 alternative: get process id's for all humens and kill -9 them ;)
Name Fail:
 We also need to setup a redirection for keks.metalab.at to land at goatse.cx
 because  somebody wants to name the whole thing keks (wich is a stupid name)

Code_Done