Code Monkey home page Code Monkey logo

huedo's Introduction

huedo

Make Phillips Hue lights do things.

Using as a Command

Setup

Install from source by cloning this repository and running the following in the root of it:

pip install -e .

Usage

Before you start, find your Phillips Hue hub's IP address (it's visible in the app), press the "sync" button (the big one on top), and run:

huedo init $HUB_IP

Once this is done, ~/.config/huedo.yaml will have been created with credentials to your hub - now you're ready to go.

To list lights, try out:

huedo list lights

To control lights, try:

huedo toggle $LIGHT_ID

Using as a Library

Follow the setup steps above; at present you need to have a config file with a credential to your bridge present on your system.

Once that's done, you can import and use the client:

from huedo import HueDoClient

# this assumes you've
c = HueDoClient()

# find all lights known to the bridge
r = c.get_lights()

# toggle the state of the first light
c.toggle_light(list(r.keys())[0])

# make a call directly to the bridge at API base url
r = c.call("GET", "")

huedo's People

Contributors

dorthu avatar

Watchers

 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.