News&Events
About
API Ref
API Directory
UserManual
nodeMCU
python
PC Software
EnergyMeter
WiFi HT
downloads

user/getSensorsWithGateway

Get all devices and sensors data

URL

http://www.lewei50.com/api/v1/user/getSensorsWithGateway

UserKey Required

Yes

Parameter

  Required Default Value Type Range Description
sensorType No string Sensor type

Http Type

get

Return Data Format

json

Return Data Example

[
    {
        "id": 18, 
        "idName": "01",      
        "name": "test name", 
        "typeName": "arduino", 
        "description": "test", 
        "isPublic": true, 
        "isControlled": true, 
        "internetAvailable": true, 
        "apiAddress": "http://192.168.1.5:1491/api", 
        "apiAddressInternet": "http://127.0.0.1:1491/api", 
        "sensors": [
            {
                "id": 62, 
                "idName": "01H1", 
                "name": "test name", 
                "value": "96.2", 
                "type": "HUMI", 
                "typeName": "Humdity", 
                "unit": "%", 
                "description": null, 
                "lastUpdateTime": "2013-04-11 12:56", 
                "isOnline": false, 
                "isError": false, 
                "isAlarm": true
            }, 
            {
                "id": 194, 
                "idName": "02H1", 
                "name": "test tt ", 
                "value": "26.5", 
                "type": "HUMI", 
                "typeName": "Humdity", 
                "unit": "%", 
                "description": null, 
                "lastUpdateTime": "2012-08-23 10:51", 
                "isOnline": false, 
                "isError": false, 
                "isAlarm": false
            }
        ]
    }
]

Return Data Remark

  Type Description
id int64 The global device identification, automatic generation
idName string Device ID
name string Device name
typeName string Device type
description string Device description
isPublic boolean Whether public
isControlled boolean Wheter controlled
internetAvailable boolean Internet access
apiAddress string Lan API address
apiAddressInternet string Internet API address
sensors/id int64 The global sensor identification, automatic generation
sensors/idName string Sensor ID
sensors/name string Sensor name
sensors/value string Current value
sensors/type string Sensor type
sensors/typeName string Sensor type name
sensors/unit string Sensor unit
sensors/description string Sensor description
sensors/lastUpdateTime string Sensor update time
sensors/isOnline boolean Whether online
sensors/isError boolean Whether error
sensors/isAlarm boolean Whether alarm

Description

Sensor type list:
TEMP Temperature
PRES Air pressure
HUMI Humdity
GPSS GPS
DIST Depth
JDQI Relay
CO22 CO2         
KLUX Light Intensity
PMUG Particulate matter  
PMU2 Particulate matter-2
PMU3 Particulate matter-3
OTHR Other

API Online Test Tool

Online Test