{"id":26002866,"url":"https://github.com/mperlet/huevent","last_synced_at":"2025-07-26T05:13:56.619Z","repository":{"id":57623252,"uuid":"135808385","full_name":"mperlet/huevent","owner":"mperlet","description":"Missing Sensor/Switch Events for Philips Hue Bridge","archived":false,"fork":false,"pushed_at":"2020-09-19T10:10:41.000Z","size":13,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T17:54:32.593Z","etag":null,"topics":["api","events","golang","hooks","hue-api","hue-dimmer-switch","hue-events","hue-motion-sensor","hue-presence","hue-sensors","hue-tap","philips-hue","philips-hue-button","philips-hue-events","philips-hue-switch","sensor","sensors","shell","switches","trigger"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mperlet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-02T10:26:21.000Z","updated_at":"2023-09-03T02:52:06.000Z","dependencies_parsed_at":"2022-08-27T00:01:22.063Z","dependency_job_id":null,"html_url":"https://github.com/mperlet/huevent","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mperlet%2Fhuevent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mperlet%2Fhuevent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mperlet%2Fhuevent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mperlet%2Fhuevent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mperlet","download_url":"https://codeload.github.com/mperlet/huevent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242093160,"owners_count":20070656,"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","events","golang","hooks","hue-api","hue-dimmer-switch","hue-events","hue-motion-sensor","hue-presence","hue-sensors","hue-tap","philips-hue","philips-hue-button","philips-hue-events","philips-hue-switch","sensor","sensors","shell","switches","trigger"],"created_at":"2025-03-05T19:34:51.642Z","updated_at":"2025-03-05T19:34:52.432Z","avatar_url":"https://github.com/mperlet.png","language":"Go","readme":"# Huevent - Events for Philips-Hue buttons and sensors\n\n\u003e Handle events from hue sensors\n\n## Example\n\n```\nhuevent - get events from buttons and sensors\nUsage: ./huevent [OPTIONS] \n  -config string\n    \tpath to config file (default \"~/.huevent/huevent.yml\")\n  -debug\n    \tenable some debug output\n  -exit\n    \texit on event\n  -pair\n    \tpair hue bridge\n  -sensors\n    \tprint sensors response and exit\n```\n\n```\n./huevent \n00:00:00:00:00:42:43:2f-f3      buttonevent\t16\n00:17:88:01:10:33:35:98-02-fc00\tbuttonevent\t1000\n00:17:88:01:03:29:57:55-02-0402\ttemperature\t2134\n00:17:88:01:03:29:57:55-02-0406\tpresence\tfalse\n00:17:88:01:03:29:57:55-02-0400\tlightlevel\t19888\n\n```\n\n## Supported Device and Event Types\n\n| Device            | Event-Type (eventType) | Event-Data (triggerOn) | Description                                                   |\n| ----------------- | ---------------------- | ---------------------- | ------------------------------------------------------------- |\n| Hue Tap           | buttonevent            | 34                     | 1 Dot Key                                                     |\n|                   | buttonevent            | 16                     | 2 Dot Key                                                     |\n|                   | buttonevent            | 17                     | 3 Dot Key                                                     |\n|                   | buttonevent            | 18                     | 4 Dot Key                                                     |\n| Hue Dimmer Switch | buttonevent            | 1000                   | Hard press ON, followed by Event-Data 1002                    |\n|                   | buttonevent            | 1001                   | Long press ON (send while hold the button)                    |\n|                   | buttonevent            | 1003                   | Release ON (after Long press)                                 |\n|                   | buttonevent            | 1002                   | Soft press ON                                                 |\n|                   | buttonevent            | 2000                   | Hard press BRIGHTER, followed by Event-Data 2002              |\n|                   | buttonevent            | 2001                   | Long press BRIGHTER (send while hold the button)              |\n|                   | buttonevent            | 2003                   | Release BRIGHTER                                              |\n|                   | buttonevent            | 2002                   | Soft press BRIGHTER                                           |\n|                   | buttonevent            | 3000                   | Hard press DARKER, followed by Event-Data 3002                |\n|                   | buttonevent            | 3001                   | Long press DARKER                                             |\n|                   | buttonevent            | 3003                   | Release DARKER                                                |\n|                   | buttonevent            | 3002                   | Soft press DARKER                                             |\n|                   | buttonevent            | 4000                   | Hard press OFF, followed by Event-Data 4002                   |\n|                   | buttonevent            | 4001                   | Long press OFF                                                |\n|                   | buttonevent            | 4003                   | Release OFF                                                   |\n|                   | buttonevent            | 4002                   | Soft press OFF                                                |\n| Hue Motion Sensor | presence               | true                   | Motion detected                                               |\n|                   | presence               | false                  | No Motion detected                                            |\n|                   | temperature            | xxxx                   | Temperature in °C multiplied by 100 (2655 == 26.55°C)         |\n|                   | lightlevel             | xxxxx                  | Lightlevel (0 ~ dark, 20000 ~ normal, 40000 ~ very bright)    |\n\n\n## Configuration\n\nRun `huevent -pair` to pair a local Hue Bridge.\n\n### Configfile\n\n`config`: Hue Bridge IP with Token\n\n`hooks`: Execute commands on specific events\n\n`deviceFilter`: Array(string) of deviceIds, ignore all other devices \n\n\n```\nconfig:\n  ip: 192.168....\n  user: nEh...\nhooks:\n- deviceId: 00:17:88:01:10:33:35:98-02-fc00\n  eventType: buttonevent\n  triggerOn: 1002\n  cmd: echo echo\n- deviceId: 00:00:00:00:00:42:43:2f-f2\n  eventType: buttonevent\n  triggerOn: 18\n  cmd: echo $HUEVENT_PAYLOAD NOOOOPE\n- deviceId: 00:17:88:01:03:29:57:55-02-0406\n  eventType: presence\n  triggerOn: 'true'\n  cmd: echo SOMEBODY BECOMES PRESENT\n- deviceId: 00:17:88:01:03:29:57:55-02-0406\n  eventType: presence\n  triggerOn: 'false'\n  cmd: echo SOMEBODY IS ABSENT\n- deviceId: 00:17:88:01:03:29:57:55-02-0402\n  eventType: temperature\n  cmd: python -c 'import os; print(str(float(os.environ[\"HUEVENT_PAYLOAD\"])/100.0) + \"°C\")'\ndeviceFilter: []\n```\n\n\u003e The default Hue-Bridge polling rate is 333ms. You can set a *\u003e 1ms* rate via \n```\nconfig:\n  ip: 192.168....\n  user: nEh...\n  pollingRateMs: 200\n```\n\n### Manual Pairing\n\n```\n# Press Hue Bridge Button before you ran these commands\nBRIDGE_IP=$(curl https://www.meethue.com/api/nupnp -s | grep -E -o \"([0-9]{1,3}[.]){3}[0-9]{1,3}\")\nUSERNAME=$(curl -s -X POST -d'{\"devicetype\":\"huevent\"}' \"http://$BRIDGE_IP/api\" | grep -P -o '\":\"(.*)\"' | cut -d '\"' -f3)\n\necho \"$BRIDGE_IP $USERNAME\"\n\n```\n\n## Build\n\n```\ngit clone https://github.com/mperlet/huevent.git \u0026\u0026 cd huevent\ndocker run --rm -v \"$PWD\":/huevent:Z -w /huevent -e GOOS=linux -e GOARCH=amd64 golang:1.15.2-buster go build huevent.go\n```\n\n## Examples\n\n* A Remote for Fritz Dect200 Power-Sockets\n* Trigger \u003cInsert-Your-Idea-Here\u003e\n\n## Goreleaser \n\n```\ndocker run --rm --privileged -v $PWD:/go/src/github.com/user/repo -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/user/repo goreleaser/goreleaser release --skip-publish --skip-validate --rm-dist\n```\n\n## Licence\n\nCopyright (c) 2019 Mathias Perlet\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmperlet%2Fhuevent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmperlet%2Fhuevent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmperlet%2Fhuevent/lists"}