https://github.com/troublete/go-hue
Lua runtime to control Philips Hue lamps 💡
https://github.com/troublete/go-hue
golang lua philips philips-hue
Last synced: 19 days ago
JSON representation
Lua runtime to control Philips Hue lamps 💡
- Host: GitHub
- URL: https://github.com/troublete/go-hue
- Owner: troublete
- License: mit
- Created: 2021-12-10T19:06:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-10T20:03:23.000Z (over 4 years ago)
- Last Synced: 2025-02-22T19:51:21.368Z (over 1 year ago)
- Topics: golang, lua, philips, philips-hue
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-hue
> Control Philips Hue Lamps with Lua
## About
This is just a throw-away tooling to control Hue Lamps with a simple Lua script.
```bash
hue -interval=2000 script.lua # run script.lua every 2 seconds (omit *-interval=x* to run one-time)
```
The runtime exposes **loop** global variable when ran in interval mode, so one
is able to keep track of the iterations run.
The runtime exposes **bridges** which is a table of all bridges "found";
(format: {bridge_serial(string)=bridge(table)})
## Install
```bash
# install Lua (i.e. checkout, make generic, sudo make install)
make build
sudo make install
```
## Troubleshooting
- Sometimes SSDP does not discover a Hue bridge/a Hue bridge does not
advertise itself; try re-running the script when this happens.
- When creating a user, it is necessary to first hit the 'link' button on the
bridge; if you don't, an error will tell you to do so.
## Related
- [Bridge Device Limits](https://developers.meethue.com/develop/application-design-guidance/bridge-maximum-settings/)
- [Querying Limits](https://developers.meethue.com/develop/application-design-guidance/hue-system-performance/)