Code Monkey home page Code Monkey logo

bathroom-monitor's Introduction

bathroom-monitor

TableXI's own bathroom monitor - complete with Raspberry Pi!


EDIT: This repo has been moved to TableXI's account. This repo is out of date.


Uses:

  • Ruby version 2.1.2
  • MySQL

See Gemfile for the list of required gems.


How does it work?

  1. Right now, there is a Raspberry Pi in the Kitchen, which reads if the door is open or closed, every 10 seconds.

  2. Regardless of status, the Raspberry Pi posts this data to /update, with a shared secret key, updating the status of the website, if necessary.

  3. Users connect to directory index, and are met with an auto-updating page, showing if the bathroom is vacant or occupied.

  4. If they so please, Users can very "Potty Statistics" over on /statistics


How do I get up and running?

  1. Copy config/database.yml.template over to config/database.yml and make necessary adjustments

  2. Copy config/access_key.yml.template over to config/access_key.yml, and customize your access key with a quick faceroll on the keyboard.

  3. Run gem install bundler if you don't have the bundler gem.

  4. Run bundle install real quick to make sure have all of the required gems for the bathroom monitor

  5. Run rake db:create db:migrate db:seed to create, migrate, and seed the database

  6. Run rails server to start the test server.

  7. (Optional) Install useful control scripts

    1. Copy scripts/occupied.sh.example and scripts/vacant.sh.example over to scripts/occupied.sh and scripts/vacant.sh
    2. Update both scripts to include your secret key from step (2).
    3. Run brew install curl if you don't have cURL.
    4. To update the status, run ./scripts/occupied.sh or ./scripts/vacant.sh while the server is running

bathroom-monitor's People

Contributors

detry322 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

bathroom-monitor's Issues

Todo

  1. Change auto-refresh to 30 seconds
  2. Update RaspPi to point to the new url (when productionalized)
  3. Remove secret key from the repo
  4. Change secret key
  5. Move repo to tablexi and make private
  6. Add time vacant
  7. Include time by default on the home page
  8. Post from RaspPi to site less frequently (every 10 seconds?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.