After a long time in the oven, Farset Labs is up and running. Unforanately we don’t have any of the crazy equipment yet, since we’re broke.
Basically, first person pushes the BRB down in the morning, then one of the directors key-unlocks the space to ‘close’ it.
This was accomplished using the Velleman K8055 USB interface board and a lot of speaker wire.
Simple enough, but a process fruaght with stupid mistakes, such as:
- Whoops, have to run as sudo to access the USB device
- Whoops, OAuth2 is a pain in the ass
- Whoops, have to change each message slightly or Twitter thinks I’m spamming the joint
- Whoops, have to do PING/PONG responses to the IRC server (easier to use
irclibsince it manages that for you)
- Whoops, need to keep talking to the IRC server otherwise it disconnects us (hence the
irc.process_once()call in the main
- Whoops, Ruby isn’t any better than python at OAuth2
sudo apt-get install build-essential libusb-dev python-dev python-setuptools python-irclib
sudo easy_install oauth2
sudo mkdir /opt/bin
wget package from http://sourceforge.net/projects/python-k8055/
tar -xvjf python-k8055-0.2.tar.bz2
sudo python setup.py install
sudo wget occupy-farset.py
sudo wget occupy-farset.conf
sudo initctl reload-configuration
sudo service occupy-farset start
sudo service occupy-farset status
- Download and install python wrappers for the Velleman K8055 USB interface board
- Copy our customised (but highly customisable) python script that talks to IRC, Twitter, and the interface board
- Copy and install the Ubuntu Upstart conf file to use the script as a service
- Fire off the service and test that it’s still up.