0

I am attempting to create groups using hue api using the following request:

Endpoint : /api/<userid>/groups
Method: POST
Params: {"name":"Test creation", "lights":["2","3"]}

I get the following response:

[{"success": {"id": "/groups/6"}}]

However when I call:

Endpoint : /api/<userid>/groups/6
Method: GET

I get this:

{"action": {"on": false,"effect": "none"},"lights": [],"name": "Test creation 2"}

It appears that the lights are not being set. I have not seen anywhere else to set the group members. I don't get an error just a blank array.

How do you properly set group members?

RileyJ
  • 148
  • 1
  • 6

1 Answers1

0

Are you sure your Hue environment has lights "2" and "3"? Your /api//groups/6 (GET) response shows it has en empty array of lights. Check your environment of lights. /api//lights (GET) are "2" and "3" present?

What result do you get when doing /api//groups/0? This should contain all lights.

  • Yes all lights are present when requesting the 0 group and all lights. – RileyJ Oct 15 '14 at 17:14
  • I have noticed that groups can only contain lights that are present at the moment of creation. So try the following: validate if groups/0 has lights 2 and 3. Then do a POST to create a new group with ligths 2 and 3. Do a get on groups to see if the new group contains light 2 and 3. – Koen van der Linden Oct 16 '14 at 09:24
  • Interesting observation. I will look into that. It may be that they need to be directly available to the bridge. Since each light acts as a repeater I wonder if there is a functionality difference between a light that is being repeated to, rather than directly connected to the bridge. I will experiment. – RileyJ Oct 17 '14 at 15:37