> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hoplynk.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feeds and Commands

> Feeds are data streams from an asset. Commands are actions you send to an asset.

## Feeds

A **feed** is a named stream of data produced by an asset. Each connector defines the feeds its assets publish — for example, a camera connector publishes a `motion` feed that emits an event whenever motion is detected.

### Feed categories

| Category    | What it contains                            |
| ----------- | ------------------------------------------- |
| `health`    | Device status, online/offline, error states |
| `detection` | Motion alerts, AI object detection events   |
| `telemetry` | GPS, attitude, battery, link metrics        |

### Feed events

A feed event is a JSON payload with a timestamp. Events are delivered in real time over WebSocket, or you can poll the latest value via the REST API.

```json theme={null}
{
  "feed": "motion",
  "asset_id": "...",
  "timestamp": "2026-05-18T14:23:01Z",
  "payload": {
    "detected": true
  }
}
```

### Common feeds by asset type

**Camera**

| Feed           | Category  | Description                                  |
| -------------- | --------- | -------------------------------------------- |
| `status`       | health    | Online state, motion alarm, AI alarm         |
| `motion`       | detection | Motion detected event                        |
| `ai_detection` | detection | AI object detection — people, vehicles, etc. |

**Radio (Silvus)**

| Feed     | Category  | Description                      |
| -------- | --------- | -------------------------------- |
| `status` | health    | Online/offline, signal strength  |
| `link`   | telemetry | Throughput, latency, packet loss |

***

## Commands

A **command** is an action you can send to an asset. Commands are also defined by the connector — only commands that the device actually supports are registered.

### Risk levels

| Level    | Meaning                                                     |
| -------- | ----------------------------------------------------------- |
| `low`    | Reversible, no lasting effect (e.g. move PTZ, go to preset) |
| `medium` | Disruptive but recoverable (e.g. reboot)                    |
| `high`   | Potentially irreversible (e.g. factory reset)               |

### Sending a command

Commands are sent via the API as a **task**. The task payload is validated against the command's input schema before it's forwarded to the connector.

```bash theme={null}
POST /api/assets/{asset_id}/tasks
{
  "command": "ptz_move",
  "payload": {
    "direction": "left",
    "speed": 25
  }
}
```

### Common commands by asset type

**Camera (Reolink)**

| Command                | Description                        | Payload                                               |
| ---------------------- | ---------------------------------- | ----------------------------------------------------- |
| `reboot`               | Reboot the camera                  | —                                                     |
| `ptz_move`             | Move the camera                    | `{ direction: up/down/left/right/stop, speed: 1-64 }` |
| `ptz_preset`           | Go to a saved PTZ preset           | `{ preset_id: 1 }`                                    |
| `set_motion_detection` | Enable or disable motion detection | `{ enabled: true }`                                   |

## Next

<CardGroup cols={2}>
  <Card title="WebSocket streaming" icon="bolt" href="/api-reference/streaming/kit-websocket">
    Subscribe to live feed events in real time.
  </Card>

  <Card title="Building a connector" icon="plug" href="/connectors/building">
    Define your own feeds and commands for new hardware.
  </Card>
</CardGroup>
