Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scsmith/lightwaverf-sinatra
A really simple Ruby Sinatra server that uses the lightwave_rf gem to control the Lightwave RF Wifi Link and devices.
https://github.com/scsmith/lightwaverf-sinatra
Last synced: 17 days ago
JSON representation
A really simple Ruby Sinatra server that uses the lightwave_rf gem to control the Lightwave RF Wifi Link and devices.
- Host: GitHub
- URL: https://github.com/scsmith/lightwaverf-sinatra
- Owner: scsmith
- Created: 2012-12-26T17:30:04.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-22T19:40:17.000Z (almost 12 years ago)
- Last Synced: 2024-10-30T14:09:18.413Z (2 months ago)
- Language: Ruby
- Size: 113 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LightwaveRF Lightweight Sinatra Web Server
A really simple Ruby Sinatra server that uses the lightwave_rf gem to control the Lightwave RF Wifi Link and devices.
This sends broadcast messages over the network that the server runs on. Therefore it must be on the same network as the Wifi Link.
## Installation
Install the required gems:
$ bundle --path ./vendor/bundle
## Usage
Start the Sinatra Server (Default port is 9292)
$ bundle exec rackup
### Controlling Devices
The format for the commands is:
http://localhost:9292/room/device/action(/level)
Examples:
# to turn on device 1 in room 1:
http://localhost:9292/1/1/on# to turn off device 2 in room 3:
http://localhost:9292/3/2/off# to dim device 1 in room 1 to 50%:
http://localhost:9292/1/1/dim/50Note: This should probably be using `POST` requests instead of `GET` requests but it's easier to create `GET` requests by just navigating with a browser for the purposes of demonstration. If you're going to use this for anything but messing about I'd recommend replacing the method.
## RaspberryPi
There's also a [branch](https://github.com/scsmith/lightwaverf-sinatra/tree/pi) with some scripts to deploy this onto the RaspberryPi.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request