Niutonian: Hue Setup
The boring node that makes the whole Hue pack work
- result
Every node in the Niutonian_Comfyui_Philips_Hue pack is useless until you've run this one once. Niutonian: Hue Setup is the key ceremony that turns your ComfyUI into a legitimate Hue bridge client: it finds your bridge, registers you with it, saves the API key, and lists your lights. You'll use it for about ten minutes, then never think about it again - until you change networks or get a new bulb and suddenly remember how much it matters.
Why this node exists at all
Philips Hue doesn't hand out API keys over the counter. To get one you have to physically press the round button on top of the Hue Bridge, and then immediately make a registration request - that's the "push button pairing" model that keeps random devices from claiming control of your lights. This node automates that whole dance so you don't have to write curl commands at your bridge. The key gets stored in hue_config.json inside the pack folder, and every other node in the pack reads it from there when you leave api_key blank.
What the actions do
The node has just two inputs: bridge_ip (default auto) and an action dropdown. Pick an action, queue the prompt, read the result output. That's the entire UI, and honestly that's the right call for a setup tool.
auto_scan- finds bridges on your network. It checks Philips' cloud discovery endpoint (discovery.meethue.com), then SSDP multicast, then falls back to a subnet sweep. Output looks like192.168.1.100 (meethue).register_new- the button-press step. Press the bridge's physical button, run this within ~30 seconds, and the node POSTs yourdevicetypeto the bridge and saves the returned key tohue_config.json.check_connection- verifies the saved key and reports how many lights the bridge sees.list_lights- lists each light with its numeric ID, on/off state, and capabilities likecolor_xy,hue_sat,white_temperature,brightness. This is where you learn your strip is light1and your dimmable desk lamp is2. Write those IDs down; every other node asks for them.test_flash- flashes all lights on the bridge. It's the fastest end-to-end sanity check you have: if the flash works, your IP, key, and network path are all correct, and any remaining problems are about the light itself.
The setup flow
Run it in this order and you'll be done in five minutes:
bridge_ip = auto action = auto_scan
bridge_ip = 192.168.1.100 action = register_new # press the button first
bridge_ip = 192.168.1.100 action = list_lights
bridge_ip = 192.168.1.100 action = test_flash
Installing it
ComfyUI Manager search "Niutonian", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Niutonian/Niutonian_Comfyui_Philips_Hue
Restart ComfyUI. No extra Python packages, no models - the whole pack uses only the standard library plus numpy, which ComfyUI already has.
Common issues
- "Press the Hue bridge button" - that's error type 101 from the bridge itself. You genuinely have to press it, and you have about 30 seconds. Run
register_newagain with the button held down and it'll take. auto_scanfinds multiple bridges - stop usingauto; type the exact IP of the bridge that controls your strip intobridge_ip.list_lightssays no API key - you skippedregister_new, or the button-press timing lapsed. Redo it.test_flashdoes nothing - the bridge IP is wrong or the lights are unreachable in the Hue app itself. Verify the app can control them first.
One security note: hue_config.json is the master key to every light in your house. It's in the pack's .gitignore, so don't fight that - never commit it, and don't share it.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| bridge_ip | STRING | auto | — |
| action | COMBO | 5 options: auto_scan, check_connection, register_new, list_lights, test_flash |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| result | STRING | — |