Code Monkey home page Code Monkey logo

philipshue_googlecalendar's Introduction

An example of a Philips Hue and Google Calendar integration

My Work-from-Home "office" is in a dark corner of my house, I wanted a way to keep track of time and also look well lit in video calls. My solution was to get the Philips Hue Light Bar and write a program to control the lights based off of events in my calendar. Check out a video of the experience.

Requirements

Hue Python API, I'm using Qhue to make interactions with the Bridge easier (see that project for installation instructions). To install under Python3, you may have to use pip3:

pip3 install qhue

To read configuration files, we're using pyyaml. To install under Python 3, run:

pip3 install pyyaml

Enable the Google Calendar API for your Google account and install the client library. Reference the Python Calendar API as needed. To install under Python3 you may have to use pip3:

pip3 install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib

Hue Lights API (you will to sign up for a developer account to access) to understand what's available.

To get it working

Go through the Get Started page on the Hue Developers site to use the CLIP API Debugger to register a new username. Replace the BRIDGE_IP and BRIDGE_USERNAME variables in the script, the LIGHTS array to match your lights, and update the LOGGING variable as necessary and execute with:

python3 work_lights.py

If you want to run it as a background process, set LOGGING to False and run with

python3 work_lights.py &

philipshue_googlecalendar's People

Contributors

vdlima avatar eburley avatar riverspharmd avatar

Stargazers

 avatar Owain  gaunders 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.