Proper Group Deletion

I don’t see information in the documentation specifically about deleting a group via the LAN protocol and I have a few questions. A bulb stores data about the group as indicated here and a bulb can either belong to a single group or no group at all (unlike the old “tag” method, a bulb can’t be in multiple groups, sadly).

  1. What’s the proper SetGroup data for when I want to clear out a bulb so that it no longer is part of a group? I tried sending all-zeros for the group identifier and label, but that just makes it think there’s a group ID [0000000000000000] called “”. Should I be sending a zero’d out ‘updatedat’ field as well, or have that represent the current timestamp?

  2. Does a bulb that knows it belongs to no group supposed to respond to a GetGroup message:

  • not at all
  • with a StateGroup all zero’d out
  • with a StateGroup all zero’d out except for a valid ‘updatedat’ timestamp
  • something else?

I’d love to see an official “here is what you should expect to happen and here is how you should delete group information” so I’m not just guessing and potentially generating crap state that would confuse other apps and the main app. @daniel_hall

Hi @lightbow,

Sorry it has taken a long time to get a response to your question.

A brand new light that has never had a group set will respond to GetGroup with this response :

{"group": "00000000000000000000000000000000", "label": "", "updated_at": 0}

The LIFX apps treat a group id of all zeros as NULL id value and doesn’t display it as a real group.

If you want to delete the group information on a light, you should set the group id to all zeros and the label to be empty. eg.

{"group": "00000000000000000000000000000000", "label": "", "updated_at": 1526875910236}