CO2 Sensor LoRaWAN

Get device data

Request URL:
1
POST /provider/fetch
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number" : "{CO2-Sensor Serial Number}"
3
}
Copied!
Response:
1
{
2
"provider": {
3
"network_provider": "the_things_industries",
4
"extSensorOn": [],
5
"extSensorIs": "",
6
"rssi": -66,
7
"spf": "7",
8
"CO2": 621,
9
"temperature": 23.9,
10
"humidity": 60.55,
11
"voltage": 3.51,
12
"uplinkType": "00",
13
"keepAliveTime": 3,
14
"joinRetryPeriod": 5,
15
"deviceVersions": {
16
"hardware": 0,
17
"software": 0
18
},
19
"watchDogParams": {
20
"wdpC": 0,
21
"wdpUc": 0
22
},
23
"createdAt": "2021-07-19T13:09:02.556Z",
24
"lastActive": "2021-07-20T15:36:03.672Z",
25
"boundaryLevels": {
26
"good_medium": 901,
27
"medium_bad": 1501
28
},
29
"autoZeroValue": 366,
30
"notifyPeriod": {
31
"good_zone": 0,
32
"medium_zone": 10,
33
"bad_zone": 10
34
},
35
"measurementPeriod": {
36
"good_zone": 10,
37
"medium_zone": 10,
38
"bad_zone": 10
39
},
40
"buzzerNotification": {
41
"duration_good_beeping": 0,
42
"duration_good_loud": 500,
43
"duration_good_silent": 500,
44
"duration_medium_beeping": 0,
45
"duration_medium_loud": 500,
46
"duration_medium_silent": 500,
47
"duration_bad_beeping": 2,
48
"duration_bad_loud": 500,
49
"duration_bad_silent": 500
50
},
51
"ledNotification": {
52
"red_good": 0,
53
"green_good": 2,
54
"blue_good": 0,
55
"duration_good": 210,
56
"red_medium": 3,
57
"green_medium": 2,
58
"blue_medium": 0,
59
"duration_medium": 4020,
60
"red_bad": 3,
61
"green_bad": 0,
62
"blue_bad": 0,
63
"duration_bad": 4020
64
},
65
"autoZeroPeriod": 192,
66
"online": true,
67
"mac": "70B3D52DD500000D"
68
},
69
"_links": {
70
"self": {
71
"href": "/v1/provider/fetch"
72
}
73
}
74
}
Copied!

Set KeepAlive Time

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2-Sensor Serial Number}”,
3
"command" : "set_keepalive_time",
4
"time" : 3 // in minutes
5
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60366d3cbc2b0345b984da00",
5
"commandName": "SetKeepAlive",
6
"commandParams": {
7
"time": 3
8
},
9
"deviceId": "70B************4",
10
"createdAt": "2021-02-24T15:14:04.444Z",
11
"__v": 0
12
},
13
"_links": {
14
"self": {
15
"href": "/v1/provider/send"
16
}
17
}
18
}
Copied!

Get KeepAlive Time

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2-Sensor Serial Number}”,
3
"command" : "get_keepalive_time"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6036b85b25304f575e082397",
5
"commandName": "GetKeepAliveTime",
6
"commandParams": [],
7
"deviceId": "70B************4",
8
"createdAt": "2021-02-24T20:34:35.934Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!

Get Device Version

Request URL:
1
POST /provider/fetch
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number" : "{Co2-Sensor Serial Number}",
3
"command" : "get_device_version"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "603672f5bc2b0345b984da43",
5
"commandName": "GetDeviceVersion",
6
"commandParams": [],
7
"deviceId": "70B************4",
8
"createdAt": "2021-02-24T15:38:29.537Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!

Set Join Retry Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{Co2-Sensor Serial Number}”,
3
"command" : "set_join_retry_period",
4
"period" : 2, //minutes, cannot be 0
5
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "603675a7bc2b0345b984da63",
5
"commandName": "SetJoinRetryPeriod",
6
"commandParams": {
7
"period": 2
8
},
9
"deviceId": "70B************4",
10
"createdAt": "2021-02-24T15:49:59.095Z",
11
"__v": 0
12
},
13
"_links": {
14
"self": {
15
"href": "/v1/provider/send"
16
}
17
}
18
}
Copied!

Get Join Retry Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{Co2-Sensor Serial Number}”,
3
"command" : "get_join_retry_period"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6036caaf994ab35c7c701bbe",
5
"commandName": "GetJoinRetryPeriod",
6
"commandParams": [],
7
"deviceId": "70B************4",
8
"createdAt": "2021-02-24T21:52:47.045Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!
Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2-Sensor Serial Number}”,
3
"command" : "set_uplink_type",
4
"type" : "01" // string, "00" - unconfirmed, "01" - confirmed
5
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6036bf46ed10eb592440aea5",
5
"commandName": "SetUplinkType",
6
"commandParams": {
7
"type": "01"
8
},
9
"deviceId": "70B************4",
10
"createdAt": "2021-02-24T21:04:06.611Z",
11
"__v": 0
12
},
13
"_links": {
14
"self": {
15
"href": "/v1/provider/send"
16
}
17
}
18
}
Copied!
Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2-Sensor Serial Number}”,
3
"command" : "get_uplink_type"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6036be66ed10eb592440ae9b",
5
"commandName": "GetUplinkType",
6
"commandParams": [],
7
"deviceId": "70B************4",
8
"createdAt": "2021-02-24T21:00:22.088Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!

