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"]}' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --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"]}' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --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"]}' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --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
https://sensecap-statics.seeed.cn/refer/def/sensor.json
Get a list of the physical measurements of all the sensors. The reference list of sensor measurements is stored in the cloud as a file that you can access directly

Response

Name Description
zh-cn Chinese description
en English description
sm The measurement type ID corresponding to each sensor type is recorded
rg Value range of measured value
sensorType Sensor type, recording the name of each sensor type
measurementId Measurement id, which records the name and unit of each measurement

Example

{
	"zh-cn": {
		"sensorType": {
			"1001": "空气温湿度传感器",
			"1003": "光照强度传感器",
			...
		},
		"measurementId": {
			"4097": ["空气温度", "℃"],
			"4098": ["空气湿度", "%RH"],
			...
		}
	},
	"en": {
		"sensorType": {
			"1001": "Air Temperature and Humidity Sensor",
			"1003": "Light Intensity Sensor",
			...
		},
		"measurementId": {
			"4097": ["Air Temperature", "℃"],
			"4098": ["Air Humidity", "%RH"],
			...
		}
	},
	"sm": {
		"1001": ["4098", "4097"],
		"1003": ["4099"],
		...
	},
	"rg": {
		"4097": "-40~90",
		"4098": "0~100",
		...
	}
}

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/json; charset=utf-8' \
     --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

Body 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"]}' \
     --header 'Content-Type: application/json; charset=utf-8' \
     --user '<username>:<password>'

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