> For the complete documentation index, see [llms.txt](https://adatrack.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://adatrack.gitbook.io/docs/documentation/core-concepts/device-profiles.md).

# Device Profiles

In AdaTrack, a **Device Profile** is a foundational template that defines a specific model or type of hardware in your fleet. It serves as the "blueprint" for how individual devices of that type should behave and how their data should be interpreted.

### Why use Device Profiles?

Managing hundreds or thousands of identical devices individually is inefficient and prone to error. Device Profiles allow you to:

1. **Standardize Decoding:** Define a single JavaScript decoder script that applies to all devices of the same model.
2. **Centralize Configuration:** Update the metadata or decoding logic in one place, and the changes immediately apply to every associated device.
3. **Simplify Registration:** When adding a new device, you simply link it to an existing profile rather than re-configuring its logic.

### Anatomy of a Device Profile

A profile consists of several key attributes:

* **Name:** A user-friendly identifier (e.g., "Industrial Temperature Sensor v2").
* **Manufacturer & Model:** Metadata used for filtering and organizing your fleet.
* **Payload Decoder:** The most critical component. A JavaScript snippet (ES5 or ES6+) that converts the raw binary UDP payload into a structured JSON object. You can use modern syntax like arrow functions, `const`/`let`, template literals, and destructuring — the platform transpiles ES6+ automatically.

> **Device classification** (map marker icon and colour) is managed separately through [Device Categories](/docs/documentation/features/device-categories.md). A profile defines *how to decode* a device's data; a category defines *what kind of device* it is.

### The Relationship: Profile vs. Device

The relationship between a Profile and a Device is **1-to-Many**:

* **1 Profile** (e.g., "Model-X Tracker")
* **Many Devices** (e.g., Device A, Device B, Device C... all of type "Model-X Tracker")

When a UDP packet arrives from **Device A**, AdaTrack identifies the device, looks up its associated **Profile**, and then executes that profile's **Payload Decoder** to process the data.

### Creating a Profile

To create a profile, navigate to the **Device Profiles** page in the sidebar:

1. Click **Create Profile**.
2. Enter the basic metadata (Name, Manufacturer, Model).
3. Write your **Payload Decoder** (see the [Telemetry & Decoders](/docs/documentation/core-concepts/telemetry-decoders.md) guide for details).
4. **Save** the profile.

Once saved, this profile will be available in the dropdown menu when you register a new device.

### Best Practices

* **Version your Profiles:** If a manufacturer releases a firmware update that changes the payload format, create a new profile (e.g., "Model-X v2") rather than overwriting the old one. This ensures older devices continue to work correctly.
* **Use Descriptive Names:** Include the firmware version or specific hardware revision in the profile name.
* **Test before Saving:** Use the "Test Decoder" feature in the dashboard to verify your JavaScript logic against a sample hex payload before applying it to your live fleet. The decoder editor validates syntax in real time as you type, highlighting errors with line numbers.
