Device list

GET
{host}/list_devices
get the list of devices

Request

Query Parameters
device_type
string
device type:1-gateway, 2-node(default)
group_uuid
string
group unique identification

Response

Name Description
device_eui Device unique identification
device_name Device name

Example request

curl --request GET \
     --url {host}/list_devices?device_type=1&group_uuid=0C32119F38C89C31 \
     --user '<username>:<password>'

{
    "code": "0",
    "data": [
        {
            "device_eui": "2CF7F12010700088",
            "device_name": "device2CF7F12010700088"
        },
        {
            "device_eui": "2CF7F1201070001C",
            "device_name": "device2CF7F1201070001C"
        },
        {
            "device_eui": "2CF7F12104700010",
            "device_name": "US915-2CF7F12104700010"
        }
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Get device detail

POST
{host}/view_devices
get the detail of devices

Request

Body Parameters
device_euis
(required)
array
device eui, up to 50 devices at a time
device_type
string
device type:1-gateway, 2-node(default)

Response

Name Description
frequency Equipment communication frequency
device_eui Device unique identification
device_name Device name
device_network Networking protocols, 1:LoRaWAN,2:NB-IoT,3:2G , 4:LoRaPP
position Device GPS location
position_source GPS position source, 0- manually set position, 1- position reported by the device
hardware_version Device hardware version number
software_version Device software version number
sim Sim card information on the device
iccid ICCID
msisdn MSISDN
activateTime The activation date
expiryDate Billing end date
status Status, 0- unknown, 1- normal, 2- single stop, 3- stop, 4- pre-sale number, 5- sale number, 6- transfer, 7- sleep, 8- to be activated
flow Current month used flow
residueFlow The remaining flow

Example request

curl --request POST \
     --url {host}/view_devices \
     --data '{"device_type":1, "device_euis":["2CF7F15000100122"]}' \
     --user '<username>:<password>'

{
    "code": "0",
    "data": [
        {
            "frequency": "470",
            "device_eui": "2CF7F15000100122",
            "device_name": "设备2CF7F15000100122",
            "device_network": 2,
            "position": {
                "latitude": 113.931225,
                "longitude": 22.569792
            },
            "position_source": 0,
            "hardware_version": "",
            "software_version": "23.0",
            "sim": {
                "iccid": "89860446091891237424",
                "msisdn": "1440467057424",
                "activateTime": "2019-12-03T00:00:00.000Z",
                "expiryDate": "2020-11-30T00:00:00.000Z",
                "status": 1,
                "flow": 0,
                "residueFlow": 1024
            }
        }
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Get device channels

POST
{host}/list_device_channels

Request

Body Parameters
device_euis
(required)
array
device eui,up to 50 devices at a time

Response

Name Description
device_eui Device unique identification
channel_index The channel number
sensor_id The sensor id
sensor_status Sensor status :0- idle 1- normal 2- abnormal
channel_type Channel type,1: 485 Sensor; 2: Seeed Sensor; 3:485 Output; 4: Seeed Output
sensor_type Sensor type
channel_name The name of the channel
measurement_ids Measured value id

Example request

curl --request POST \
     --url {host}/list_device_channels \
     --data '{"device_euis":["2CF7F15000100147","2CF7F16221200060"]}' \
     --user '<username>:<password>'
     
     
{
    "code": "0",
    "data": [
        {
            "device_eui": "2CF7F15000100147",
            "channels": [
                {
                    "channel_index": 1,
                    "sensor_id": "2CF7F13011900006",
                    "sensor_status": 1,
                    "channel_type": 2,
                    "sensor_type": "1005",
                    "channel_name": "",
                    "measurement_ids": [
                        "4101"
                    ]
                }
            ]
        },
        {
            "device_eui": "2CF7F16221200060",
            "channels": [
                {
                    "channel_index": 11,
                    "sensor_id": "0111006221200060",
                    "sensor_status": 1,
                    "channel_type": 1,
                    "sensor_type": "2001",
                    "channel_name": "",
                    "measurement_ids": [
                        "4097",
                        "4105"
                    ]
                }
            ]
        }
    ]
}

Get device running status

POST
{host}/view_device_running_status

Request

Body Parameters
device_euis
(required)
array
device eui,up to 50 devices at a time

Response

Name Description
device_eui Device unique identification
latest_message_time The last time the device reported a message
online_status Online status :0- offline, 1- online
battery_status Battery state :0- low battery 1- good battery
report_frequency If the device reports frequency per minute and returns -1, the device fails to report this information

Example request

curl --request POST \
     --url {host}/view_device_running_status \
     --data '{"device_euis":["2CF7F1101300001C","2CF7F16221200060"]}' \
     --user '<username>:<password>'

{
    "code": "0",
    "data": [
        {
            "device_eui": "2CF7F16221200060",
            "latest_message_time": "2020-04-20T07:06:32.944Z",
            "online_status": 0,
            "battery_status": 1,
            "report_frequency": 0
        },
        {
            "device_eui": "2CF7F1101300001C",
            "latest_message_time": "",
            "online_status": 0,
            "battery_status": 1,
            "report_frequency": -1
        }
    ]
}

Sensor measure list

GET
{host}/list_measurement_reference
get the list of all physical measurements of all sensor types. also see Appendix - List of Sensor Types.

Response

Name Description
sensor_type Sensor type
sensor_name Sensor name
measurement_id Measured value id
measurement_name Name of measured value
measurement_unit Unit of measurement

Example request

curl --request GET \
     --url {host}/list_measurement_reference \
     --user '<username>:<password>' \

{
    "code": "0",
    "data": [
        {
            "sensor_type": "1001",
            "sensor_name": "SenseCAP AirTemp&Humi Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4097",
                    "measurement_name": "Air Temperature",
                    "measurement_unit": "℃"
                },
                {
                    "measurement_id": "4098",
                    "measurement_name": "Air Humidity",
                    "measurement_unit": "%RH"
                }
            ]
        },
        {
            "sensor_type": "1003",
            "sensor_name": "SenseCAP Light Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4099",
                    "measurement_name": "Light",
                    "measurement_unit": "Lux"
                }
            ]
        },
        {
            "sensor_type": "1004",
            "sensor_name": "SenseCAP CO2 Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4100",
                    "measurement_name": "CO2",
                    "measurement_unit": "ppm"
                }
            ]
        },
        {
            "sensor_type": "1005",
            "sensor_name": "SenseCAP Air Pressure Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4101",
                    "measurement_name": "Barometric Pressure",
                    "measurement_unit": "Pa"
                }
            ]
        },
        {
            "sensor_type": "1006",
            "sensor_name": "SenseCAP Soil Temp&Humi Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4102",
                    "measurement_name": "Soil Temperature",
                    "measurement_unit": "℃"
                },
                {
                    "measurement_id": "4103",
                    "measurement_name": "Soil Humidity",
                    "measurement_unit": "%RH"
                }
            ]
        },
        {
            "sensor_type": "1008",
            "sensor_name": "SenseCAP Wind Direction Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4104",
                    "measurement_name": "Wind Direction",
                    "measurement_unit": "°"
                }
            ]
        },
        {
            "sensor_type": "1009",
            "sensor_name": "SenseCAP Wind Speed Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4105",
                    "measurement_name": "Wind Speed",
                    "measurement_unit": "m/s"
                }
            ]
        },
        {
            "sensor_type": "100A",
            "sensor_name": "SenseCAP Water PH",
            "sensor_measurement": [
                {
                    "measurement_id": "4106",
                    "measurement_name": "Water PH",
                    "measurement_unit": "PH"
                }
            ]
        },
        {
            "sensor_type": "100B",
            "sensor_name": "SenseCAP Light quantum",
            "sensor_measurement": [
                {
                    "measurement_id": "4107",
                    "measurement_name": "Light quantum",
                    "measurement_unit": "umol/㎡s"
                }
            ]
        },
        {
            "sensor_type": "100C",
            "sensor_name": "SenseCAP Electrical Conductivity",
            "sensor_measurement": [
                {
                    "measurement_id": "4108",
                    "measurement_name": "Electrical Conductivity",
                    "measurement_unit": "dS/m"
                }
            ]
        },
        {
            "sensor_type": "100D",
            "sensor_name": "SenseCAP Dissolved Oxygen",
            "sensor_measurement": [
                {
                    "measurement_id": "4109",
                    "measurement_name": "Dissolved Oxygen",
                    "measurement_unit": "mg/L"
                }
            ]
        },
        {
            "sensor_type": "100E",
            "sensor_name": "SenseCAP Soil VWC&EC&Temp Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4110",
                    "measurement_name": "Soil Volumetric Water Content",
                    "measurement_unit": "%"
                },
                {
                    "measurement_id": "4111",
                    "measurement_name": "Soil Electrical Conductivity",
                    "measurement_unit": "dS/m"
                },
                {
                    "measurement_id": "4112",
                    "measurement_name": "Soil Temperature",
                    "measurement_unit": "℃"
                }
            ]
        },
        {
            "sensor_type": "1011",
            "sensor_name": "SenseCAP Rainfall Recorder",
            "sensor_measurement": [
                {
                    "measurement_id": "4113",
                    "measurement_name": "Rainfall Hourly",
                    "measurement_unit": "mm/hour"
                }
            ]
        },
        {
            "sensor_type": "2001",
            "sensor_name": "Five-Element RS485 Sensor (Type-A)",
            "sensor_measurement": [
                {
                    "measurement_id": "4097",
                    "measurement_name": "Air Temperature",
                    "measurement_unit": "℃"
                },
                {
                    "measurement_id": "4098",
                    "measurement_name": "Air Humidity",
                    "measurement_unit": "%RH"
                },
                {
                    "measurement_id": "4101",
                    "measurement_name": "Barometric Pressure",
                    "measurement_unit": "Pa"
                },
                {
                    "measurement_id": "4104",
                    "measurement_name": "Wind Direction",
                    "measurement_unit": "°"
                },
                {
                    "measurement_id": "4105",
                    "measurement_name": "Wind Speed",
                    "measurement_unit": "m/s"
                }
            ]
        },
        {
            "sensor_type": "2002",
            "sensor_name": "Three-Element RS485 Sensor (Type-A)",
            "sensor_measurement": [
                {
                    "measurement_id": "4097",
                    "measurement_name": "Air Temperature",
                    "measurement_unit": "℃"
                },
                {
                    "measurement_id": "4098",
                    "measurement_name": "Air Humidity",
                    "measurement_unit": "%RH"
                },
                {
                    "measurement_id": "4101",
                    "measurement_name": "Barometric Pressure",
                    "measurement_unit": "Pa"
                }
            ]
        },
        {
            "sensor_type": "1013",
            "sensor_name": "SenseCAP Ultrasonic Distance Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4115",
                    "measurement_name": "Distance",
                    "measurement_unit": "cm"
                }
            ]
        },
        {
            "sensor_type": "1014",
            "sensor_name": "SenseCAP Water Leak Detector",
            "sensor_measurement": [
                {
                    "measurement_id": "4116",
                    "measurement_name": "Water Leak",
                    "measurement_unit": ""
                }
            ]
        },
        {
            "sensor_type": "1015",
            "sensor_name": "SenseCAP Liguid Level Sensor",
            "sensor_measurement": [
                {
                    "measurement_id": "4117",
                    "measurement_name": "Liguid Level",
                    "measurement_unit": "cm"
                }
            ]
        },
        ...
    ]
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Bind device

POST
{host}/device/bind
bind device to account

Request

Body Parameters
eui
(required)
string
device eui
code
(required)
string
device code
device_name
string
device name
group_uuid
string
group uuid,available through the group list interface
longitude
string
device positon, longitude
latitude
string
device postion,latitude

Example request

curl --request POST \
     --url '{host}/bind_device' \
     --user '<username>:<password>' \
     --header 'content-type: application/x-www-form-urlencoded' \
     --data '{"code":"device code","eui":"device eui"}' \
     --include


{
    "code": "0",
    "data": {}
}

History version

version description
Sensecap V1 Maintenance stopped, not recommended

Unbind device

POST
{host}/delete_devices
remove the binding relationship of this node and the organization of API caller, but user can bind it back with SenseCAP App.

Request

Path Parameters
device_euis
(required)
array
device eui,up to 50 devices at a time

Example request

curl --request POST \
     --url {host}/delete_devices \
     --data '{"device_euis":["2CF7F15000100122"]}' \
     --user '<username>:<password>'

{
    "code": "0",
    "data": {}
}