Giter Club home page Giter Club logo

philips-hue-experiments's Introduction

Philips Hue Experiments

Well, I recently bought a Google Home Mini + 3 Philips Hue bulbs in a kit, and so I started tweaking and exploring around.

This is a simple project in nodejs which explores the node-hue-api module and implements some features as commands you can run from CLI.

Usage

Getting started

  • Clone this repo locally.

  • Make sure you have the latest Node.js LTS installed. This project relies in async / await features.

  • Run npm ci

  • Register your computer as a user in Philips Bridge

Registering user

In order to make calls to Philips Bridge, you need to authenticate your device.

I implemented a simple script for this, you can run it using npm run register-user, and it will print a key after it is complete.

Keep in mind you need to press the button in Philips Bridge before running this command in order for it to work (you'll have an error message telling you to do so, if you forget to do this).

  • Without pressing Bridge button: register failing

  • After pressing Bridge button: register success

After this, get the key for the registered user, and store it in your .bashrc, .zshrc, or simply export it as PHILIPS_HUE_USERNAME=<user-token>.

At this point, you're ready to run any commands you might want to! :)

Commands

Currently, we have these commands available:

  • npm run info

    • Prints information about the commands implemented.
    • info
  • npm run register-user

    • Register an user in your Philips Bridge and prints it so you can use it to run other commands.
  • npm run turn-on

    • Turns on all lamps
  • npm run turn-off

    • Turns off all lamps
  • npm run start-colors-loop

    • Start a colors loop with all lamps
  • npm run stop-effects

    • Stop all effects in all lamps
  • npm run set-color -- "#ff0000"

    • Set color for all lamps, accepts a first argument as the color wished. Accepts CSS names, HEX, RGB, RGBA and HSL.
  • npm run set-brightness -- 40

    • Set brightness for all lamps, accepts a first argument as a brightness percentage (min: 0, max: 100)
  • npm run set-saturation -- 30

    • Set saturation for all lamps, accepts a first argument as a saturation percentage (min: 0, max: 100)
  • npm run set-color-temperature -- 170

    • Set color temperature for all lamps, accepts a first argument as a color temperature value (min: 153, max: 500)

Contributors

philips-hue-experiments's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ssstonebraker

philips-hue-experiments's Issues

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.