GithubHelp home page GithubHelp logo

creative-lights's Introduction

Creative Lights

This is a small example application that connects Adobe I/O Events with Creative Cloud, Adobe I/O Runtime and Philips Hue.

Prerequisites

You need jq, which is a command line JSON parser and all-around awesome.

brew install jq

Getting started

This script assumes macOS, with Safari as a default browser.

The first step in the process is to register a webhook with Adobe I/O Events. There is a small helper script that authenticates the app, gets the authentication token and registers the webhook.

./register-webhook.sh <SECRET-KEY>

The script accepts one parameter SECRET-KEY, which I won't hard code (hint: it's secret), but you can get it from the Adobe I/O Console when registering your application.

Hardware Setup

You will need:

  • 1 Philips Hue Bridge (buy the newer square version, although the older round version works, too)
  • 1 or more Philips Go Lights
  • 1 TP Link TL-MR6400 Router
  • 1 SIM card
  • 1 iPhone with the Philips Hue app installed

You can order all of that from this Amazon List

Do this only once.

  1. Put the SIM card into the SIM card slot in the router and turn on the router
  2. Connect the iPhone to the router's wifi network (password at the bottom of the router)
  3. Connect the Hue bridge using an ethernet cable with the router
  4. Launch the Hue app on the iPhone
  5. Tap "Settings", "Hue bridges", "+", "Search"
  6. Press the button on the Hue bridge
  7. Wait and add the Hue bridge to the app
  8. Perform the update as prompted
  9. Tap "Light setup", "+"
  10. (optional) add the serial numbers of the Hue Go lights. Numbers can be found at the bottom of the light, look for "S/N". Adding the numbers will make the process more reliable when switching lights between bridges or re-using lights
  11. Tap "Search". Your lights should show up in the app.
  12. (optional) Go back to "Home" and create a room as promted. This will allow you to control the lights using the app, which can help with troubleshooting.
  13. Look up the bridge's IP address in the Hue app: "Settings", "Hue bridges", tap "i" next to your bridge, "Network settings", turn off "DHCP", note the IP address, save. The router will re-assign IP addresses after a short while, so we should reserve the address for the bridge.
  14. Open the router's admin interface in a web browser, the IP address should be 192.168.1.0. Username/password is admin/admin
  15. Click "Forwarding", "add new". Pick a "service port", e.g. 8080, use 80 for "internal port", and the bridge's IP address for "IP address". Click save.
  16. (optional) set up Dynamic DNS
  17. (if needed) change your APN to one that supports external IP addresses (no provider NAT)

Each time you set up the demo in a new environment:

  1. Press the button on the bridge
  2. Run this command on a computer that is on the same network as your Hue bridge: sh get-hue-url.sh and write down the username
  3. The resulting address will be: http:// + your public IP address (from https://www.whatismyip.com) or Dynamic DNS name + your chosen port + /api/ + the resulting user name. Copy this address
  4. Go to GitHub's WebHook settings and update the bridge URL parameter to the new URL

(If you use dynamic DNS, you only need to do this once.)

creative-lights's People

Contributors

trieloff 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.