{"id":23550854,"url":"https://github.com/octoblu/node-hue-util","last_synced_at":"2025-08-17T16:52:21.493Z","repository":{"id":35326453,"uuid":"39588391","full_name":"octoblu/node-hue-util","owner":"octoblu","description":"Node module for controlling Philips Hue lights","archived":false,"fork":false,"pushed_at":"2017-03-03T01:32:37.000Z","size":28,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-08-09T08:20:40.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/octoblu.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}},"created_at":"2015-07-23T19:41:52.000Z","updated_at":"2017-03-27T12:58:47.000Z","dependencies_parsed_at":"2022-08-25T13:41:13.355Z","dependency_job_id":null,"html_url":"https://github.com/octoblu/node-hue-util","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/octoblu/node-hue-util","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoblu%2Fnode-hue-util","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoblu%2Fnode-hue-util/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoblu%2Fnode-hue-util/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoblu%2Fnode-hue-util/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octoblu","download_url":"https://codeload.github.com/octoblu/node-hue-util/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octoblu%2Fnode-hue-util/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270877279,"owners_count":24661121,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-12-26T10:17:41.485Z","updated_at":"2025-08-17T16:52:21.441Z","avatar_url":"https://github.com/octoblu.png","language":"CoffeeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Philips\n\nNode module for controlling Philips Hue lights\n\n## Installation\n\n`npm install hue-util`\n\n## Example\n\n```javascript\nvar HueUtil = require('hue-util');\n\nvar app = 'hue-util';\nvar ipAddress = '192.168.1.15'; // Use the ipAddress of the bridge or null\nvar username = null;\nvar hue = new HueUtil(app, ipAddress, username, onUsernameChange);\n\nvar options = {\n  lightNumber: 0, // Light Number or Group Number\n  useGroup: true, // To use group or not\n  on: false, // Turn the light on or off\n  color: 'red', // TinyColor2 color string  \n  transitiontime: // A number to define transitiontime (optional)\n  alert: undefined// Alert string (optional)\n  effect: undefined // Effect string (optional)\n};\n\n// Change the lights\nhue.changeLights(options, function(error, response){\n  if(error != null) return console.error('Error changing lights', error);\n  console.log('Response from changing lights', response);\n});\n\n// Check the sensors\nhue.checkSensors(function(error, response){\n  if(error != null) return console.error('Error checking sensors', error);\n  console.log('Response from checking sensors', response);\n});\n\n// Check the states of the buttons on a hue button\nvar sensorName = 'SensorName'; // name of your sensor\nhue.checkButtons(sensorName, function(error, response){\n  if(error != null) return console.error('Error checking buttons', error);\n  console.log('Response from checking buttons', response);\n  // To prevent duplicates compare the different between the last state and the current state.\n  // Button code will be conversion from the raw button code and will be a number between 1 and 4.\n  // Response\n  // {state: {...}, button: 1}\n});\n\nfunction onUsernameChange(newUsername){\n  username = newUsername;\n  // Store the username for future use\n  // otherwise you'll be required to press the hue bridge link button again\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoblu%2Fnode-hue-util","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctoblu%2Fnode-hue-util","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoblu%2Fnode-hue-util/lists"}