Project:Tool Access Control/Solexious Proposal

From London Hackspace Wiki
< Project:Tool Access Control
Revision as of 00:51, 5 May 2013 by Oskarpearson (talk | contribs) (Check DB sync: Added info about quoting problem around card IDs.)
Jump to: navigation, search

(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


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)


I have made a prototype shield for testing code while the full design remains to be tested and produced.

Design for the full ACNode at:

Incomplete implementation of server side is hosted here:

Incomplete python version:

Network protocol

This is mostly RESTful, but not entirely because we're using text/plain (for the small atmega). In particular, the /sync request could actually use /card with weird Range headers, but that's pretty awkward. It should be easy to upgrade to a full JSON or hypertext system.

Get card permissions

GET /[nodeID]/card/[cardID]


  • GET /1/card/04FF7922E40080


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


Add card

POST /[nodeID]/grant-to-card/[card_being_granted_to]/by/[card_with_admin_permissions]


  • POST /1/grant-to-card/04FF7922E40080/by/04FF792AAAAAA


  • 0 - card not added
  • 1 - card added

STATUS: Done - but not yet tested

Check DB sync

GET /[nodeID]/sync/

Returns first card in db


  • GET /1/sync/

returns the first card in the DB i.e.

  • 04FF7922E40080

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


  • GET /1/sync/04FF7922E40080/

returns either the next card in DB i.e.

  • 03FF7922FF008F

or when out of cards returns

  • END

STATUS: Done - tested on UI, but not with ACNode NOTE: Due to CodeIgniter REST limitations, the ACNode code will have to strip any leading and trailing quote characters from the card. 04FF7922E40080 is incorrectly returned as '04FF7922E40080', and the quotes must be stripped off if supplied

Report tool status

POST /[nodeID]/status/[new_status]/by/[cardWithAdminPermissions]


  • POST /1/status/0/by/04FF7922E40080
  • 0 - out of service
  • 1 - in service


  • 0 - not saved
  • 1 - saved

STATUS: Not yet done

QUESTION: should any user be able to take a tool out of service? Should it even require a card ID?

Check tool status

GET /[nodeID]/status/

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


  • 0 - out of service
  • 1 - in service

STATUS: Done - tested on UI, but not with ACNode

Tool usage (live)

POST /[nodeID]/tooluse/[status]/by/[cardID]


  • POST /1/tooluse/0/04FF7922E40080

Status is one of:

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


  • 0 - not saved
  • 1 - saved

STATUS: Not yet done

Tool usage (usage time)

POST /[nodeID]/tooluse/time/for/[cardID]/[timeUsed]


  • POST /1/tooluse/time/for/04FF7922E40080/34000


  • 0 - not saved
  • 1 - saved

STATUS: Not yet done

Case alert

POST /[nodeID]/case/change/[new_status]


  • PUT /1/case/1

Alert if the ACNode case is opened

  • 0 - case closed
  • 1 - case opened


  • 0 - not saved
  • 1 - saved

STATUS: Not yet done