All Projects → soffes → Hue

soffes / Hue

Licence: mit
Work with Philips Hue from Ruby

Programming Languages

ruby
36898 projects - #4 most used programming language

Labels

Projects that are alternatives of or similar to Hue

NZXTSharp
The one-stop C# SDK for NZXT devices.
Stars: ✭ 48 (-84.42%)
Mutual labels:  hue
arclight
A Rails engine supporting discovery of archival material
Stars: ✭ 25 (-91.88%)
Mutual labels:  gem
pixela
Pixela API client for Ruby
Stars: ✭ 23 (-92.53%)
Mutual labels:  gem
log-symbols
A ruby 💎gem💎 for generating log symbols
Stars: ✭ 14 (-95.45%)
Mutual labels:  gem
snapcrawl
Crawl a website and take screenshots
Stars: ✭ 37 (-87.99%)
Mutual labels:  gem
dynamodb-api
DynamoDB API wrapper gem. like SQL and simply.
Stars: ✭ 15 (-95.13%)
Mutual labels:  gem
jquery-datatables
Jquery datatables ruby gems for assets pipeline
Stars: ✭ 73 (-76.3%)
Mutual labels:  gem
Double entry
A double-entry accounting system for Ruby applications.
Stars: ✭ 276 (-10.39%)
Mutual labels:  gem
pwdcalc
Take no risk and help your users to choose good passwords!
Stars: ✭ 11 (-96.43%)
Mutual labels:  gem
jekyll-commonmark
CommonMark generator for Jekyll
Stars: ✭ 28 (-90.91%)
Mutual labels:  gem
enumerations
Better Rails Enumerations
Stars: ✭ 34 (-88.96%)
Mutual labels:  gem
bigdata-fun
A complete (distributed) BigData stack, running in containers
Stars: ✭ 14 (-95.45%)
Mutual labels:  hue
nlp-pure
Natural language processing algorithms implemented in pure Ruby with minimal dependencies
Stars: ✭ 19 (-93.83%)
Mutual labels:  gem
jarvis
Jarvis Home Automation
Stars: ✭ 81 (-73.7%)
Mutual labels:  hue
Kelvin
Kelvin - The hue bot
Stars: ✭ 256 (-16.88%)
Mutual labels:  hue
pretty trace
Love Your Ruby's Backtrace
Stars: ✭ 13 (-95.78%)
Mutual labels:  gem
nomad-ruby
The official Ruby client for Nomad
Stars: ✭ 27 (-91.23%)
Mutual labels:  gem
Pwned
An easy, Ruby way to use the Pwned Passwords API.
Stars: ✭ 290 (-5.84%)
Mutual labels:  gem
Material icons
A simple Rails wrapper for Google Material Icons
Stars: ✭ 266 (-13.64%)
Mutual labels:  gem
dude
A daily assistant in the hard work of a programmer
Stars: ✭ 19 (-93.83%)
Mutual labels:  gem

Hue

Gem Version Build Status

Work with Philips Hue light bulbs from Ruby.

Installation

Add this line to your application's Gemfile:

gem 'hue'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hue

Usage

The first time you use it, it will automatically create a user for you. Doing this requires you to have pushed the button on your bridge in the last 30 seconds. If you haven't it will throw an exception and let you know you need to push the button. Simply press the button and run the command again.

CLI

$ hue all on
$ hue all off
$ hue all --hue 65280 --brightness 20
$ hue light 2 on
$ hue light 2 --brightness 20

Ruby

client = Hue::Client.new

Lights

light = client.lights.first
light.on!
light.hue = 46920
light.color_temperature = 100
transition_time = 10*5 # Hue transition times are in 1/10 of a second.
light.set_state({:color_temperature => 400}, transition_time)

Groups

# Fetching
group = client.groups.first
group = client.group(1)

# Accessing group lights
group.lights.first.on!
group.lights.each { |light| light.hue = rand(Hue::Light::HUE_RANGE) }

# Creating groups
group = client.group # Don't specify an ID
group.name = "My Group"
group.lights = [3, 4] # Can specify lights by ID
group.lights = client.lights.first(2) # Or by Light objects
group.new? # => true
group.create! # Once the group is created, you can continue to customize it
group.new? # => false

# Destroying groups
client.groups.last.destroy!

Contributing

See the contributing guide.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].