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": "70B3D52DD300015E",
"displayDigits": 26,
"temperature": 24.453125,
"humidity": 32.03125,
"motorRange": 492,
"motorPosition": 250,
"batteryVoltage": 3.4000000000000004,
"openWindow": false,
"childLock": false,
"highMotorConsumption": false,
"lowMotorConsumption": false,
"rssi": -46,
"online": true,
"temeprature_range_settings": {
"min": 5,
"max": 30
},
"keepalive_time": 1,
"open_window_params": {
"enabled": false,
"duration": 20,
"motorPosition": 100,
"delta": 3
},
"operational_mode": "01",
"internal_algo_params": {
"period": 20,
"pFirstLast": 20,
"pNext": 20
},
"tdiff_params": {
"warm": 2,
"cold": 4
},
"uplink_type": "01",
"join_retry_period": 10,
"network_provider": "the_things_network"
},
"_links": {
"self": {
"href": "/v1/provider/fetch"
}
}
}

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_motor_position",
"position" : 25 // digits in range 5-30
}

Response:

{
"provider": {
"commandName": "SetTargetTemperatureAndMotorPosition",
"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

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:

Force Close Vicki

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"
}
}
}

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 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"
}
}
}

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"
}
}
}

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"
}
}
}