-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME
63 lines (45 loc) · 2.68 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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.