hue

Getting started
Golang binary is built with static link. You can download it directly from the Github Release page or build it by yourself by cloning this repo and running make.
A Docker image is available for amd64, arm and arm64 platforms on Docker Hub: vibioh/hue.
You can configure app by passing CLI args or environment variables (cf. Usage section). CLI override environment variables.
You'll find a Kubernetes exemple (without secrets) in the infra/ folder. It contains two ingresses : one for "same network access" and another, publicly available but with basic-auth.
Get credentials from bridge
To connect to your bridge, you'll need credentials generated by Hue Bridge.
Get username for Hue API by browsing http://192.168.1.10/debug/clip.html and retrieve username credentials.
POST /api
Body: {"devicetype":"hue"}
Usage
Usage of hue:
-address string
[http] Listen address {HUE_ADDRESS}
-bridgeIP string
[hue] IP of Bridge {HUE_BRIDGE_IP}
-cert string
[http] Certificate file {HUE_CERT}
-config string
[hue] Configuration filename {HUE_CONFIG}
-corsCredentials
[cors] Access-Control-Allow-Credentials {HUE_CORS_CREDENTIALS}
-corsExpose string
[cors] Access-Control-Expose-Headers {HUE_CORS_EXPOSE}
-corsHeaders string
[cors] Access-Control-Allow-Headers {HUE_CORS_HEADERS} (default "Content-Type")
-corsMethods string
[cors] Access-Control-Allow-Methods {HUE_CORS_METHODS} (default "GET")
-corsOrigin string
[cors] Access-Control-Allow-Origin {HUE_CORS_ORIGIN} (default "*")
-csp string
[owasp] Content-Security-Policy {HUE_CSP} (default "default-src 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline'")
-frameOptions string
[owasp] X-Frame-Options {HUE_FRAME_OPTIONS} (default "deny")
-graceDuration string
[http] Grace duration when SIGTERM received {HUE_GRACE_DURATION} (default "30s")
-hsts
[owasp] Indicate Strict Transport Security {HUE_HSTS} (default true)
-idleTimeout string
[http] Idle Timeout {HUE_IDLE_TIMEOUT} (default "2m")
-key string
[http] Key file {HUE_KEY}
-loggerJson
[logger] Log format as JSON {HUE_LOGGER_JSON}
-loggerLevel string
[logger] Logger level {HUE_LOGGER_LEVEL} (default "INFO")
-loggerLevelKey string
[logger] Key for level in JSON {HUE_LOGGER_LEVEL_KEY} (default "level")
-loggerMessageKey string
[logger] Key for message in JSON {HUE_LOGGER_MESSAGE_KEY} (default "message")
-loggerTimeKey string
[logger] Key for timestamp in JSON {HUE_LOGGER_TIME_KEY} (default "time")
-okStatus int
[http] Healthy HTTP Status code {HUE_OK_STATUS} (default 204)
-port uint
[http] Listen port {HUE_PORT} (default 1080)
-prometheusIgnore string
[prometheus] Ignored path prefixes for metrics, comma separated {HUE_PROMETHEUS_IGNORE}
-prometheusPath string
[prometheus] Path for exposing metrics {HUE_PROMETHEUS_PATH} (default "/metrics")
-readTimeout string
[http] Read Timeout {HUE_READ_TIMEOUT} (default "5s")
-shutdownTimeout string
[http] Shutdown Timeout {HUE_SHUTDOWN_TIMEOUT} (default "10s")
-url string
[alcotest] URL to check {HUE_URL}
-userAgent string
[alcotest] User-Agent for check {HUE_USER_AGENT} (default "Alcotest")
-username string
[hue] Username for Bridge {HUE_USERNAME}
-writeTimeout string
[http] Write Timeout {HUE_WRITE_TIMEOUT} (default "10s")