# Dam (https://logable.app/docs/reference/device-types/dam)

Irrigation dams and reservoirs with water level monitoring.

## Metrics

| Field | Type | Required | Unit | Description |
| --- | --- | --- | --- | --- |
| level | number | Yes | % | Water level. In "level" mode this is a percentage of full supply level; in "ultrasonic" mode the device sends the raw sensor distance and ingest normalizes it to a percentage before storage. |
| distance | number | No |  | Raw ultrasonic sensor distance from the sensor to the water surface, in the device's configured sensorUnit. Populated by ingest when trackingMode is "ultrasonic". |

## Configuration

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| trackingMode | level, ultrasonic | Yes | level | How the device reports level. "level": device sends a percentage directly. "ultrasonic": device sends a distance reading (as the level metric) that ingest converts to a percentage using damDepth and sensorHeight. |
| sensorUnit | mm, cm, m | No | mm | Unit of the raw distance reported by the ultrasonic sensor. When set, damDepth/sensorHeight are interpreted as METRES and ingest converts the raw reading to metres before normalizing. Only relevant when trackingMode is "ultrasonic". |
| damDepth | number | No |  | Depth of the dam at full supply level, in metres. Required when trackingMode is "ultrasonic" (used to normalize the sensor distance) or when capacitySource is "dimensions" (used as the depth dimension for size-based capacity). |
| sensorHeight | number | No | 0 | How far the ultrasonic sensor sits above the full-supply line, in metres. Defaults to 0. |
| capacitySource | manual, dimensions | No | manual | How total capacity is determined. "manual": user enters capacity + capacityUnit. "dimensions": capacity is computed from the dam geometry (damShape + dimensions + damDepth). |
| capacity | number | No |  | Total storage capacity (manual entry). |
| capacityUnit | ML, kL, m3, L | Yes | ML | Unit of measurement for the manually-entered capacity. |
| damShape | round, rectangular | Yes | round | Geometry used to compute size-based capacity. Only relevant when capacitySource is "dimensions". |
| damDiameter | number | Yes |  | Diameter of the dam across the surface, in metres (round shape). Use the diameter, not the radius, because it is easier to measure across a dam. |
| damLength | number | Yes |  | Length of the dam, in metres (rectangular shape). |
| damWidth | number | Yes |  | Width of the dam, in metres (rectangular shape). |
| location | string | No |  | Dam location |

## Example payload

```json
{
  "timestamp": "2026-07-01T10:00:00.000Z",
  "status": "online",
  "data": {
    "level": 64.8,
    "distance": 100
  }
}
```

For HTTP and MQTT code samples, see https://logable.app/docs/reference/device-types/dam.

## Guides

- [Dam level monitoring](https://logable.app/solutions/dam-monitoring)
- [Monitor a water tank remotely](https://logable.app/docs/guides/equipment/monitor-a-water-tank-remotely)