Open/Close Sensor LoRaWAN
Get device data
Request URL:
POST /provider/fetch
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number" : "{Sensor Device Serial Number}"
}
Response:
{
"provider": {
"network_provider": "the_things_industries",
"application": "mclimate-dev",
"keepAliveTime": 2,
"extSensorOn": [],
"extSensorIs": "",
"webhook_url": "",
"rssi": -51,
"spf": "7",
"joinRequestCount": 19,
"frameCount": 4483,
"deviceVersions": {
"hardware": 13,
"software": 10
},
"lastActive": "2023-11-14 12:40:14",
"activeFrom": "2022-11-22 09:03:42",
"uplinkType": "00",
"thermistorProperlyConnected": true,
"batteryVoltage": 3.28,
"counter": 6,
"status": 0,
"notificationBlindTime": 2,
"sensorTemperature": 19.8,
"watchDogParams": {
"wdpC": 17,
"wdpUc": 24
},
"joinRetryPeriod": 10,
"vickies": [],
"mac": "70B3D52DD700000F",
"online": true,
"scheduleInfo": {
"inSchedule": false,
"mainTarget": null,
"inPriority": false
}
},
"_links": {
"self": {
"href": "/v1/provider/fetch"
}
}
}
Set KeepAlive Time
Request URL:
POST /provider/send
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number": “{Serial Number}”,
"command" : "send_command_to_open_close_sensor",
"command_name" : "SetKeepAlive",
"command_params" : {
"time": 2 // in minutes
}
Get Device Version
Request URL:
POST /provider/fetch
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number" : "{Serial Number}",
"command" : "send_command_open_close_sensor",
"command_name" : "GetDeviceVersion",
"command_params" : {}
}
Set Join Retry Period
Request URL:
POST /provider/send
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number": “{Serial Number}”,
"command" : "send_command_to_open_close_sensor",
"command_name" : "SetJoinRetryPeriod",
"command_params" : {
"period" : 2, //minutes, cannot be 0
}
}
Set Uplink Type
Request URL:
POST /provider/send
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number": “{Serial Number}”,
"command" : "send_command_to_open_close_sensor",
"command_name" : "SetUplinkType",
"command_params" : {
"type" : "01" // string, "00" - unconfirmed, "01" - confirmed
}
}
Set Watch Dog Params
Request URL:
POST /provider/send
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number": “{Serial Number}”,
"command" : "set_watch_dog_params",
"confirmed_uplinks": 17, // in minutes, if it is disabled "0"
"unconfirmed_uplinks":24, // in hours, if it is disabled "0"
}
Set Notification Blind Time
Request URL:
POST /provider/send
Headers:
Content-Type: application/json
Authorization: Bearer {access_token}
Body:
{
"serial_number" : "P61F121340A7SK",
"command" : "send_command_to_open_close_sensor",
"command_name" : "SetNotificationBlindTime",
"command_params" : {
"time": 2 // in minutes
}
}
Last updated