Git Product home page Git Product logo

lights's Introduction

Light Reminders

A lightweight web app to help you keep the lights of your friendships on. Also integrates with your physical lights via Philips Hue lights. More details and write-up coming soon.

Requirements

To run:

  • PHP 5.6+
  • MySQL 5.1+

To develop UI:

  • node.js

To integrate with your physical lights:

Installation

  1. Clone codebase on to PHP and MySQL enabled-server
  2. Configure your app:
  • Update ./api/application/config/database.php with database credentials
  • Update ./api/application/config/config.php with your base_url, e.g. http://localhost/api/
  1. To setup database, in browser go to http://localhost/api/migrate
  2. Visit http://localhost/, register a new user, add relationships and meetings

Integration with your Philips Hue lights

  1. Follow the steps to obtain your bridge's IP address and generate/obtain your username

  2. Create a file at ./js/config.js based on ./js/config.sample.js

  3. Fill in your hueEndpoint and hueUsername based on step 1

  4. Create a new entry in your config called lights that look like this:

    var PROJECT_CONFIG = {
      ...
      lightLevelRange: [0, 9],
      lights: [
        {value: 'bedroom', label: 'Bedroom', hueLightId: '1', image: 'img/lights/bedroom/light{level}.jpg'},
        {value: 'corridor', label: 'Corridor', hueLightId: '2', image: 'img/lights/corridor/light{level}.jpg'},
        {value: 'dining', label: 'Dining', hueLightId: '3', image: 'img/lights/dining/light{level}.jpg'},
        {value: 'kitchen', label: 'Kitchen', hueLightId: '4', image: 'img/lights/kitchen/light{level}.jpg'},
        ...
      ],
      ...
    }
    
  5. Update the list of lights that correlate to the lights in your home; you can customize the labels and images

    • In this example, there are 10 images (named light0.jpg, light1.jpg, ..., light9.jpg) associated with the different states of each of the lights (bedroom, corridor, dining, kitchen, etc)
  6. In the app http://localhost/, update your relationships with the appropriate lights that you defined in the previous step

  7. Now your physical lights should reflect the state of the virtual lights in the app

Developing the UI

  1. Install node modules npm install
  2. Install gulp (if necessary) npm install --global gulp-cli
  3. Run gulp
  4. Changes to .js, .scss, and .ejs files will be watched and compiled

lights's People

Contributors

beefoo avatar

Stargazers

K. Jason Ao avatar  avatar

Watchers

 avatar James Cloos avatar  avatar

Forkers

ph0enixd0wn420

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.