Giter Site home page Giter Site logo

pi-hue's Introduction

Pi-Hue

Pi-Hue is a quick Flask app to throw on a Raspberry Pi that lets you interface with Philips Hue's API. Let's start quick-n-dirty and refine as we go.

Why am I bothering with the Raspberry Pi?

It lets everybody on your network mess with your lights.

Why else though?

Because I'd like to leverage my Pi's camera to get the outside color temperature, and adjust the lights accordingly.

Anything else you'd like to tell us?

This is my first foray into the IoT. This is a tech space that I really enjoy and would love to do more in. If you'd like to contribute, or have any ideas, please feel free to suggest something.

Setup

To make this work, you really just need a sqlite DB, a Raspberry Pi, and a Pi Camera. I called mine 'light.db', so you'll see that referenced in the code. It currently needs two tables, one called light_intensity and light_groups. You can infer the columns for now, will update once everything is a bit more polished :)

I have a pi-hue.ini file in /etc/pi-hue where I store my Hue API settings (ip_address and username).

More explanations

Chose Flask for a web framework because having to write scripts and crons, it will be nice to be able to do everything in Python. Also just another excuse to write some more python.

The next step is hardcoding some lookups for the 'ct' value of the hue to the brightness value we get from the image. Once that's complete, this will be fully functional (and a little quirky). Once that's complete and the web app receives a little attention (want to set a toggle for this functionality, plus an optional brightness setting in addition to color temp), will have to do some math to make the values correspond a little more elegantly.

pi-hue's People

Contributors

atribed avatar

Stargazers

Todd Baur avatar Edward Burgin avatar

Watchers

James Cloos avatar  avatar

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.