# Request Device Configuration

> Returns a list of configuration preferences of the device.

**Request**

* <mark style="color:red;">`packetID`</mark> : A random six-digit ID for this packet.
* <mark style="color:red;">`payload`</mark> :&#x20;
  * <mark style="color:red;">`callbackName`</mark> : 1

```json
{
    "packetID": 819796,
    "payload":
    {
        "callbackName": 1
    }
}
```

#### Response

* <mark style="color:red;">`sn`</mark>: The serial number of the InvisOutlet.
* <mark style="color:red;">`packetID`</mark>: Represents the ID of the packet based on request <mark style="color:red;">`packetID`</mark>.
* <mark style="color:red;">`PUBACK`</mark> : If the request is successfully processed; 1 - Successful, 0 - Fail.
* <mark style="color:red;">`payload`</mark>:&#x20;
  * <mark style="color:red;">`callbackName`</mark>: 1
  * <mark style="color:red;">`callbackArgs`</mark>:&#x20;
    * <mark style="color:red;">`acc_prefs`</mark> :
      * <mark style="color:red;">`outletPwrIndicatorOn`</mark>: Enable/disable InvisDeco outlet indicator lights; 1 - On, 0 - Off.
      * <mark style="color:red;">`pmIndicatorBrightness`</mark>: Configure the indicators brightness; 1 - 100.
      * <mark style="color:red;">`capacitiveCtrl`</mark>: Enable/disable InvisDeco to control outlets via capacitive touch; 1 - On, 0 - Off.
      * <mark style="color:red;">`magicTouchCtrl`</mark>: Enable/disable InvisDeco capacitive touch as magic touch; 1 - On, 0 - Off.
      * <mark style="color:red;">`aqiColorRGBFeature`</mark>: Enable/disable InvisDeco's RGB indicator light to indicator AQI color code; 1 - On, 0 - Off.
      * <mark style="color:red;">`motionAwayFeature`</mark>: Enable/disable InvisDeco's Security Alert feature; 1 - On, 0 - Off.
      * <mark style="color:red;">`adaptiveNightlightFeature`</mark>: Enable/disable InvisDeco's Adaptive Nightlight feature; 1 - On, 0 - Off.
      * <mark style="color:red;">`adaptiveMinBrightness`</mark>: Configure the minimum brightness for Adaptive Nightlight feature; 0-99.
      * <mark style="color:red;">`adaptiveMaxBrightness`</mark>: Configure the maximum brightness for Adaptive Nightlight feature; 1-100. The value cannot be less than <mark style="color:red;">`adaptiveMinBrightness`</mark>.
      * <mark style="color:red;">`occupancyNightlightFeature`</mark>: Enable/disable InvisDeco's Occupancy Nightlight feature; 1 - On, 0 - Off.
      * <mark style="color:red;">`overrideAdaptiveOccupancyNightlightFeature`</mark>: Enable this setting to override <mark style="color:red;">`adaptiveNightlightFeature`</mark>  and <mark style="color:red;">`occupancyNightlightFeature`</mark> if either one is enabled. If enabled, <mark style="color:red;">`adaptiveNightlightFeature`</mark>  and <mark style="color:red;">`occupancyNightlightFeature`</mark>  will be disabled when the user controls the nightlight on/off or brightness; 1 - On, 0 - Off.
      * <mark style="color:red;">`homeAwayMode`</mark>: Home Away Mode (Vacation Mode) settings.
        * <mark style="color:red;">`enabled`</mark>: Enable/disable Home Away Mode (Vacation Mode); 1 - On, 0 - Off.
        * <mark style="color:red;">`outlet1Enabled`</mark>: Enable/disable Home Away Mode being applied to Outlet 1; 1 - On, 0 - Off.
        * <mark style="color:red;">`outlet2Enabled`</mark>: Enable/disable Home Away Mode being applied to Outlet 2; 1 - On, 0 - Off.
        * <mark style="color:red;">`nightlightEnabled`</mark>: Enable/disable Home Away Mode being applied to Nightlight; 1 - On, 0 - Off.
        * <mark style="color:red;">`minBrightness`</mark>: Set minimum Nightlight brightness when Home Away Mode is enabled; 0-100.
        * <mark style="color:red;">`maxBrightness`</mark>: Set maximum Nightlight brightness when Home Away Mode is enabled; 1-100.
        * <mark style="color:red;">`minOnDuration`</mark>: Set minimum on duration for Outlet 1, Outlet 2, and/or Nightlight; 0-65535 minutes.
        * <mark style="color:red;">`maxOnDuration`</mark>: Set maximum on duration for Outlet 1, Outlet 2, and/or Nightlight; 1-65535 minutes.
        * <mark style="color:red;">`minOffDuration`</mark>: Set minimum off duration for Outlet 1, Outlet 2, and/or Nightlight; 0-65535 minutes.
        * <mark style="color:red;">`maxOffDuration`</mark>: Set maximum off duration for Outlet 1, Outlet 2, and/or Nightlight; 1-65535 minutes.
      * <mark style="color:red;">`sys_prefs`</mark> :
        * <mark style="color:red;">`mqtt`</mark> :&#x20;
          * <mark style="color:red;">`enabled`</mark> : Enable/disable MQTT TCP client service; 1 - On, 0 - Off.
          * <mark style="color:red;">`mqtt_broker_url`</mark> : The URL of the MQTT broker that InvisOutlet will be connected to.
          * <mark style="color:red;">`user`</mark> : The username to authenticate and connect to the MQTT broker.
          * <mark style="color:red;">`pass`</mark> : The password to authenticate and connect to the MQTT broker.
          * <mark style="color:red;">`qos`</mark> : The QoS level of the MQTT message; 0, 1, 2, or 3.
        * <mark style="color:red;">`internet`</mark> :&#x20;
          * <mark style="color:red;">`ip`</mark> : IP address of the device in `uint32_t`.
          * <mark style="color:red;">`mainDNS`</mark> : IP address of the primary DNS in `uint32_t`.
          * <mark style="color:red;">`backupDNS`</mark> : IP address of the secondary DNS in `uint32_t`.

