Testing Out the Web Client

With the X10 computer interface working and plugged into the serial port of the computer, fire up a development server of the Rails 3 code via this:

 
> cd ~/projects/ruby/rails/homprojects/x10switch
 
> rails s
 
 
=> Booting WEBrick
 
=> Rails 3.0.5 application starting in development on http://0.0.0.0:3000
 
=> Call with -d to detach
 
=> Ctrl-C to shutdown server
 
[2011-03-18 16:49:31] INFO WEBrick 1.3.1
 
[2011-03-18 16:49:31] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0]
 
[2011-03-18 16:49:31] INFO WEBrick::HTTPServer#start: pid=10313 port=3000

Open a web browser on the local machine and enter the following:

http://localhost:3000/command/on

If everything is coded correctly, you should see The light should ...

Get Programming Your Home now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.