{"id":20580823,"url":"https://github.com/soffes/hue","last_synced_at":"2025-05-16T09:03:40.210Z","repository":{"id":7519753,"uuid":"8870570","full_name":"soffes/hue","owner":"soffes","description":"Work with Philips Hue from Ruby","archived":false,"fork":false,"pushed_at":"2024-01-03T18:36:58.000Z","size":115,"stargazers_count":312,"open_issues_count":0,"forks_count":72,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-04-09T04:01:48.786Z","etag":null,"topics":["gem","hue","ruby"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/soffes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-19T04:09:23.000Z","updated_at":"2025-02-19T02:48:24.000Z","dependencies_parsed_at":"2024-06-19T04:12:01.389Z","dependency_job_id":"c649e39c-596e-4bcc-9334-c3d096022a95","html_url":"https://github.com/soffes/hue","commit_stats":{"total_commits":133,"total_committers":22,"mean_commits":6.045454545454546,"dds":"0.42105263157894735","last_synced_commit":"af85008a0b4cbec14917f23162069a4f49ee0bb3"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Fhue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Fhue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Fhue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soffes%2Fhue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soffes","download_url":"https://codeload.github.com/soffes/hue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501554,"owners_count":22081528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gem","hue","ruby"],"created_at":"2024-11-16T06:25:39.447Z","updated_at":"2025-05-16T09:03:40.187Z","avatar_url":"https://github.com/soffes.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hue\n\nWork with Philips Hue light bulbs from Ruby.\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n``` ruby\ngem 'hue'\n```\n\nAnd then execute:\n\n``` shell\n$ bundle\n```\n\nOr install it yourself as:\n\n``` shell\n$ gem install hue\n```\n\n## Usage\n\nThe 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.\n\n### CLI\n\n``` shell\n$ hue all on\n$ hue all off\n$ hue all --hue 65280 --brightness 20\n$ hue light 2 on\n$ hue light 2 --brightness 20\n```\n\n### Ruby\n\n``` ruby\nclient = Hue::Client.new\n```\n\n#### Lights\n\n``` ruby\nlight = client.lights.first\nlight.on!\nlight.hue = 46920\nlight.color_temperature = 100\ntransition_time = 10*5 # Hue transition times are in 1/10 of a second.\nlight.set_state({:color_temperature =\u003e 400}, transition_time)\n```\n\n#### Groups\n\n``` ruby\n# Fetching\ngroup = client.groups.first\ngroup = client.group(1)\n\n# Accessing group lights\ngroup.lights.first.on!\ngroup.lights.each { |light| light.hue = rand(Hue::Light::HUE_RANGE) }\n\n# Creating groups\ngroup = client.group # Don't specify an ID\ngroup.name = \"My Group\"\ngroup.lights = [3, 4] # Can specify lights by ID\ngroup.lights = client.lights.first(2) # Or by Light objects\ngroup.new? # =\u003e true\ngroup.create! # Once the group is created, you can continue to customize it\ngroup.new? # =\u003e false\n\n# Destroying groups\nclient.groups.last.destroy!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoffes%2Fhue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoffes%2Fhue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoffes%2Fhue/lists"}