Summary:

  • Obtain real-time location data

Version:

No. Editor Edit date Revision date
2.0.0 admin 2020-06-20 2020-06-20

Request URL:

Request mode:

  • POST

Request header:

Parameter Required field Data type Explanation
Content-Type Yes string application/json

Request parameter:

Parameter Required field Data type Explanation
FTokenID Yes string token
FAction Yes string QueryLBSMonitorListByFGUIDs
FGUIDs Yes string Unique identification of assets / device, multiple separated by ‘,’
FType Yes int 1:assets 2:device

Response example:

Correct response:

{
    "Result": 200,
    "Message": "check token success",
    "FObject": [
        {
            "FAssetID": "7500313618",
            "FAssetTypeID": 701,
            "FLongitude": 113.916965,
            "FLatitude": 22.58107,
            "FSpeed": 0,
            "FDirection": 0,
            "FMileage": 0,
            "FGPSTime": "2020-08-12T01:56:16Z",
            "FRecvTime": "2020-08-12T01:56:31.036Z",
            "FLocationType": 1,
            "FCellSignal": 8,
            "FGPSSignal": 5,
            "FMNC": 0,
            "FMCC": 460,
            "FLAC": 10342,
            "FCELLID": 4242,
            "FBattery": 100,
            "FACC": -1,
            "FLockRope": 0,
            "FLockStatus": 0,
            "FFuelCut": -1,
            "FDoor": -1,
            "FMotor": -1,
            "FFuelValue1": -1,
            "FFuelValue2": -1,
            "FFuelValue3": -1,
            "FTemperature1": -1000.0,
            "FTemperature2": -1000.0,
            "FTemperature3": -1000.0,
            "FTemperature4": -1000.0,
            "FTemperature5": -1000.0,
            "FTemperature6": -1000.0,
            "FHumidity1": 0,
            "FHumidity2": 0,
            "FHumidity3": 0,
            "FHumidity4": 0,
            "FHumidity5": 0,
            "FHumidity6": 0,
            "FExpandProto": null,
            "SubAssets": {
                "E0171A0107": {
                    "FAssetID": "E0171A0107",
                    "FDateTime": "2020-08-12T01:53:10Z",
                    "FEvent": 6,
                    "FHumidity": 0,
                    "FLockRope": 0,
                    "FLockStatus": 0,
                    "FLockTimes": 1028,
                    "FPower": 68,
                    "FRSSI": 84,
                    "FSensorType": 4,
                    "FTemperature": -1000.0,
                    "FVoltage": 3.93
                },
                "1018330094": {
                    "FAssetID": "1018330094",
                    "FDateTime": "2020-08-12T01:34:30Z",
                    "FEvent": -1,
                    "FHumidity": 71,
                    "FLockRope": 1,
                    "FLockStatus": 1,
                    "FLockTimes": -1,
                    "FPower": 98,
                    "FRSSI": 69,
                    "FSensorType": 1,
                    "FTemperature": 27.6,
                    "FVoltage": 3.04
                },
                "E0171A00FD": {
                    "FAssetID": "E0171A00FD",
                    "FDateTime": "2020-08-11T11:07:35Z",
                    "FEvent": 5,
                    "FHumidity": 0,
                    "FLockRope": 0,
                    "FLockStatus": 0,
                    "FLockTimes": 17,
                    "FPower": 68,
                    "FRSSI": 53,
                    "FSensorType": 4,
                    "FTemperature": -1000.0,
                    "FVoltage": 3.93
                },
                "1018100169": {
                    "FAssetID": "1018100169",
                    "FDateTime": "2020-08-12T01:29:29Z",
                    "FEvent": -1,
                    "FHumidity": 71,
                    "FLockRope": 1,
                    "FLockStatus": 1,
                    "FLockTimes": -1,
                    "FPower": 98,
                    "FRSSI": 87,
                    "FSensorType": 1,
                    "FTemperature": 28.200000000000003,
                    "FVoltage": 3.04
                }
            }
        }
    ]
}

Error response:

{
    "Result": 102,
    "Message": "Action is error",
    "FObject": []
}

Return parameter description:

Parameter Data type Explanation
FAssetID String Device Id
FAssetTypeID Int Device type
FLongitude Decimal Longitude
FLatitude Decimal Latitude
FSpeed Int Speed (km/h)
FDirection Int Direction (0~360)
FMileage Int Mileage (km)
FGPSTime DateTime GPS time(UTC)
FRecvTime DateTime Data receiving time(UTC)
FLocationType Int Location type 1:GNSS(GPS/BeiDou) located 2:Base Station positioning(Device’s function) 3:LBS positioning(Platform’s function) 4:Mobile location 0:Unlocated
FCellSignal Int GSM signal quality
FMNC Int MNC
FMCC Int MCC
FLAC Int LAC
FCELLID Int CID
FBattery Int quantity of electricity
FACC Int ACC status (1:Open;0:Close)
FLockRope Int Lock rope status (1: Pull out 0:Insert -1:Undefined)
FLockStatus Int Lock state (1: Unlock 0:Lock -1:Undefined)
FFuelCut Int Fuel cut
FDoor Int Door status
FMotor Int Motor status
FFuelValue1 Int Oil level value 1
FFuelValue2 Int Oil level value 2
FFuelValue3 Int Oil level value 3
FTemperature1 Decimal Temperature value 1
FTemperature2 Decimal Temperature value 2
FTemperature3 Decimal Temperature value 3
FTemperature4 Decimal Temperature value 4
FTemperature5 Decimal Temperature value 5
FTemperature6 Decimal Temperature value 6
FHumidity1 Decimal Humidity value 1
FHumidity2 Decimal Humidity value 2
FHumidity3 Decimal Humidity value 3
FHumidity4 Decimal Humidity value 4
FHumidity5 Decimal Humidity value 5
FHumidity6 Decimal Humidity value 6
FExpandProto String Reserved field
SubAssets String Slave information
FOnline Int Device Online status 1:Online 0:Offline

