Difference between revisions of "Project:Tool Access Control/Solexious Proposal"

From London Hackspace Wiki
Jump to navigation Jump to search
Line 25: Line 25:
 
==Network protocol==
 
==Network protocol==
 
===Get card permissions===
 
===Get card permissions===
'''/[nodeID]/getpermissions/[hex pairs in ascii]/'''
+
'''GET /[nodeID]/card/'''
  
 
i.e.
 
i.e.
* /1/getpermissions/04FF7922E40080/
+
* POST /1/card/
 +
04FF7922E40080
  
 
returns
 
returns
Line 36: Line 37:
  
 
===Add card===
 
===Add card===
'''/[nodeID]/add/[Card id to be added]/[Card id of adder]/'''
+
'''POST /[nodeID]/card/'''
  
 
i.e.
 
i.e.
* /1/add/04FF7922E40080/04FF1234540080
+
* POST /1/card/
 +
04FF7922E40080,04FF1234540080
  
 
returns
 
returns
Line 46: Line 48:
  
 
===Check DB sync===
 
===Check DB sync===
'''/[nodeID]/resync/'''
+
'''GET /[nodeID]/sync/'''
  
Sets the DB as needing a resync from the beginning
+
Returns first card in db
  
 
i.e.
 
i.e.
* /1/resync/
+
* GET /1/sync/
  
 
returns the first card in the DB i.e.
 
returns the first card in the DB i.e.
 
* 04FF7922E40080
 
* 04FF7922E40080
  
'''/[nodeID/resync/[last received card]/'''
+
'''GET /[nodeID/sync/[last received card]/'''
  
 
i.e.
 
i.e.
* /1/resync/04FF7922E40080/
+
* GET /1/sync/04FF7922E40080/
  
 
returns either the next card in DB i.e.
 
returns either the next card in DB i.e.
Line 67: Line 69:
  
 
===Report tool status===
 
===Report tool status===
'''/[nodeID]/status/set/[status]/[Card id]/'''
+
'''PUT /[nodeID]/status/'''
 +
 
 +
i.e.
 +
* PUT /1/status/
 +
1
  
 
* 0 - out of service
 
* 0 - out of service
Line 77: Line 83:
  
 
===Check tool status===
 
===Check tool status===
'''/[nodeID]/status/check/'''
+
''' GET /[nodeID]/status/'''
  
 
Check if the ACNode has been remotely taken out of service, or put back in service
 
Check if the ACNode has been remotely taken out of service, or put back in service
Line 86: Line 92:
  
 
===Tool usage (live)===
 
===Tool usage (live)===
'''/[nodeID]/tooluse/[status]/[Card id]/'''
+
'''PUT /[nodeID]/tooluse/'''
 +
 
 +
i.e.
 +
* PUT /1/tooluse/report
 +
1,04FF7922E40080
  
 
* 0 - tool use stopped
 
* 0 - tool use stopped
Line 96: Line 106:
  
 
===Tool usage (usage time)===
 
===Tool usage (usage time)===
'''/[nodeID]/tooluse/[milliseconds]/[Card id]/'''
+
'''POST /[nodeID]/tooluse/time/'''
 +
 
 +
i.e.
 +
* POST /1/tooluse/time/
 +
34000,04FF7922E40080
  
 
returns
 
returns
Line 103: Line 117:
  
 
===Case alert===
 
===Case alert===
'''/[nodeID]/case/[status]/'''
+
'''PUT /[nodeID]/case/'''
 +
 
 +
i.e.
 +
* PUT /1/case/
 +
1
  
 
Alert if the ACNode case is opened
 
Alert if the ACNode case is opened

Revision as of 03:14, 19 February 2012

(ACN refers to Access Control Node, a physical node attached to a tool)

I plan to

  • Base the device on the Duemilanove arduino as it fits our needs and has a wide base of users.
  • Use the wiznet chip for ethernet support
  • Use i2c sm030 rfid readers
  • allow different control outputs (relay, Darlington, servo control etc)
  • use eeprom memory for internal storage

Services

Mission critical

These must function without networking or main server available:

  • Check if card in ACN local db and allow use if is
  • Set tool into "out of order" mode

Non critical

  • Add cards
  • Report back to central server (usage etc)

Progress

I have made a prototype shield for testing code while the full design remains to be tested and produced. http://www.flickr.com/photos/solexious/6865500239/

Design for the full ACNode at: https://github.com/solexious/ACNode

Network protocol

Get card permissions

GET /[nodeID]/card/

i.e.

  • POST /1/card/

04FF7922E40080

returns

  • 0 - no permissions
  • 1 - user
  • 2 - maintainer

Add card

POST /[nodeID]/card/

i.e.

  • POST /1/card/

04FF7922E40080,04FF1234540080

returns

  • 0 - card not added
  • 1 - card added

Check DB sync

GET /[nodeID]/sync/

Returns first card in db

i.e.

  • GET /1/sync/

returns the first card in the DB i.e.

  • 04FF7922E40080

GET /[nodeID/sync/[last received card]/

i.e.

  • GET /1/sync/04FF7922E40080/

returns either the next card in DB i.e.

  • 03FF7922FF008F

or when out of cards returns

  • END

Report tool status

PUT /[nodeID]/status/

i.e.

  • PUT /1/status/

1

  • 0 - out of service
  • 1 - in service

returns

  • 0 - not saved
  • 1 - saved

Check tool status

GET /[nodeID]/status/

Check if the ACNode has been remotely taken out of service, or put back in service

returns

  • 0 - out of service
  • 1 - in service

Tool usage (live)

PUT /[nodeID]/tooluse/

i.e.

  • PUT /1/tooluse/report

1,04FF7922E40080

  • 0 - tool use stopped
  • 1 - tool in use

returns

  • 0 - not saved
  • 1 - saved

Tool usage (usage time)

POST /[nodeID]/tooluse/time/

i.e.

  • POST /1/tooluse/time/

34000,04FF7922E40080

returns

  • 0 - not saved
  • 1 - saved

Case alert

PUT /[nodeID]/case/

i.e.

  • PUT /1/case/

1

Alert if the ACNode case is opened

  • 0 - case closed
  • 1 - case opened

returns

  • 0 - not saved
  • 1 - saved