Skip to content

WebService API for USB Betabrite and continuous integration build status information radiator.

Notifications You must be signed in to change notification settings

thehammer/radiator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Radiator
========
Radiator is a Ruby on Rails application that exposes a web service for radiating information to devices like the Betabrite Prism.

Install Everything
====================

Debian:
  sudo apt-get install ruby
  sudo apt-get install libopenssl-ruby
  sudo apt-get install postgresql-server postgresql-client
  sudo apt-get install libpq-dev
  sudo apt-get install libusb-dev
  Make sure you have Rubygems 1.3.7 installed (use the one from rubygems.org NOT the Debian one)

Mac:
  Install MacPorts
  sudo port install ruby (MacPorts Ruby is much better)
  sudo port install postgresql
  sudo port install libusb-legacy (compat?)
  Make sure you have RubyGems 1.3.7 or later

Set up the Database
===================

  createdb radiator_development
  createuser radiator -P (use "radiator" as the password)

Setup Project
===================

  sudo gem install bundler
  bundle install 

Run Migrations
===================

  sudo RAILS_ENV=production rake db:migrate 

Running It
====================

  # Start up the server (creates jobs)
  RAILS_ENV=production script/rails server
  Go to http://localhost:3000/admin for the Typus interface.

  # To run the workers that run on the jobs
  sudo RAILS_ENV=production rake jobs:work

Extending It
====================

The core of Radiator is the messages table.  Anything in the messages table gets read according to what has been last displayed, so that the oldest messages get shown first.  

Messages get created by message sources.  Currently, there is only one message source, which queries Toodledo (an online todo service) and creates new messages from it.  However, Radiator does not care where messages come from and you can add your own messages in Typus.

The BetaBriteUpdater class is responsible for talking to the USB display and getting new messages.  This class uses rufus-scheduler to update the display (which is done every 5 seconds) and call the datasources for new messages (every minute).  The BetabriteUpdater will clear the table every time it updates for new messages, but it does not "blank" the Betabrite display.  This means that if there are no new messages, the last displayed message just keeps displaying until a new one does appear.  It then creates jobs that are picked up by the worker process running in the background -- this prevents long running processes from locking up the web server.

There is a scaffold for messages that can be used as a REST API, so /messages.xml will give you what you expect.

Device Compatibility
====================
This version currently supports the Adaptive Technologies BETABrite Prism USB sign.  In theory it should work with any other Adaptive Technologies USB LED sign that supports the Alpha protocol.

About

WebService API for USB Betabrite and continuous integration build status information radiator.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published