# Vicki LoRaWAN

### Get device data

*Request URL:*

```
POST /provider/fetch
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number" : "{Vicki Serial Number}"
}
```

*Response:*

```
{
    "provider": {
        "mac": "70B3D52DD3000AF8",
        "displayDigits": 22,
        "temperature": 22.882380449859,
        "humidity": 35.15625,
        "motorRange": 0,
        "motorPosition": 0,
        "batteryVoltage": 3.2,
        "openWindow": false,
        "childLock": false,
        "highMotorConsumption": false,
        "lowMotorConsumption": false,
        "rssi": -81,
        "temeprature_range_settings": {
            "min": 5,
            "max": 30
        },
        "keepalive_time": 3,
        "open_window_params": {
            "enabled": false,
            "duration": 10,
            "motorPosition": 0,
            "delta": 2
        },
        "operational_mode": "01",
        "internal_algo_params": {
            "period": 10,
            "pFirstLast": 20,
            "pNext": 20
        },
        "tdiff_params": {
            "warm": 1,
            "cold": 1
        },
        "uplink_type": "00",
        "join_retry_period": 10,
        "network_provider": "the_things_industries",
        "spf": "7",
        "deviceVersions": {
            "hardware": 26,
            "software": 41
        },
        "watchDogParams": {
            "wdpC": 17,
            "wdpUc": 24
        },
        "frameCount": 1811,
        "joinRequestCount": 176,
        "lastActive": "2023-02-28 20:30:22",
        "extSensorOn": [],
        "extSensorIs": "",
        "thermostatIs": null,
        "application": "software-dev",
        "proportionalAlgorithmParameters": {
            "coefficient": 3,
            "period": 10
        },
        "temperatureControlAlgorithm": "proportional",
        "attachedBackplate": true,
        "calibrationFailed": false,
        "perceiveAsOnline": true,
        "childLockBehavior": "01",
        "activeFrom": "2022-11-22 09:02:15",
        "online": true,
        "scheduleInfo": {
            "inSchedule": false,
            "mainTarget": null,
            "inPriority": false
        }
    },
    "_links": {
        "self": {
            "href": "/v1/provider/fetch"
        }
    }
}
```

{% content-ref url="/pages/-McIZn7YSxp3e7aaHdRV" %}
[Vicki high priority commands](/mclimate-api-documentation/control-devices-1/vicki/vicki-high-priority-commands.md)
{% endcontent-ref %}

