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

# Digital I/O

### Required Parameters

To add a digital input or a digital output device, such as pushbuttons or a LED status indicator, the following parameters are required.

<ParamField path="id" type="string" required>
  A unique identifier for the device.

  **Example:** `pushbuttons`
</ParamField>

<ParamField path="type" type="string" required>
  Indicates the type of device. For this type of device, it is always `digitalInputOutput`.

  **Example:** `digitalInputOutput`
</ParamField>

<ParamField path="addressMap" type="string" required>
  The name of the device’s address map on the controller.

  **Example:** `pushbuttons_address_map`
</ParamField>

<ParamField path="disabled" type="bool" required>
  Indicates whether the device is enabled or disabled. A value of true means the device is disabled, while false means the device is enabled.
</ParamField>

### Optional Parameters

The following parameters can be added to digital input or output devices; however, they are optional and not required. These parameters provide additional functionality to the device.

<ParamField path="retainInputs" type="bool">
  This parameter indicates if the inputs should be retained or not. If true, when input changes state, it will keep the value for 10 seconds.

  <Note>
    Note that this parameter is relevant only for digital inputs, not for outputs.
  </Note>
</ParamField>

<ParamField path="controlMap" type="string">
  The name of the device’s control map on the controller.

  **Example:** `indicators_rgb7_control`
</ParamField>

### Example

The snippet below demonstrates two different digital input/output devices, highlighting both the required and optional parameters.

```json icon="code" theme={null}
[
  {
    "id": "pushbuttons",
    "type": "digitalInputOutput",
    "addressMap": "pushbuttons_address_map",
    "retainInputs": true,
    "disabled": false
  },
  {
    "id": "indicators",
    "type": "digitalInputOutput",
    "controlMap": "indicators_rgb7_control",
    "addressMap": "indicators_address_map",
    "disabled": false
  }
]
```

<Warning>
  When configuring a digital input or output device, ensure that all required parameters are correctly specified to avoid configuration errors.
  Optional parameters can provide additional functionality and control but are not necessary for basic operation.
  Always verify that the paths provided for addressMap and controlMap are accurate and that the files exist in the specified locations.
</Warning>
