RFID Storage Cabinet

From Dallas Makerspace
Jump to: navigation, search

Members

Psuedo Code

  • ScanRFID:
    if equipment:
    state = PutEquipmentBack
    elif member:
    state = ShowMemberOptions
  • ShowMemberOptions:
    webservice:GetAvailableTools
    show screen
    if available tool selected:
    state = Checking Equipment Out
    if Exit selected:
    state = ScanRFID
  • Checking Equipment Out:
    open cabinet locker for tool
    webservice:CheckoutTool(User rfid, tool rfid)
    if error selected:
    webservice:ReportError if appropriate
    wait for cabinet locker for tool to close
    state = ScanRFID
  • PutEquipmentBack:
    open cabinet locker for tool
    prompt for member rfid
    prompt for condition of tool
    webservice:CheckinTool(tool rfid)
    webservice:ReportError if appropriate
    wait for cabinet locker for tool to close
    state = ScanRFID

Screens by State

ScanRFID:

Swipe 
badge
or equipment 
to proceed

ShowMemberOptions:

Hello {membername}                 [exit]
Feel free to scan in equipment to return

Checked out:
  {checked out equipment for this member, each clickable}
Available to checkout:
  {checked out equipment, each clickable}

CheckOutEquipment:

Hello {membername}                 [exit]
Please remove the equipment from the now open locker and examine it.
If the equipment is in good condition, please close the door, and enjoy.

Otherwise notate the issue below:
* [equipment is missing]
* [equipment is broken]

PutEquipmentBack

Feel free to scan your RFID to get credit [exit]
Thank you {member name}                   [exit]

If there is an issue with the equipment,
  please press [This equipment needs repair]

Please place the equipment into the now open locker and close it.

Web Services

  • by Kent
  • implemented in Flask

GetAvailableTools

Parameters:

  • User RFID

returns:

  • tools checked out
  • tools available to check out

CheckOutTool

Parameters:

  • User RFID
  • Tool RFID (was UUID)

IsDoorClosed

Parameters:

  • Tool RFID (was UUID)

Returns:

  • True / False

CheckInTool

  • User RFID
  • Tool RFID (was UUID)

Report Error

  • User RFID
  • Tool RFID (was UUID)
  • ErrorMessage: description

Hardware

Commodity Hardware

Stuff Lance is making ;-)

Software upgrades

vim

apt-get

sudo apt-get install python-software-properties

pip

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py
sudo pip install flask-sqlalchemy
sudo pip install sqlalchemy
sudo pip install flask-restful
sudo pip install Flask

Source Code

https://github.com/Kentamanos/rfidLocker

Build mu/th/er cabinet Ubuntu distro from scratch

Requirements:

  • Beaglebone Black Rev A, B or C. A bit tight on A and B. sudo apt-get clean
  • Linux computer that can write to microsd

On Linux computer

  1. program microsd card which will install Ubuntu 14.04 into Beaglebone Black
wget https://rcn-ee.com/rootfs/2015-06-11/flasher/BBB-eMMC-flasher-ubuntu-14.04.2-console-armhf-2015-06-11-2gb.img.xz
unxz BBB-eMMC-flasher-ubuntu-14.04.2-console-armhf-2015-06-11-2gb.img.xz
dd if=BBB-eMMC-flasher-ubuntu-14.04.2-console-armhf-2015-06-11-2gb.img of=/dev/sd{drive letter for microsd card here}

Install Ubuntu onto BBB

  1. insert microsd card generated by the Linux Box above.
  2. power up, and wait
echo "deb http://ppa.launchpad.net/kivy-team/kivy/ubuntu trusty main" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A863D2D6
sudo apt-get update
sudo apt-get upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get install kivy mysql-server python-flask-sqlalchemy lxde lxde-core lxde-icon-theme build-essential python-dev python-setuptools python-pip python-smbus
sudo pip3 install Adafruit_BBIO
sudo pip3 install -pre sqlalchemy

if pip does not get installed:

https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1468155

sudo apt-get install python-pip=1.5.4-1 python-dev

Update BBB to auto log in as a user

  1. /etc/lxdm/lxdm.conf
## uncomment and set autologin username to enable autologin
autologin=ubuntu

Update BBB to auto start program

update ~/.config/lxsession/LXDE/autostart

@xscreensaver -no-splash
# @lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
@/usr/bin/python cabinetstorage.py

Ideas for starting in kiosk mode: http://surf.suckless.org/files/kiosk_mode

Rotate screen

http://hipstercircuits.com/problems-with-beaglebone-black-and-their-solution/

mysql

sudo apt-get install python-mysqldb
mysql --u root -p

create database muther;
create user 'muther'@'localhost' identified by '{password}';
grant create, delete, insert, select, update on muther.* to muther@localhost;
flush privileges;

How can I get rid of image burn-in on an LCD display?

http://www.mouser.com/search/refine.aspx?Ntk=P_MarCom&Ntt=163356980

LDAP

http://n0where.net/understanding-the-ldap/

Category