# Devices
# IoT Device Name and Device Type Standard
# Device Name
"XXXXXYYYZZZZ"
- XXXXX - Project Code, 5 characters representing the Project code standard from Oracle (Account)
- YYY - Device Type, 3 characters representing the device type standard
- ZZZZ - Device No, 4 characters representing the device no in the project
Project Code (XXXXX)
- BXXXX - Solar Project Code from Oracle
- SXXXX - Smart City Project
- EXXXX - EMS Project
- MXXXX - EV Project
- CXXXX - Ecoserve Project
- WXXXX - Wind project
Device Type (YYY)
- IPC - Gateway (IoT Edge)
- INV - Inverter
- SML - Smart Logger
- MET - Meter
- BME - Billing Meter
- GME - Grid Meter
- LME - Load Meter 1 or 3 phase
- EMI - Weather Station
- SEN - Sensor
- PRE - Pressure Transmitter
- RTD - Temperature Transmitter
- FLM - Flow Meter
- SER - Server
- CAM - CCTV
- PUA - Publice Address Speaker
- MIC - Microphone
- SOS - SOS
- UPS - Uninterruptible Power Supply
- MCH - Machine
- ACO - Air Compressor
- ADR - Air Dryer
- PUM - Pump
- CHI - Chiller
- CTW - Cooling Tower
- HEX - Heat Exchanger
- TRM - Transformer
- ACB - Air Circuit Breaker
Remark : Device type will be updated in the future
Device No (ZZZZ)
- Start running number from 0001
For Example Device Name: B9020INV0008
B9020 - Solar Project code at Site INV - Inverter 0008 - Inverter no.8
TIP
Please see all Iot devices in NiXT Care (opens new window) or request from IoT Team.
# Devices - List

This endpoint retrieves all devices of Project owner permission that the API token owner has access.
# HTTP Request
GET {url}/devices
# Request Headers
| Key | Value |
|---|---|
| x-language | en |
| Authorization | Bearer {YOUR_API_TOKEN_HERE} |
# Request Params
| Parameter | Required | Type | Description |
|---|---|---|---|
| siteId | NO | String | Site ID |
# Response
When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.
| Parameter | Type | Description |
|---|---|---|
| count | Number | The count of device in the client |
| _id | String | Devices ID |
| deviceName | String | Device name (XXXXXYYYZZZZ) |
| deviceType | String | Device type (YYY) |
| siteId | String | Site ID |
{
"data": {
"count": 9,
"devices": [
{
"_id": "60d425e1d9cd632d3cc01657",
"deviceName": "DEVICE_NAME",
"deviceType": "DEVICE_TYPE",
"siteId": "60d42357d9cd632d3cc01654"
},
...
]
}
}
When there is a failure, redirects to the assigned reirect_uri with the parameters below attached.
TIP
DEVICE_NAME and DEVICE_TYPE will be specified by IoT Team. Please see detail in IoT Device Name and Device Type Standard
WARNING
The Site ID in the specified request ID does not match the site ID in database. Data is not found.
# Device - Get Device Info
This endpoint retrieves a specific id of the site. Detailed information about a device.
# HTTP Request
GET {url}/devices/:deviceId
# Request Headers
| Key | Value |
|---|---|
| x-language | en |
| Authorization | Bearer {YOUR_API_TOKEN_HERE} |
# Request Params
| Parameter | Required | Type | Description |
|---|---|---|---|
| deviceId | YES | String | Devices ID |
# Response
When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.
| Parameter | Type | Description |
|---|---|---|
| _id | String | Devices ID |
| deviceName | String | Device name (XXXXXYYYZZZZ) |
| deviceType | String | Device type (YYY) |
| siteId | String | Site ID |
| lastDataAt | datetime | The UTC datetime of the lasted data |
| lastNormalDcostAt | datetime | The lasted UTC datetime which devices is normal |
{
"data": {
"_id": "60abbf7f4592e1ae8017b594",
"deviceName": "DEVICE_NAME",
"deviceType": "DEVICE_TYPE",
"siteId": {
"_id": "60abbe3f4592e1ae8017b58f",
"siteName": "YOUR_SITE_NAME"
},
"lastDataAt": "2021-08-28T08:55:00.000Z",
"lastNormalDcostAt": "2021-08-28T08:55:00.000Z"
}
}
TIP
Datetime is at UTC time and use the following formats for date-time:
yyyy-mm-ddThh:mm:ss.000Z for example, 2021-08-15T17:30:00.000Z
TIP
DEVICE_NAME and DEVICE_TYPE will be specified by IoT team. Please see detail in IoT Device Name and Device Type Standard
WARNING
The Site ID in the specified request ID does not match the site ID in database. Data is not found.
# Direct Command to Device
Directly command to device via the direct method API.
# HTTP Request
POST {url}/devices/:deviceId/call/:method?timeout=5
# Request Headers
| Key | Value |
|---|---|
| x-language | en |
| Authorization | Bearer {YOUR_API_TOKEN_HERE} |
# Request Params
| Parameter | Required | Type | Description |
|---|---|---|---|
| deviceId | YES | String | Devices ID |
| method | YES | String | Direct method command |
Determine command in method on Params and fill detail of the command on Body. The direct method 's command is depend on device model from manufacturer which will be developed by IoT Team as per requested. Pleae see the directly command method to devices which is already release as below;
Release
- Command to real-time live steaming from CCTV
- Command to devices of the public announcement and SOS
# Response
When successfully redirect to the assigned redirect_uri or posts according to the form with the parameters below attached.
| Parameter | Type | Description |
|---|---|---|
| status | Number | HTTP Response Status Codes (opens new window) |
| payload | String | Response or feedback from command |
{
"data": {
"status": 200,
"payload": {
"Response's detail"
}
}
}
← Site IoT Dictionary →