Set Watch Dog Params

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_watch_dog_params",
4
"period_confirmen_uplinks": 17, // in minutes, if it is disabled "0"
5
"period_unconfirmen_uplinks":24, // in hours, if it is disabled "0"
6
"device_keepalive":3 // in minutes
7
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6035505708f81715fffd19c0",
5
"commandName": "SetWatchDogParams",
6
"commandParams": {
7
"periodConfirmenUplinks": 17,
8
"periodUnconfirmenUplinks": 24,
9
"deviceKeepAlive": 3
10
},
11
"deviceId": "36*************8",
12
"createdAt": "2021-02-23T18:58:31.945Z",
13
"__v": 0
14
},
15
"_links": {
16
"self": {
17
"href": "/v1/provider/send"
18
}
19
}
20
}
Copied!

Get Watch Dog Params

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_watch_dog_params"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "6036ce5bf6c1b85f22d280cc",
5
"commandName": "GetWatchDogParams",
6
"commandParams": [],
7
"deviceId": "36*************8",
8
"createdAt": "2021-02-24T22:08:27.116Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!

Set Co2 Boundary Levels

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_co2_boundary_levels",
4
"good_medium": 900, // in PPM
5
"medium_bad": 1500 // in PPM
6
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c24a58f6f700118ef837",
5
"commandName": "SetCo2BoundaryLevels",
6
"commandParams": {
7
"good_medium": 901,
8
"medium_bad": 1501
9
},
10
"deviceId": "70************D",
11
"createdAt": "2021-07-20T12:32:10.317Z",
12
"__v": 0
13
},
14
"_links": {
15
"self": {
16
"href": "/v1/provider/send"
17
}
18
}
19
}
Copied!

Get Co2 Boundary Levels

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_co2_boundary_levels"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetCo2BoundaryLevels",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set CO2 Auto Zero Value

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_co2_auto_zero_value",
4
"ppm" : 366 //This value is used by the device for CO2
5
// measurements compensation in order to get 400ppm in fresh air.
6
// This value is represented in ppm.
7
8
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6d08758f6f700118ef9e7",
5
"commandName": "SetCo2AutoZeroValue",
6
"commandParams": {
7
"ppm": 366
8
},
9
"deviceId": "7**************D",
10
"createdAt": "2021-07-20T13:32:55.510Z",
11
"__v": 0
12
},
13
"_links": {
14
"self": {
15
"href": "/v1/provider/send"
16
}
17
}
18
}
Copied!

Get CO2 Auto Zero Value

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_co2_auto_zero_value"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetCo2AutoZeroValue",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set CO2 Auto Zero Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Auto-zero period in hours. Default auto-zero period, after the factory auto-zeroing, is 192 hours (8 days). During this period the lowest measured CO2 value is accepted as 400ppm and the auto-zero value is obtained automatically. If The period is 0, automatic auto-zero function is disabled, but the obtained or set with command auto-zero value is still used internally
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_co2_auto_zero_period",
4
"hours" : 192 // in hours
5
6
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6ea2158f6f700118efd12",
5
"commandName": "SetCo2AutoZeroPeriod",
6
"commandParams": {
7
"hours": 192
8
},
9
"deviceId": "7*************D",
10
"createdAt": "2021-07-20T15:22:09.105Z",
11
"__v": 0
12
},
13
"_links": {
14
"self": {
15
"href": "/v1/provider/send"
16
}
17
}
18
}
Copied!

Get CO2 Auto Zero Value

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_co2_auto_zeroperiod"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetCo2AutoZeroPeriod",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set Notify Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_notify_period",
4
"good_zone" : 0, // Notification period, in minutes,
5
// when measured CO2 is inside the good zone. 0 means notify once.
6
"medium_zone": 10, // -- // --
7
"bad_zone": 10 // -- // --
8
9
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6d4a858f6f700118efa7f",
5
"commandName": "SetNotifyPeriod",
6
"commandParams": {
7
"good_zone": 0,
8
"medium_zone": 10,
9
"bad_zone": 10
10
},
11
"deviceId": "70***************D",
12
"createdAt": "2021-07-20T13:50:32.221Z",
13
"__v": 0
14
},
15
"_links": {
16
"self": {
17
"href": "/v1/provider/send"
18
}
19
}
20
}
Copied!

