Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ruby-hue

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ruby-hue

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

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

FAQs

Package last updated on 15 Dec 2012

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc