# Groups

> Organize Devices by plant or cell, share Profiles between them, and turn the Agent Hub or Collection on for every Device at once.

URL: https://www.trakhound.com/docs/mtconnect-server/groups

A **Group** is a named set of Devices, such as a plant, a department, or a cell, with an optional description of what it's for. Groups organize the lists of Devices and the Agent Hub overview into collapsible sections, share [Profiles](https://www.trakhound.com/docs/mtconnect-server/profiles) between Devices, and turn the Agent Hub or Collection on or off for all of their Devices at once. A Device is in one Group at most.

## Add a Group

A Group is created by giving a Device a Group name: type a new name or choose an existing one when adding a Device, or on the Device's **Configuration** tab. Group names ignore case. The Groups are listed under **Groups** in the App's menu.

- Changing a Device's Group doesn't restart the Device or change its Agent Hub URLs.
- Devices without a Group are listed under **No Group**.
- The Agent Hub's Device list (`GET /` on the Hub) reports each Device's Group as `group`.

## A Group's Page

Open a Group to change its **Name** and **Description**, add or remove Devices (**Add a Device**), and set its Profiles.

![A Group's page, with its Profiles and Devices](https://www.trakhound.com/img/screenshots/previews/mtconnect-server-groups.webp)

### Profiles

A Group's Profiles apply **live**: each of its Devices has the Group's Profiles while it's collected, including Devices added to the Group later. On a Device's Collection tab they're shown ticked and locked (**From its Group**). The Device can add more Profiles, but can't opt out of its Group's.

For example, give the Group *Plant 1* a Tables Profile that stores everything in SQL Server, and one Device in it an extra Messages Profile that publishes its Conditions to MQTT.

### Apply to All Devices

**Apply to all Devices** acts once on the Group's current Devices:

- **Turn On AgentHub** / **Turn Off AgentHub**
- **Turn On Collection** / **Turn Off Collection**
- **License** - **Assign to Collected Devices** assigns a License to each of the Group's Devices that's collected.

Devices added to the Group later aren't changed, so a License is never used without someone choosing it.

> Joining a Group never starts collecting a Device. Deleting a Group keeps its Devices, without the Group's Profiles.
