Move device from one experience group to another

We are using experience groups and specifically its ability to group devices with hierarchy. Devices are assigned to a specific group in the hierarchy initially, but we need the ability to ‘move’ a device from one group to another through workflow or api. What is the recommended way to accomplish this?

Hi @Edward_Cline,

This currently does not exist as prebuilt functionality within a node as the devices in the group can only be modified from the Users & Groups menu. There is, however, the option of utilizing the Losant API Node with the Experience Group PATCH method. The documentation can be found here.

How are you currently assigning your devices to groups? Is it through tags or explicit IDs?

Thanks!
Julia

The best way to do this is to use device tags when associating devices to groups. Here are two screenshots of two different Experience Groups that use tags to associate devices:


With this implementation, if you wanted to move a device from the “Sadler Isberg” group to the “Tekton Health” group, you would only have to change the value of the “group” tag on the device you want to move. No changes to the Experience Group itself would be required.

This implementation can be found in the Industrial Equipment Monitor template, so feel free to create an app from that template and explore!

1 Like

We have used this method, assigning a device tag to each device that is the groupId of the group it should be in. We chose groupId because we didn’t want to try to enforce&manage uniqueness on group names. Then in group setup we used advanced query as shown below. Two further questions:

  1. does this seem like a solid solution?
  2. is there a way to view groupId in the portal as you can with deviceId. If not, that may be a nice feature to add. We were able to grab it from workflow query, but would be nice to have quickly available in the portal for dev/test/debug purposes.

groupid1

@Edward_Cline,

  1. The method that Brandon recommended will work as well. By using tags for your group assignment, you gain this ability and will work whether you associate the Group IDs or Device IDs.

  2. Not currently! I can put in a feature request for this for you.