Skip to content

DatScreamer/openrgb-philips-hue-sync

Repository files navigation

Hue To OpenRGB Sync

This project mirrors a Hue entertainment area to the OpenRGB SDK.

Note: I've only tested the Hue side of things, not the OpenRGB side of things. I will test the OpenRGB side of things when my PC with OpenRGB is running again in about 1-2 weeks.

Setup

  1. Copy the example config:
cp .env.example .env
  1. Edit .env with your own values.

Example:

HUE_BRIDGE_ADDR=192.168.1.20
HUE_APPLICATION_KEY=your-hue-application-key
HUE_ENTERTAINMENT_AREA_NAME=Example Area
OPENRGB_DEVICE_NAME=Example RGB Controller
OPENRGB_ZONE_NAME=Zone A
  1. Start the sync:
go run .

CLI flags can override .env values.

Required Variables

  • HUE_BRIDGE_ADDR
  • HUE_APPLICATION_KEY

Optional Variables

  • HUE_ENTERTAINMENT_AREA_ID
  • HUE_ENTERTAINMENT_AREA_NAME
  • OPENRGB_HOST
  • OPENRGB_PORT
  • OPENRGB_DEVICE_ID
  • OPENRGB_DEVICE_NAME
  • OPENRGB_ZONE_ID
  • OPENRGB_ZONE_NAME
  • OPENRGB_AUTO_RESIZE_ZONE
  • HUE_INSECURE_SKIP_VERIFY
  • RECONNECT_DELAY
  • VERBOSE

Hue Application Key

Press the Hue Bridge link button, then run:

curl -X POST https://<HUE_BRIDGE_ADDRESS>/api \
  -d '{"devicetype":"openrgb-hue-sync#example-client"}' \
  --insecure

Manual Hue Tests

Enable manual tests in .env:

HUE_MANUAL_TEST=true

Detect a manual change:

go test -run TestHueAreaDetectsManualChangeWithin10Seconds -v

Set the selected area to purple and restore it afterward:

go test -run TestHueAreaCanBeSetToPurple -v

The manual tests require HUE_BRIDGE_ADDR, HUE_APPLICATION_KEY, and either HUE_ENTERTAINMENT_AREA_ID or HUE_ENTERTAINMENT_AREA_NAME to be set in .env.

Build

go build ./...

Releases

No releases published

Packages

 
 
 

Contributors

Languages