Instant Philips Hue control via the local Hue Gateway HTTP API. Translates fuzzy requests ("vibes") and natural language into concrete room/zone/light actions (on/off, brightness, color temperature, simple colors). Use when the user asks to control Philips Hue lights (or mentions Hue, Hue Bridge, Hue scenes) and you can reach the Hue Gateway from the execution environment.
You control Philips Hue only via the already-running Hue Gateway service.
You translate fuzzy user requests into specific actions on specific Hue entities (rooms/zones/lights). Keep the interaction short, confident, and “assistant-y”.
If you have access to the server-side tool hueGateway, use it.
POST /v2/actions) directly from the server (no bash/curl).inventory.snapshot, room.set, zone.set, light.set, grouped_light.set, scene.activate, resolve.by_name, actions.batch.clipv2.request is an escape hatch but should be .Read-only rule (important):
hueGateway call: inventory.snapshot, then answer from the snapshot.resolve.by_name for simple listing; you can match names directly in result.rooms[] / result.zones[] and filter result.lights[].Only use Bash/curl when:
hueGateway; otherwise 1 Bash tool call bundling all curl calls).grouped_light) unless the user asks for a specific individual light.Hue has rooms and zones:
Users often say “room” or “in <name>” when they really mean an area that could be either a room or a zone. Treat room/zone naming as interchangeable user language.
When the user gives a name (e.g. “Keuken”):
inventory.snapshot (one tool call).result.rooms[].name and result.zones[].name.light.roomRid == room.ridzone.roomRids[], then filter lights where light.roomRid is in that sethttp://hue-gateway:8000 (recommended when using docker sandboxd + shared network)/v2/*):
Authorization: Bearer dev-tokenX-API-Key: dev-keyEnvironment override knobs:
BASE_URL: Hue Gateway base URL.HUE_AUTH_HEADER: full header line to use for auth (e.g. Authorization: Bearer ... or X-API-Key: ...).HUE_TOKEN: bearer token value (used if HUE_AUTH_HEADER is unset).HUE_API_KEY: API key value (used if HUE_AUTH_HEADER is unset).Important: if you execute via a sandboxed Bash tool, localhost refers to the sandbox, not the host machine running Hue Gateway.
Important: Bash tool calls do not preserve shell state between tool invocations; keep base URL selection + actions in the same Bash call, or set BASE_URL explicitly each time.
If BASE_URL is not provided, try these in order until health succeeds:
http://hue-gateway:8000 (recommended when Hue Gateway is attached to the sandbox network)http://host.docker.internal:8000 (common for Docker Desktop on macOS/Windows)http://localhost:8000 (only works when executing on the same host/network namespace as the gateway)localhost:8000 from a sandboxed Bash tool unless you know the gateway is in the same network namespace.result.data for clipv2.request; Hue resources are at result.body.data.curl -f for /v2/actions calls (it hides useful JSON error bodies); use curl -sS.grouped_light.set (names are often missing/ambiguous for grouped lights).python3 - <<'PY' ... json.load(sys.stdin) ... PY (stdin is already used for the
Python program). Use python3 -c ... <<<"$JSON" (or jq) instead.BASE_URL + ensure ready (fast; put this at the top of the same Bash tool call where you run actions):set -euo pipefail
CURL_HEALTH='curl -fsS --connect-timeout 1 --max-time 2'
BASE_URL="${BASE_URL:-}" # optional: user/environment provided
if [ -z "$BASE_URL" ]; then
for base in "http://hue-gateway:8000" "http://host.docker.internal:8000" "http://localhost:8000"; do
if $CURL_HEALTH "$base/healthz" >/dev/null; then
BASE_URL="$base"
break
fi
done
fi
[ -n "$BASE_URL" ] || { echo "Hue Gateway not reachable from this environment. Set BASE_URL to a reachable base URL."; exit 1; }
BASE_URL="${BASE_URL%/}"
echo "Using BASE_URL=$BASE_URL"
READY_JSON="$($CURL_HEALTH "$BASE_URL/readyz")"
case "$READY_JSON" in
*'"ready":true'*|*'"ready": true'*) : ;;
*) echo "Hue Gateway is not ready (ready=false)."; exit 1 ;;
esac
AUTH_HEADER="${HUE_AUTH_HEADER:-}"
if [ -z "$AUTH_HEADER" ]; then
if [ -n "${HUE_API_KEY:-}" ]; then
AUTH_HEADER="X-API-Key: $HUE_API_KEY"
else
AUTH_HEADER="Authorization: Bearer ${HUE_TOKEN:-dev-token}"
fi
fi
curl -sS --connect-timeout 1 --max-time 8 -X POST "$BASE_URL/v2/actions" \
-H 'Content-Type: application/json' \
-H "X-Request-Id: demo-rooms-1" \
-H "$AUTH_HEADER" \
-d '{"requestId":"demo-rooms-1","action":"inventory.snapshot","args":{}}'
Optional helper: if this skill is installed under ./.skills (RemcoChat default), you can get a parsed list as:
bash ./.skills/hue-instant-control/scripts/list_rooms.sh
This prints: <room-name>\t<grouped_light_rid>\t<room_rid>.
bash ./.skills/hue-instant-control/scripts/room_set_by_name.sh --room "Woonkamer" --brightness 35 --color-temp-k 2400
grouped_light.set (RID-based; no guessing):curl -sS --connect-timeout 1 --max-time 8 -X POST "$BASE_URL/v2/actions" \
-H 'Content-Type: application/json' \
-H "X-Request-Id: demo-gl-1" \
-H "$AUTH_HEADER" \
-d '{"requestId":"demo-gl-1","action":"grouped_light.set","args":{"rid":"<GROUPED_LIGHT_RID>","state":{"on":true,"brightness":35,"colorTempK":2400}}}'
Note: for clipv2.request responses, Hue resources are at result.body.data (not result.data).
light.set (fast; no discovery needed):curl -sS --connect-timeout 1 --max-time 8 -X POST "$BASE_URL/v2/actions" \
-H 'Content-Type: application/json' \
-H "X-Request-Id: demo-light-1" \
-H "$AUTH_HEADER" \
-d '{"requestId":"demo-light-1","action":"light.set","args":{"name":"Vibiemme","state":{"on":true}}}'
Optional helper script (handles base URL selection + readiness + auth):
bash ./.skills/hue-instant-control/scripts/light_set_by_name.sh --name "Vibiemme" --on true
bash ./.skills/hue-instant-control/scripts/room_vibe.sh --room "Woonkamer" --vibe cozy
--confirm when it affects >2 rooms):bash ./.skills/hue-instant-control/scripts/zone_set_by_name.sh --zone "Downstairs" --on false
bash ./.skills/hue-instant-control/scripts/zone_set_by_name.sh --zone "Downstairs" --on false --confirm
bash ./.skills/hue-instant-control/scripts/zone_list_lights.sh --zone "Beneden" --print-ok
bash ./.skills/hue-instant-control/scripts/room_list_lamps.sh --room "Woonkamer" --print-ok
references/REFERENCE.mdscripts/health_check.shscripts/list_rooms.shscripts/light_set_by_name.shscripts/room_set_by_name.shscripts/room_vibe.shscripts/zone_set_by_name.shscripts/zone_list_lights.shscripts/room_list_lamps.sh