# LE DeviceHub - Component Router

> You are at https://api.litmus.io/le/devicehub/agents.md.
> Parent: https://api.litmus.io/le/agents.md
> Pick the sub-component matching your task and fetch only that file.

---

## What DeviceHub is

The LE component that talks to industrial devices (PLCs, sensors, OPC UA servers). Manages drivers, devices, tags, and tag discovery (Browse).

- All endpoints are GraphQL at `POST {{edgeUrl}}/devicehub/v2`
- Auth: Bearer token (see /le/agents.md#authentication)

---

## Sub-components

| Sub-component | What it covers | Fetch |
|---|---|---|
| Devices | Create / start / stop / delete a device | /le/devicehub/devices.md |
| Drivers | List driver groups, get driver templates | /le/devicehub/drivers.md |
| Tags | Create / update / delete tags, read values | /le/devicehub/tags.md |
| Browse | Bulk tag discovery on a connected device | /le/devicehub/browse.md |
| Asset Discovery | Network scan for devices | /le/devicehub/asset-discovery.md |
| Prometheus Metrics | DeviceHub Prometheus exporter | /le/devicehub/prometheus.md |
| **Driver Examples** | One CreateDevice example per supported driver (146 drivers) | /le/devicehub/driver-examples.md |
| **Register Reference** | Register types accepted by each driver (146 drivers) | /le/devicehub/register-reference.md |

The last two are large reference dumps. Only fetch them when you need the exact CreateDevice JSON for a specific driver, or the supported register types for that driver.

---

## Quick path

| Keywords | Fetch |
|---|---|
| "create a device with tags" (full chain) | /workflows/create-device-with-tags.md |
| "browse for tags" | /workflows/browse-bulk-tags.md |
| "list devices", "list drivers" | /le/devicehub/devices.md, /le/devicehub/drivers.md |
| "Modbus", "S7", "EtherNet/IP", "OPC UA" (driver setup) | /le/devicehub/driver-examples.md |
| "register type", "what registers does driver X support" | /le/devicehub/register-reference.md |
| "scan network", "find devices on subnet" | /le/devicehub/asset-discovery.md |

---

## Common GraphQL pattern

Every DeviceHub call goes to the same URL:

```
POST {{edgeUrl}}/devicehub/v2
Authorization: Bearer <token>
Content-Type: application/json

{ "query": "<GraphQL query or mutation>" }
```

Mutations follow a `Verb + Noun` convention: `CreateDevice`, `UpdateTag`, `StartDevice`, `DeleteTag`, etc. Queries use `List<Noun>` or `Get<Noun>By<Field>`.

---

## When to back out

| Task | Fetch |
|---|---|
| Expose discovered tags upstream via OPC UA | /le/opcua.md |
| Send tag values to cloud (Kafka, Azure IoT, ...) | /le/integration/agents.md |
| Compute or transform tag values (analytics, flow logic) | /le/analytics.md or /le/flows.md |
| Manage devices across multiple edges (fleet) | /lem/edge-lifecycle/edge-devices.md |
| Not in DeviceHub at all | back out to /le/agents.md |
