{"id":16397332,"url":"https://github.com/pmant/hue-push-client","last_synced_at":"2025-11-14T03:03:43.004Z","repository":{"id":39750550,"uuid":"401718039","full_name":"Pmant/hue-push-client","owner":"Pmant","description":"https://github.com/Pmant/hue-push-client","archived":false,"fork":false,"pushed_at":"2023-04-22T21:32:43.000Z","size":142,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-04T17:45:24.489Z","etag":null,"topics":["api","hue","philips","philips-hue","push"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pmant.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2021-08-31T13:43:04.000Z","updated_at":"2022-01-14T23:45:38.000Z","dependencies_parsed_at":"2024-11-09T13:44:22.326Z","dependency_job_id":"dde3385f-677b-4add-b1d0-a47a8a274eac","html_url":"https://github.com/Pmant/hue-push-client","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pmant%2Fhue-push-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pmant%2Fhue-push-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pmant%2Fhue-push-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pmant%2Fhue-push-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pmant","download_url":"https://codeload.github.com/Pmant/hue-push-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240286519,"owners_count":19777353,"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":["api","hue","philips","philips-hue","push"],"created_at":"2024-10-11T05:09:51.248Z","updated_at":"2025-11-14T03:03:37.969Z","avatar_url":"https://github.com/Pmant.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hue push client\n[![License](https://img.shields.io/badge/License-MIT-blue)](#license \"Go to license section\")\n\nAllows easy access to the push API of Philips Hue Bridge\n\n# Installation\n`npm install hue-push-client`\n\n# Usage Example\n```javascript\n/**\n * This example connects to a Hue Bridge and closes connection after 30 seconds\n */\nconst HuePushClient = require('hue-push-client');\n\nconst client = new HuePushClient({ip: '10.0.0.1', user: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'});\nsetTimeout(() =\u003e {client.close();}, 30000);\nclient.addEventListener('open', function () {\n    console.log('connection opened');\n});\nclient.addEventListener('close', function () {\n    console.log('connection closed');\n});\nclient.addEventListener('error', function (e) {\n    console.log('error: ' + e.message);\n});\nclient.addEventListener('message', function (message) {\n    if (!message.data) {\n        console.log('empty message');\n        return;\n    }\n    try {\n        let data = JSON.parse(message.data);\n        console.log(JSON.stringify(data));\n    } catch (e) {\n        console.log('could not parse data');\n        return;\n    }\n});\n```\nThe data part of an incomming message looks like this:\n```json\n[\n   {\n      \"creationtime\":\"2021-09-01T08:40:54Z\",\n      \"data\":[\n         {\n            \"id\":\"d231f405-baab-406e-0000-d345a1440000\",\n            \"id_v1\":\"/sensors/8\",\n            \"light\":{\n               \"light_level\":10509,\n               \"light_level_valid\":true\n            },\n            \"type\":\"light_level\"\n         }\n      ],\n      \"id\":\"f15d7da4-f849-44c9-0000-afc54dbe0000\",\n      \"type\":\"update\"\n   }\n]\n```\n\nYou can also retrieve a description of all UUID's that are used in update messages:\n```javascript\n/**\n * Be aware that uuids() returns a promise\n */\nasync function getUUIDs() {\n    try {\n        let UUIDs = await client.uuids();\n        console.log(UUIDs);\n    } catch (e) {\n        console.log(e);\n    }\n};\ngetUUIDs();\n```\n\n# Documentation\ntodo (see examples)\n\n# license\nReleased under [ISC](https://github.com/Pmant/hue-push-client/blob/master/license.txt) by @Pmant","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmant%2Fhue-push-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmant%2Fhue-push-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmant%2Fhue-push-client/lists"}