> For the complete documentation index, see [llms.txt](https://docs.blynk.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blynk.io/en/hardware-guides/the-things-stack/device-grouping.md). Agents can also search and read this documentation through its [MCP server](https://docs.blynk.io/en/~gitbook/mcp).

# Device Grouping

To ensure seamless integration and effective device management, follow these principles:

### Use Separate Applications and Templates for Different Device Types

**• Why:** Each device type typically has unique data structures and behaviors. Using separate templates ensures that Blynk can correctly process and display device-specific telemetry data.

**• How:** Create a dedicated application in The Things Stack for each Blynk template. This alignment allows you to configure a payload formatter at the application level, ensuring consistent data formatting across devices within the same group.

### Group Devices of the Same Type in the Same Application and Template

**• Why:** Grouping devices of the same type within a single application simplifies management and avoids issues caused by mixing different device types.

**• How:** Use a common payload formatter for all devices within an application. This reduces the risk of errors and ensures consistent behavior across similar devices.

### Benefits of This Approach

#### **Consistency in Data Processing**

Configuring a shared payload formatter at the application level ensures uniformity, preventing potential bugs caused by incompatible data formats.

#### **Simplified Maintenance**

Managing devices of the same type in a single application and template makes it easier to update configurations, troubleshoot issues, and scale the solution.

#### **Accurate Template Association**

By separating applications for different templates, Blynk can correctly associate devices with their respective templates during the import process.

{% hint style="warning" %}
**No Device Provisioning for Mixed Templates**

If multiple Blynk templates are connected to a single The Things Stack application, Device Provisioning from The Things Stack will be disabled for all associated templates. This limitation can lead to challenges in managing device lifecycles and should be avoided.
{% endhint %}

<figure><img src="https://1839001309-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MBFTVMf7L6S67HOuqVC%2Fuploads%2F9WTQFx1LqLWahZZUNcMH%2Fthe-things-network-device-onboarding-warning.png?alt=media&amp;token=410cf152-79d0-4518-b0cd-6fc08dc428bd" alt="" width="563"><figcaption><p>Device Provisioning is disabled warning</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.blynk.io/en/hardware-guides/the-things-stack/device-grouping.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
