Skip to content

openfirmware/web-pi-lights-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

web-pi-lights-control

A web interface for controlling a specific set of Christmas lights from a Raspberry Pi.

Interface Preview on iOS

This web app is part of a series of blog posts on controlling Christmas lights from Arduino and Raspberry Pi devices.

Usage

This is a Sinatra Ruby application that provides a control web page and a bare-bones REST API for controlling the lights using my pi-lights-control gem.

Start by installing Ruby, preferably 2.1 or newer. I have Ruby 2.1.5 installed on my Pi, so that is why I chose it as the minimum version.

Then install Ruby Gems, the Ruby package manager. With gem, install bundler:

$ gem install bundler

Sudo may be necessary if you have a system Ruby:

$ sudo gem install bundler

Then either download an archive of this repo or clone it using git, and install the required gems:

$ git clone <REPO URL>
$ cd web-pi-lights-control
$ bundle install

Now you should be able to run the app in the foreground:

$ sudo ruby app.rb

The app will then be accessible on the Pi's IP on port 4567.

License

MIT License

Authors

James Badger

About

Web server for controlling pi-lights-control

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published