```json
{
    "sn": "11B29200071",
    "packetID": 819796,
    "PUBACK": 1,
    "payload": {
        "callbackName": 1,
        "callbackArgs": {
            "acc_prefs": {
                "outletPwrIndicatorOn": 1,
                "pmIndicatorBrightness": 50,
                "capacitiveCtrl": 0,
                "magicTouchCtrl": 0,
                "adaptiveNightlightFeature": 0,
                "adaptiveMinBrightness": 0,
                "adaptiveMaxBrightness": 100,
                "overrideAdaptiveOccupancyNightlightFeature": 0,
                "homeAwayMode": {
                    "enabled": 0,
                    "outlet1Enabled": 0,
                    "outlet2Enabled": 0,
                    "nightlightEnabled": 1,
                    "minBrightness": 0,
                    "maxBrightness": 100,
                    "minOnDuration": 10,
                    "maxOnDuration": 60,
                    "minOffDuration": 10,
                    "maxOffDuration": 60
                }
            },
            "sys_prefs": {
                "mqtt": {
                    "enabled": 1,
                    "mqtt_broker_url": "mqtt://homeassistant.local:1883",
                    "user": "mqttuser",
                    "pass": "mqttpass",
                    "qos": 1
                },
                "internet": {
                    "ip": 2835523776,
                    "mainDNS": 16843009,
                    "backupDNS": 16777217
                }
            }
        }
    }
}
```

<details>

<summary>Special Features Description</summary>

* Security Alert: If any motion is detected, all InvisDeco indicators and nightlight will flash at maximum brightness, until no motion is detected.
* Adaptive Nightlight: The nightlight will automatically adjust its brightness based on ambient brightness. The adaptive minimum and maximum brightness can be adjusted via the <mark style="color:red;">`adaptiveMinBrightness`</mark> and <mark style="color:red;">`adaptiveMaxBrightness`</mark> parameter to suit your preferences.
* Occupancy Nightlight: The nightlight will automatically be turned on when occupancy is detected. <mark style="color:red;">`adaptiveNightlightFeature`</mark> and <mark style="color:red;">`occupancyNightlightFeature`</mark> can be activated at the same time. When <mark style="color:red;">`adaptiveNightlightFeature`</mark> is not activated, the nightlight will be turned on based on previously set brightness, when <mark style="color:red;">`adaptiveNightlightFeature`</mark> is activated, then it will follow *Adaptive Nightlight*'s settings to turn on/off the nightlight.
* Home Away Mode: The home away mode will randomly turn on/off outlet 1, outlet 2, and/or nightlight depending on if <mark style="color:red;">`outlet1Enabled`</mark> <mark style="color:red;">`outlet2Enabled`</mark> <mark style="color:red;">`nightlightEnabled`</mark> is enabled or not. The Nightlight brightness can be randomized with a range set, with <mark style="color:red;">`minBrightness`</mark> and <mark style="color:red;">`maxBrightness`</mark>. The brightness can be static when both  <mark style="color:red;">`minBrightness`</mark> and <mark style="color:red;">`maxBrightness`</mark> are set to the same value. The on/off duration can also be randomized, with <mark style="color:red;">`minOnDuration`</mark> <mark style="color:red;">`maxOnDuration`</mark> <mark style="color:red;">`minOffDuration`</mark> <mark style="color:red;">`maxOffDuration`</mark> . If the on off duration are set to the same, then the duration will be static instead of randomlized.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.intecular.com/invisoutlet-aura/information-and-preferences/request-device-configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