Get Notify Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_notify_period"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetNotifyPeriod",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set Measurement Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_measurement_period",
4
"good_zone" : 10, // in minutes, used until the measured CO2 levels are
5
// inside the good zone
6
"medium_zone": 10, // -- // --
7
"bad_zone": 10 // -- // --
8
9
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6d8c458f6f700118efb0b",
5
"commandName": "SetCo2MeasurementPeriod",
6
"commandParams": {
7
"good_zone": 10,
8
"medium_zone": 10,
9
"bad_zone": 10
10
},
11
"deviceId": "70B3D52DD500000D",
12
"createdAt": "2021-07-20T14:08:04.903Z",
13
"__v": 0
14
},
15
"_links": {
16
"self": {
17
"href": "/v1/provider/send"
18
}
19
}
20
}
Copied!

Get Measurement Period

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_measurement_period"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetCo2MeasurementPeriod",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set Buzzer Notification

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_buzzer_notification",
4
"duration_good_beeping": 0, // Duration of the buzzer beeping, in seconds,
5
// when must notify for good CO2 levels. A value of 0 means don’t notify
6
"duration_good_loud": 500, [ms], Duration of the buzzer loud periods, when must notify
7
// for good CO2 levels
8
"duration_good_silent": 500, [ms],
9
"duration_medium_beeping": 0, [s]
10
"duration_medium_loud": 500, [ms]
11
"duration_medium_silent": 500, [ms]
12
"duration_bad_beeping": 2,
13
"duration_bad_loud": 500,
14
"duration_bad_silent": 500
15
16
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6e18158f6f700118efc13",
5
"commandName": "SetBuzzerNotification",
6
"commandParams": {
7
"duration_good_beeping": 0,
8
"duration_good_loud": 500,
9
"duration_good_silent": 500,
10
"duration_medium_beeping": 0,
11
"duration_medium_loud": 500,
12
"duration_medium_silent": 500,
13
"duration_bad_beeping": 2,
14
"duration_bad_loud": 500,
15
"duration_bad_silent": 500
16
},
17
"deviceId": "70*************D",
18
"createdAt": "2021-07-20T14:45:21.858Z",
19
"__v": 0
20
},
21
"_links": {
22
"self": {
23
"href": "/v1/provider/send"
24
}
25
}
26
}
Copied!

Get Buzzer Notification

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_buzzer_notification"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6c0b258f6f700118ef808",
5
"commandName": "GetBuzzerNotification",
6
"commandParams": [],
7
"deviceId": "70************D",
8
"createdAt": "2021-07-20T12:25:22.607Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "\/v1\/provider\/send"
14
}
15
}
16
}
Copied!

Set LED Notification

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
*Led state:
  • 0x00: None;
  • 0x01: LED is constantly on for the given time duration;
  • 0x02: Blink fast for the given time duration;
  • 0x03: Blink slow for the given time duration
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "set_co2_led_notification",
4
"red_good": 0, // Led State*
5
"green_good": 2, // Led State*
6
"blue_good": 0, // Led State*
7
"duration_good": 210, // [ms]
8
"red_medium": 3,
9
"green_medium": 3,
10
"blue_medium": 0,
11
"duration_medium": 4020, // [ms]
12
"red_bad": 3,
13
"green_bad": 0,
14
"blue_bad": 0,
15
"duration_bad": 4020
16
17
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6e6c258f6f700118efcb2",
5
"commandName": "SetCo2Led",
6
"commandParams": {
7
"red_good": 0,
8
"green_good": 2,
9
"blue_good": 0,
10
"duration_good": 210,
11
"red_medium": 3,
12
"green_medium": 2,
13
"blue_medium": 0,
14
"duration_medium": 4020,
15
"red_bad": 3,
16
"green_bad": 0,
17
"blue_bad": 0,
18
"duration_bad": 4020
19
},
20
"deviceId": "7*************D",
21
"createdAt": "2021-07-20T15:07:46.975Z",
22
"__v": 0
23
},
24
"_links": {
25
"self": {
26
"href": "/v1/provider/send"
27
}
28
}
29
}
Copied!

Get LED Notification

Request URL:
1
POST /provider/send
Copied!
Headers:
1
Content-Type: application/json
2
Authorization: Bearer {access_token}
Copied!
Body:
1
{
2
"serial_number": “{CO2 Serial Number}”,
3
"command" : "get_co2_led_notification"
4
}
Copied!
Response:
1
{
2
"provider": {
3
"status": "pending",
4
"_id": "60f6e3e858f6f700118efc5b",
5
"commandName": "GetCo2Led",
6
"commandParams": [],
7
"deviceId": "7**************D",
8
"createdAt": "2021-07-20T14:55:36.249Z",
9
"__v": 0
10
},
11
"_links": {
12
"self": {
13
"href": "/v1/provider/send"
14
}
15
}
16
}
Copied!
Last modified 4mo ago