Git Product home page Git Product logo

ruby-hue's Introduction

Hue

ruby-hue is a simple Ruby library and binary for manipulating the Philips Hue lighting system.

Examples

(In a pry shell... for awesomeness)

require 'hue'
h = Hue::Hue.new # make use of auto-discovery

h.poll_state # fetch and print system status

h.set_bright_color(1, Color::RGB::Red)

h.all_lights.write bri: 255, hue: 40000, sat: 200

# alternate between blue and red
(1..1.0/0).each do |n|
  h.all_lights.write hue: n.even? ? 0 : 248 * 182, transitiontime: 1
  sleep 0.15
end

Documentation

It is highly recommended that you read the inline comments in lib/hue.rb. The module is very thoroughly documented.

Credit

Thanks to this link for figuring out most of the unofficial Hue REST API:

http://rsmck.co.uk/hue

ruby-hue's People

Contributors

kballenegger avatar

Watchers

 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.