### Set motor position Only

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_motor_position_only",
  "position" : 240 // range 0 to motorRange
}
```

*Response:*

```
{
    "provider": {
        "commandName": "SetTargetTemperatureAndMotorPosition",
        "commandParams": {
            "motorPosition": 200,
            "targetTemperature": 26
        },
        "deviceId": "70******************5E"
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Target Temperature

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_target_temperature",
  "temp" : 25 // digits in range 5-30
}
```

*Response:*

```
{
    "provider": {
        "commandName": "SetTargetTemperature",
        "commandParams": {
            "motorPosition": 200,
            "targetTemperature": 25
        },
        "deviceId": "70****************E"
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Motor Position and Target Temperature

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_mp_and_tt",
  "motor_position" : 250, // range 0 to motorRange
  "target_temperature": 25 // digits in range 5-30
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "603516e008f81715fffd182a",
        "commandName": "SetTargetTemperatureAndMotorPosition",
        "commandParams": {
            "motorPosition": 250,
            "targetTemperature": 26
        },
        "deviceId": "70****************E",
        "createdAt": "2021-02-23T14:53:20.825Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Open Window

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_open_window",
  "enabled" : true, // true if we want to enable it or false if we want to 
          disable it
  "close_time": 20, //for how long should the device keep the set motor position
         after it detected an open window event (example value: 20 (if we want
         to have the Vicki at the defined position for 20 minutes));
  "motor_position": 300, //the motor position of the device for the specified time
         after an open window event was detected
  "delta" : 1 // the value of the desired difference in the measured temperature
         (degrees in Celsius)
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6035176a08f81715fffd1832",
        "commandName": "SetOpenWindow",
        "commandParams": {
            "enabled": true,
            "delta": 1,
            "closeTime": 20,
            "motorPosition": 300
        },
        "deviceId": "70B*************E",
        "createdAt": "2021-02-23T14:55:38.119Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Open Window

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_open_window"
}
```

*Response:*

```
{
    "provider": {
        "enabled": true,
        "close_time": 20,
        "motor_position": 300,
        "delta": 1
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}

```

### Child Lock

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "child_lock",
  "enabled" : true, // true if we want to enable it or false if we want to 
          disable it
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "60353b9308f81715fffd18fb",
        "commandName": "SetChildLock",
        "commandParams": {
            "enabled": true
        },
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T17:29:55.911Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Min/Max Range

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_range",
  "min" : 10, // the minimum value* for the device range
  "max" : 20 // the maximum value* for the device range
}
```

*\*Note that the min/max values should be between 5 and 30!*

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "60353c9e08f81715fffd1907",
        "commandName": "SetTemperatureRange",
        "commandParams": {
            "min": 10,
            "max": 20
        },
        "deviceId": "70B3D52DD300015E",
        "createdAt": "2021-02-23T17:34:22.884Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Min/Max Range

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_range"
}
```

*Response:*

```
{
    "provider": {
        "min": 10,
        "max": 20
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Summer Mode&#x20;

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "summer_mode",
  "enabled:" : true
}
```

*Response:*

```
{
    "provider": {
        "success": true,
        "message": "Vicki was succesfully updated."
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

More info about summer mode command:

{% content-ref url="/pages/-McIZVISrOj9YvxUelgr" %}
[Summer Mode](/mclimate-api-documentation/control-devices-1/vicki/summer-mode.md)
{% endcontent-ref %}

### Force Close Vicki&#x20;

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
    "command" : "force_close_vicki"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "60353d1f08f81715fffd190f",
        "commandName": "ForceClose",
        "commandParams": [],
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T17:36:31.367Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set KeepAlive Time

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_keepalive_time",
  "time" : 3 // in minutes, minimum is 3
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "60353eea08f81715fffd1924",
        "commandName": "SetKeepAlive",
        "commandParams": {
            "time": 3
        },
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T17:44:10.252Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get KeepAlive Time

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_keepalive_time"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036c795994ab35c7c701b95",
        "commandName": "GetKeepAliveTime",
        "commandParams": [],
        "deviceId": "70*************E",
        "createdAt": "2021-02-24T21:39:33.922Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Pending Commands

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_pending_commands"
}
```

*Response:*

```
{
    "provider": [
        {
            "_id": "652d43a7c4ff3228464dfb08",
            "deviceId": "70B**********8B",
            "commandName": "GetKeepAliveTime",
            "commandParams": [],
            "status": "queued",
            "createdAt": "2023-10-16T14:07:35.872Z",
            "__v": 0
        }
    ],
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

## Algorithms

### Set Temperature Control Algorithm

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_temperature_control_algorithm",
  "algorithm": "01" // "00" - Proportional "01" - Equal
}
```

### Add  Ext temp sensor to Vicki

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command": "set_ext_sensor",
  "ext_sensor": "{Ext sensor mac }"
}
```

### Send external temperature to Vicki

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command": "set_ext_temp",
  "temp": 25 // integer
}
```

### Request Proportional Algorithm Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "request_temperature_control_algorithm"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "603548f308f81715fffd1985",
          "commandName": "GetTemperatureControlAlgorithm",
        "commandParams": [],
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T18:26:59.826Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Offline Algorithm Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_offline_algo_params",
  "period": 10, // in minutes
  "p_first_last":20,  // steps
  "p_next":20  // steps
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "603548f308f81715fffd1985",
        "commandName": "SetInternalAlgoParams",
        "commandParams": {
            "period": 10,
            "pFirstLast": 20,
            "pNext": 20
        },
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T18:26:59.826Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Offline Algorithm Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_offline_algo_params"
}
```

*Response:*

```
{
    "provider": {
        "period": 10,
        "p_first_last": 20,
        "p_next": 20
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Offline Algorithm Tdiff Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_offline_algo_tdiff_params",
  "warm": 1, // in °C
  "cold":1  // in °C
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6081bebaa72e0d0018734b14",
        "commandName": "SetInternalAlgoTdiffParams",
        "commandParams": {
            "cold": 1,
            "warm": 1
        },
        "deviceId": "70*************E",
        "createdAt": "2021-04-22T18:21:46.742Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Request Offline Algorithm Tdiff Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "request_offline_algo_tdiff_params"
}
```

*Response:*

```
{
    "provider": {
        "commandName": "GetInternalAlgoTdiffParams",
        "commandParams": [],
        "deviceId": "70*************E"
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Proportional Algorithm Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_proportional_algorithm_parameters",
  "coefficient": 3, 
  "period":15
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "603548f308f81715fffd1985",
          "commandName": "SetProportionalAlgorithmParameters",
        "commandParams": {
            "coefficient": 3,
            "period": 15
        },
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T18:26:59.826Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Request Proportional Algorithm Parameters

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "request_proportional_algorithm_parameters"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "603548f308f81715fffd1985",
          "commandName": "GetProportionalAlgorithmParameters",
        "commandParams": [],
        "deviceId": "70*************E",
        "createdAt": "2021-02-23T18:26:59.826Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Watch Dog Params

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_watch_dog_params",
  "confirmed_uplinks": 3,
  "unconfirmed_uplinks":3
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "611baa3f0c6c35001c5e737d",
        "commandName": "SetWatchDogParams",
        "commandParams": {
            "confirmedUplinks": 3,
            "unconfirmedUplinks": 3
        },
        "deviceId": "70B3D52DD3000F10",
        "createdAt": "2021-08-17T12:23:27.419Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Watch Dog Params

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_watch_dog_params"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036ce5bf6c1b85f22d280cc",
        "commandName": "GetWatchDogParams",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T22:08:27.116Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Device Version

*Request URL:*

```
POST /provider/fetch
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number" : "{Vicki Serial Number}",
  "command" : "get_device_version"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036c987994ab35c7c701bac",
        "commandName": "GetDeviceVersion",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:47:51.812Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Join Retry Period

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_join_retry_period",
  "period" : 2, //minutes, cannot be 0
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036c9c3994ab35c7c701bb1",
        "commandName": "SetJoinRetryPeriod",
        "commandParams": {
            "period": 2
        },
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:48:51.970Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Join Retry Period

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_join_retry_period"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036caaf994ab35c7c701bbe",
        "commandName": "GetJoinRetryPeriod",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:52:47.045Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Uplink Type

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_uplink_type",
  "type" : "01"  // string, "00" - unconfirmed, "01" - confirmed
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036cb0a994ab35c7c701bc4",
        "commandName": "SetUplinkType",
        "commandParams": {
            "type": "01"
        },
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:54:18.528Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Uplink Type

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "get_uplink_type"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036cb66994ab35c7c701bcb",
        "commandName": "GetUplinkType",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:55:50.153Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Operational Mode

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_operational_mode",
  "mode": "00" // string, 
   // "00" - Online manual control mode. Default for the device,
   // "01" - Online automatic control mode;
   // "02" - Online automatic control mode with external temperature reading.
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6081c55fe4aff80018adb8f8",
        "commandName": "SetOperationalMode",
        "commandParams": {
            "mode": "00"
        },
        "deviceId": "70*************E",
        "createdAt": "2021-04-22T18:50:07.561Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Request Operational Mode

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "request_operational_mode"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6036cb66994ab35c7c701bcb",
        "commandName": "GetOperationalMode",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-02-24T21:55:50.153Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Recalibrate Motor

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "recalibrate_motor"
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "6081c92ce4aff80018adb97b",
        "commandName": "RecalibrateMotor",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2021-04-22T19:06:20.812Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Child Lock Behavior

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

```
{
  "serial_number": “{Vicki Serial Number}”,
  "command" : "set_child_lock_behavior",
  "behavior" : "01"  // string, "00" - Child lock is automatically disabled when the device goes offline,
                      //   "01" - Child lock remains unchanged when the device goes offline
}
```

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "63fe63d091b86c001c351638",
        "commandName": "SetChildLockBehavior",
        "commandParams": {
            "behavior": "01"
        },
        "deviceId": "36*************8",
        "createdAt": "2023-02-28T20:28:00.423Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Get Child Lock Behavior

*Request URL:*

```
POST /provider/send
```

*Headers:*

```
Content-Type: application/json
Authorization: Bearer {access_token}
```

*Body*:

<pre><code>{
  "serial_number": “{Vicki Serial Number}”,
<strong>  "command" : "get_child_lock_behavior"
</strong>}
</code></pre>

*Response:*

```
{
    "provider": {
        "status": "pending",
        "_id": "63fe643b91b86c001c35163c",
        "commandName": "GetChildLockBehavior",
        "commandParams": [],
        "deviceId": "36*************8",
        "createdAt": "2023-02-28T20:29:47.238Z",
        "__v": 0
    },
    "_links": {
        "self": {
            "href": "/v1/provider/send"
        }
    }
}
```

### Set Proportional Gain

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral#proportional-gain-kp>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_proportional_gain",
  "proportional_gain" : 2.74688  // double
}
```

### Set Integral Gain

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral#integral-gain-ki>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_integral_gain",
  "integral_gain" : 0.412678  // double
}
```

### Get Integral Value

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral#get-the-value-of-the-integral>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "request_integral_value"
}
```

### Set PI Run Period

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral#pi-run-period>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_pi_run_period",
  "period" : 15 // in minutes
}
```

### Set Temp Hysteresis

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/operational-modes-and-temperature-control-algorithm/algorithm-3-proportional-integral#temperature-hysteresis-thys>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_temp_hysteresis",
  "hysteresis" : 1.5 // double 
}
```

### Set Open Window Precisely

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/open-window-detection>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_open_window_precisely",
  "enabled" : true,
  "duration": 30, // minutes
  "delta": 1.3 // double
}
```

### Set Force Attach

\*More info: <https://docs.mclimate.eu/mclimate-lorawan-devices/devices/mclimate-vicki-lorawan/vicki-lorawan-device-communication-protocol/force-close#force-attach-a-vicki>

*Body*:

```
{
  "serial_number": “{Serial Number}”,
  "command" : "set_force_attach",
  "enabled" : false
}
```


---

# 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://docs.mclimate.eu/mclimate-api-documentation/control-devices/vicki-lorawan.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.