*FExpandProto: *

Parameter Data type Explanation
FAwake Int Wake-up source -1:null 0: Reboot 1: RTC 2: Vibration 3: Open cover/removal 4: Lock rope/bar 5: Charging 6: Swipe card 7: Lora 8: VIP phone number 9: SMS/Calling 10: Bluetooth 11: Insert lock rope 12: Closing cover 13: Simulation 14: Press Button 15: Non-VIP phone number 16: VIP phone number wake-up 17: Reset 18: Abnormal temperature and humidity 19: Abnormal air pressure 20: Power on 21: Open and close the door 22: Light sensor
FPosture Int Posture coefficient
FDesc String other extended information Json string

FDesc: other extended information Json string
E.g.: {“fBackBattery”:”92,4.08,0”,”fChange”:0,”fNetworkType”:4,”fPosture”:”x:-178;y:3;z:12169”,”fRopeInfo”:”{"batteryStatus":0,"exist":0,"mac":"000000000000","ropeStatus":6,"rssi":0}”,”fVoltage”:0.0}

The following are all fields of extended information. The actual number of Json string fields returned will not be so many.

Parameter Data type Explanation
fBackBattery String Backup battery
fNetworkType Int Networktype 0: Unknown 2:2G 3:3G 4:4:G 5:5G
fPosture String attitude “x:1;y:-29;z:-2903”
fRopeInfo String lock rope info.(Json string)
fVoltage Float Battery voltage
fAngle Int Inclination
fAcceleration String Acceleration
fLx Float Illumination
fPressure Float Air pressure
fVibrate Int Amplitude
fReportType Int Datatype 0:Real-time;1:Historical;2:Alarm
fDoor1 Int 1:Door1 Open 0:Door1 Close
fDoor2 Int 1:Door2 Open 0:Door2 Close
fVolStatus Int Voltage Status(0:LED voltage normal 1:LED High voltage status flag)
fVolValue Double LED voltage value
fEleStatus Int current state 0:LED current normal 1:LED High current status flag
fEleValue Double LED Current value
fLuminance Int brightness 0:Indicates off (energy saving level one) , <=25 (Energy Saving Level 2) <=50 (Energy saving level three) <=75 (Energy Saving Level 4) <=100 (Energy saving level five)
fBackCover Int Back Cover Status:-1:null;0:back cover close;1:back cover open
fMainBattery Int JT705C,Main battery status(1: Main battery removal,0:Main battery installed;-1:null)

fRopeInfo:Other extended information Json string
E.g.: “fRopeInfo”:”{"batteryStatus":0,"exist":0,"mac":"000000000000","ropeStatus":6,"rssi":0}”

Parameter Data type Explanation
batteryStatus Int low battery status 0:normal ; 1:low battery ; -1:-(null)
exist Int bar installed 0:not in locked position ; 1:in locked position ; -1:- (null)
mac String lock bar bluetooth mac address
ropeStatus Int ock rope status 0:unknow ; 2: Bend ;3: Saw off ;4: Lost ; 5: Shackle hook saw off ; 6: Lock bar saw off ; 7: Lock bar pulled out ;-1: – (null)
rssi Int RSSI

Other result status description:

  • 105:Request error
  • 104:Token error or expiration
  • 102:Request parameter error

Examples:

Java:

String result = "";
//Request url
String url = "http://cloud.assetscontrols.com:8092/OpenApi/LBS";
//Request parameters, JSON format parameters, it is recommended to pass in objects
String body = "{FAction:\"QueryLBSMonitorListByFGUIDs\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUIDs:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E\",FType:\"1\"}";
URL realUrl = new URL(url);
// Set properties of general request
URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "keep-Alive");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("method", "post");
conn.setDoOutput(true);
conn.setDoInput(true);
PrintWriter pw = new PrintWriter(conn.getOutputStream());
pw.print(body);
pw.flush();
BufferedReader bufReader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = bufReader.readLine()) != null) {
     result += line;
 }
//JSON string is returned
return result;

C#:

//Request url
string url = "http://cloud.assetscontrols.com:8092/OpenApi/LBS";
//Request parameters, JSON format parameters, it is recommended to pass in objects
string body = "{FAction:\"QueryLBSMonitorListByFGUIDs\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUIDs:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E\",FType:\"1\"}";
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "post";
request.Accept = "*/*";
request.ContentType = "application/json";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
byte[] buffer = encoding.GetBytes(body);
request.ContentLength = buffer.Length;
request.GetRequestStream().Write(buffer, 0, buffer.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
    //JSON string is returned
    return reader.ReadToEnd();
}

Python:

 url = 'http://cloud.assetscontrols.com:8092/OpenApi/LBS'
      data = {
      'FAction': 'QueryLBSMonitorListByFGUIDs',
      'FTokenID': '3acef045-d302-4032-b40a-d9ee6c1519cd',
      'FGUIDs':'BE2A1E27-B36E-4301-B2C8-465A62AD215F,FE0BDE75-4A30-4B9C-AD2E-66D8A4F44F5E',
      'FType':1,
       }
      data = parse.urlencode(data).encode('utf-8')
      headers = {
       'User-Agent': r'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
                     r'Chrome/45.0.2454.85 Safari/537.36 115Browser/6.0.3',
       'Connection': 'keep-alive'
       }
      req = request.Request(url, headers=headers, data=data)
      page = request.urlopen(req).read()
      page = page.decode('utf-8')
      # json_array = json.loads(page)
      return page;
文档更新时间: 2024-12-19 16:52   作者:Jeson