Summary:

  • send command

Version:

No. Editor Edit date Revision date
2.0.0 admin 2021-12-31 2021-12-31

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 CommandInstruction
FAssetGUID yes string Unique identification of device
FOffline yes string offline command support 1:yes 0:no
FInsType yes string command type

JT701(D) ASCII Commands:

FInsType=P01(Query Firmware version)

FInsType=P03(Low power sleep control)
FT_P03Ins
{
FOperationType:Operation type(1:Setting;0:Query)
FOpenType:1: turns on, 0: turns off
FValue:When the power level is set to be lower than, it will enter sleep. The default is 31%, and the settable range is 15% ~ 90%
}

FInsType=P04(Query and Set data upload interval and RTC timing upload interval)
FT_P04Ins
{
FOperationType: Operation mode(1:setting;0:query)
FUpLoadInterval: Data upload time interval,unit in seconds,default 30 sec,value range[5-600]
FAwakenInterval: RTC timing wake-up interval,unit in seconds,default 30 sec,value range[30-1440]
}

FInsType=P06(Query and Set main IP1/port/SIM1(SIM2) card slot corresponds to APN)
FT_P06Ins:

{
FOperationType: Operation mode(0:Query SIM1 parameters;1:Set SIM1 parameters; 2:Query SIM2 parameters;3:Set SIM2 parameters)
FIP: Host IP address
FPort: TCP port
FCMNET: APNname(maximum 50 characters)
FAPN: APNuser(maximum 50 characters)
FPassword: APNpass(maximum 50 characters)
}

FInsType=P10(Query and Set SMS alarm time difference)
FT_P10Ins:

{
FOperationType: Operation mode(1:setting;0:query)
FTimeDifference: Time difference value. The unit is in minutes. Value range [-720~780],default value=0
}

FInsType=P11(Query and Set VIP phone number)
FT_P11Ins:

{
FOperationType: Operation mode(1:setting;0:query)
FIndex: VIP phone No. index. Value range [1~5] Max support 5 VIP number
FPhone:The mobile phone number cannot exceed 15 digits and must be preceded by the international dial code, which is 86 or +86 for China.
}

FInsType=P12(Query and Set VIP phone number to receive SMS alarm)
FT_P12Ins:

{
FOperationType: Operation mode(1:setting;0:query)
FVIP1: VIP1, 1 enable to receive SMS alarm on VIP1 number; 0 disable
FVIP2:VIP2, 1 enable to receive SMS alarm on VIP2 number; 0 disable
FVIP3:VIP3, 1 enable to receive SMS alarm on VIP3 number; 0 disable
FVIP4:VIP4, 1 enable to receive SMS alarm on VIP4 number; 0 disable
FVIP5:VIP5, 1 enable to receive SMS alarm on VIP5 number; 0 disable
}

FInsType=P13(Factory reset)

FInsType=P14(Query IMEI number of 4G/3G/2G module)

FInsType=P15(Restart device remotely)

FInsType=P22(Time synchronization )
FT_P22Ins:

{
FTime: Day/month/year/hour/minute/second,the time is UTC time
}

FInsType=P23(Query and Set SMS/phone call wake-up function)
FT_P23Ins:

{
FOperationType:Operation mode(1:setting;0:query)
FAwakenState: 1 means allowing SMS messages and phone calls to wake up, 0 means canceling SMS messages and phone calls to wake up, and the default is 0.
}

FInsType=P32(Force device enter sleep)

FInsType=P37(Query and Set motion detection by G-sensor)
FT_P37Ins

{
FOperationType:Operation mode(1:setting;0:query)
FValue1: Motion detection threshold, the value range is 0 or [63~500], the unit is mg, the default value is 126.If set value is 0, the G-sensor motion detection function is turned off;
FValue2: Acceleration threshold for motion detection.customzied firmware function.can be ignored.
}

FInsType=P38(Query and Set long-time unlocking alarm)
FT_PCommonIns

{
FOperationType:Operation mode(1:setting;0:query)
FValue: Long-time unlocking alarm threshold, the unit is minute,default,120 minutes the value range is [3~180]
}

FInsType=P40( Query and Set the switch of GPRS/SMS alarm)
FT_P40Ins

{
FOperationType:Operation mode(1:setting;0:query)
FLockRope:Lock rope cut alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FIllegalCard:Swiping illegal RFID card alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLongTimeOpened: Long-time unlocking alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FFivePasswordError: 5 consecutive incorrect passwords alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FVibration: Vibration alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FInGeoFence: Enter Geo-fence alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FOutGeoFence: Exit Geo-fence alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowPower: Low Battery alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FUnCoverBack: Back Cover opened alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLockStuck: Motor Struck alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowGSM: GSM signal alow alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FOverSpeed: Speeding alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FDynamicToStatic: MotiontoStatic alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FStaticToDynamic: StatictoMotion alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
}

FInsType= P54(Query and Set tracking mode)
FT_P54Ins

{
FOperationType:Operation mode(1:setting;0:query)
FStatus:1 means enable tracking mode, 0 Stop tracking mode
}

FInsType= P61(Query and Set low battery alarm threshold)
FT_P61Ins

{
FOperationType:Operation mode(1:setting;0:query)
FValue:low battery alarm threshold, value range [0~90]
}

FInsType= P62(Query and Set the initial mileage)
FT_P62Ins

{
FOperationType:Operation mode(1:setting;0:query)
FValue:Initial mileage,unit in kilometers. Value range [0, 4294967295]
}

FInsType= P63(Query and Set GPS static drift optimization function)
FT_P63Ins

{
FOperationType:Operation mode(1:setting;0:query)
FStatus:1 Enable this function;0 Disable this function. In default it is disabled.
}

FInsType= P68(Query the IMSI and ICCID of the SIM card)
FT_P68Ins

{
FType:1:Query IMSI, 2:Query ICCID
}

FInsType= WLNET2(Query/set slave sensor working interval)
FT_WLNET2Ins

{
FAssetID:Sensor ID
FOperationType: Operation mode(1:setting;0:query)
FValue: The slave working time interval, unit in minutes, default 5 minutes(JT126),if JT709 ,default 50 minutes.value range[5~1440]
}

FInsType= WLNET4(Query slave sensor firmware version)

FInsType= ZZZZ(Custom Commands)
FInsContent: command content



JT709A(C)/JT707C(A)/JT705A/JT301X/JT702 ASCII Commands:

FInsType= BASE1(Query Device Firmware version/Cellular module info.)

FInsType= BASE2(Synchronize UTC time to Device)
FT_BASE2Ins
{
FAssetID:Device ID. e.g. “835210000201”
FTime:Timing time UTC time (time set by 20111018123820: year, month, day, hour, minute and second, parsed to: 2011-10-18 12:38:20)
}

FInsType= BASE3(Restart device remotely)

FInsType= BASE4(Factory reset)
FT_BASE4Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:1 means that all information is restored to the factory default value; 2 means that except the communication master and slave IP, all other information is restored to the factory default value; 3 means that except the communication master and slave IP and VIP number, all other information is restored to the factory default value.;
}

FInsType= BASE48(Query/Set alarm switch for GPRS/SMS channel)
–These fields are passed according to the device protocol, and all fields are optional.
FT_BASE48Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:1: Setting; 0: Query; 2 External module alarm query; 3 External sensor settings.
FLockRope:Lock rope cut alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FIllegalCard:Swipe illegal RFID card alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLongTimeOpened: Long-time unlocking alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FFivePasswordError: Wrong unlocking password alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FVibration: Vibration alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FInGeoFence: Enter Geo-fence alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FOutGeoFence: Exit Geo-fence alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowPower: Low Battery alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FUnCoverBack: Back Cover opened alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLockStuck: Motor struck alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowGSM: GSM signal low alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FOverSpeed: Speeding alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FErrorUnlock:Unlocking abnormal alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A
FTiltAlarm:Tilt alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A
FLongTimeStop:Long-time parking alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A_RH
FInLoadAlarm:Entry Road alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A_RH
FOutLoadAlarm: Exit Road alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A_RH
FOutFenceUnlockAlarm: Exit Geo-fence but didn’t lock device alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on) only for JT705A_RH

—below alarm types only supports by JT301X device model
FHighTempAlarm:High temperature alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowTempAlarm: Low temperature alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FHighHumidityAlarm:High humidity alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowHumidityAlarm:Low humidity alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FHighLightAlarm:Strong light alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowLightAlarm:Low light alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FHighPressureAlarm:High pressure alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLowPressureAlarm:Low pressure alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FOpenDoorAlarm:Door Open/Close alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLedHightVoltage: LED high voltage alarm (0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLedHighElectric: LED high current alarm(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
FLockException: Door lock opens abnormally and alarms(0: GPRS and SMS are both turned off, 1: Only GPRS is turned on, 2: Only SMS is turned on, 3: GPRS and SMS are turned on)
}

FInsType= BASE6(Query/Set Data reporting interval and RTC timing wake-up interval)
FT_BASE6Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FUpLoadInterval: Data reporting interval when device is waken up ,default 60s,value range: 5s to 3600s
FAwakenInterval: RTC timing wake-up time interval, default value 60min. Value range: 5min to 1440min
}
FInsType= BASE7( Query/Set SMS or Calling wake up device)
FT_BASE7Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FType: 1 means enable SMS or calling wake up device function 0: disable this function.but the device can be waken up by other wake-up sources.like vibration,RFID card swiping,charging,bluetooth commands and so on.

}

FInsType= BASE8(Query/Set time difference of SMS message)
FT_BASE8Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FTimeDifference: Time difference (unit: minutes; the working time of the device is based on UTC time, and the local time is converted to UTC time + time difference)
}

FInsType= BASE9(Query/Set VIP phone numbers)
FT_BASE9Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FVIP1:The first VIP number (if not set, pass in 0)
FVIP2:The second VIP number (if not set, pass in 0)
FVIP3:The third VIP number (if not set, pass in 0)
FVIP4:The fourth VIP number (if not set, pass in 0)
FVIP5:The fifth VIP number (if not set, pass in 0)
}

FInsType= BASE10(Query/Set Main and Backup IP address(or Domain) and TCP port , APN, APN user and pass)
FT_BASE10Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FMainIP: Main IP address
FMainPort: main TCP port
FSubIP:Backup Ip address
FSubPort: Backup TCP port
FCMNET:APN
FAPN:APNuser
FPassword:APNpass
}

FInsType= BASE40(Query/Set Only VIP phone number query and device configuration are allowed)
FT_BASE40Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FType: 1 means that only VIP numbers are supported for device configuration and query, 0 means that non-VIP numbers can also be configured and queried. Default 0
}

FInsType= BASE43(Query/Set Mileage accumulation function)
FT_BASE43Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(0: Query; 1: Indicates setting the speed limit value operation of mileage statistics; 2: Indicates setting the mileage synchronization value)
FValue: If the command is 1, it means the speed limit value operation of mileage statistics (that is, if the speed is less than the changed value, the mileage will not be counted, the default is xkm/h, parameter 0-100); if the command is 2, it means setting the mileage synchronization value to x kilometers
}

FInsType= BASE44(Query/Set GPS static drift optimization)
FT_BASE44Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FType: 1 turns on this static drift processing function, 0 means turns off the static drift processing function
}

FInsType= BASE51(Query/Set Motion/Static report interval)-for JT301X device model
FT_BASE51Ins:
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FStaticUploadInterval: Static report interval, value range 10-1440, unit minute
FDynamicUploadInterval: Motion/Static report interval, the value range is 10-1440, unit minute, this item requires the device to have motion detection function, and this function is turned on, this field value will take effect.
}

FInsType= BASE52(Query/set host device name)
FT_BASE52Ins:
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FName: host device name
}

FInsType= BASE58(Query/set wakeup mode)-for JT301X device model
FT_BASE58Ins:
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FModel: Mode 0: Timing mode, 1: Intelligent mode (automatically switches between dynamic and static intervals based on vibration)
}

FInsType= BASE59(Query/Set Environment Abnormal Alarm Parameters)-for JT301X device model
FT_BASE59Ins:
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(0:query common alarm setting(light sensor),1: Set common alarms (light sensor) ,2 query extend sensors alarm setting(temperature/ humidity / pressure sensor),3 Set extend sensors alarm(temperature/ humidity / pressure sensor))
FType: 1: temperature parameter, 2: humidity parameter, 3: light parameter, 4: air pressure parameter
FLowThreshold: low threshold
FHighThreshold: high threshold
Note:
1: Temperature parameter, unit ℃, range (-50~125), the value of -50 will not take effect
2: Humidity parameter, unit %, range 0-100%, value 0 will not take effect
3: Illumination parameter, unit lx, value 0-65535, value 0 will not take effect
4: Air pressure parameter, unit mbar, value 0-65535, value 0 will not take effect
}

FInsType= BASE78(Query/set environment anomaly detection parameters during sleep)
FT_BASE78Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(0 query common setting(light sensor),1 Set common (light sensor),2 query extend sensors setting(temperature/ humidity / pressure sensor),3 Set extend sensors(temperature/ humidity / pressure sensor))
FValue: 1: temperature parameter, 2: humidity parameter, 3: light parameter, 4: air pressure parameter
FTime: The time interval for environment detection. The value range is [5~65535], and the unit is second.
FExceptionTime: The wakeup interval after the device detects anomalies and alarms. The value range is [60-1440], and the unit is minutes.
}

FInsType= GSENS1(Query/set vibration wake-up threshold)
FT_GSENS1Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FValue: The unit is mg (the gsensor chip 63mg is a ladder configuration, the actual chip configuration value is 500/63 rounded = 7), the minimum value is 63, and the maximum value is 8000. When the vibration reaches this value, a vibration will be detected. If the value is equal to 0, turn off the function
}

FInsType= GSENS2( Query/set vibration alarm value)
FT_GSENS2Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FValue: Vibration alarm value: The valid range is 63 to 8000, the unit is mg, the default is 0 to turn off the vibration alarm function. Must be larger than the vibration wake-up value
}

FInsType= DEBUG5( Query/set SMS wake-up)
FT_DEBUG5Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FType:0 means to turn off SMS wake-up, 1 means to turn on SMS wake-up
}

FInsType= DEBUG7(Deep sleep warehousing mode (Shutdown device remotely))

FInsType= DEBUG15(Force Device enter sleep)
FT_DEBUG15Ins
{
FAssetID:Device ID e.g. “835210000201”
FTime:Indicates how many seconds it will take for the device to go to sleep.
}

FInsType= DEBUG27(Query SIM card information)

FInsType= DEBUG29(Query/delete historical (blind area) data in Flash)
FT_DEBUG29Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:delete;0:query)
}

FInsType= DEBUG30(Query/set speeding alarm)
FT_DEBUG30Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FSpeedThreshold: speeding threshold
FDuration:Duration.unit in seconds
}

FInsType= DEBUG31(Query/set low battery alarm value)
FT_DEBUG31Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FAlarmThreshold: Low battery threshold. unit in %
}

FInsType= DEBUG34(Set voice announcement volume and language)- for JT705A device model
FT_DEBUG34Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FVolume: Voice broadcast volume, the volume setting range is 1-15, 1 corresponds to the smallest volume, the default is 9
FLanguage: Language selection 0: Chinese 1: English, default Chinese
}

FInsType= ELOCK2(Query/Set long-time unlocking alarm threshold)
FT_ELOCK2Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FValue:longtime unlocking alarm threshold, unit in minutes. The device pulls out the lock rope, after unlocking, the device is not locked for preset time, and a long-time unlocking alarm is generated; the value range is 1 to 10 minutes. The default is 1 minute.
}

FInsType= ELOCK19(Query/set automatic locking time)
FT_ELOCK19Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FValue: Automatic locking time, 1 means automatic locking after 1 minute, unit minute, value 1~10
}

FInsType= ELOCK22(Query and Set the position data reporting interval when the device is unlocked or locked)
FT_ELOCK22Ins
{
FAssetID:Device ID e.g. “835210000201”
FOperationType:Operation mode(1:setting;0:query)
FFunctionType:0 turns off the function, 1: turns on the function
FUnLockUploadInterval:Position data reporting interval in unlocked state, unit in seconds. Value range [5-3600]
FLockUploadInterval:Position data reporting interval in the locked state, unit in seconds .Value range [5-600]
}

Response example:

Correct response:

{
    "Result": 200,
    "Message": "success",
    "FObject": []
}

Error response:

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

Other result status description:

  • 105:System exception
  • 104:token error or expire
  • 102:Parameter error
  • 131: command not support
  • 108: send error

Examples:

Java:

String result = "";
String url = "http://cloud.assetscontrols.com:8092/OpenApi/Instruction";
String body = "{FAction:\"CommandInstruction\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FAssetGUID:\"7f6b94c8-abda-48aa-9eec-9e2d8c5f6a3c\",FInsType:\"P14\"}";
URL realUrl = new URL(url);
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;
 }
return result;

C#:

string url = "http://cloud.assetscontrols.com:8092/OpenApi/Instruction";
string body = "{FAction:\"CommandInstruction\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FAssetGUID:\"7f6b94c8-abda-48aa-9eec-9e2d8c5f6a3c\",FInsType:\"P14\"}";
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))
{
    return reader.ReadToEnd();
}

Python:

url = 'http://cloud.assetscontrols.com:8092/OpenApi/Instruction'
      data = {
      "FAction": "CommandInstruction",
      "FTokenID": "3acef045-d302-4032-b40a-d9ee6c1519cd",
      "FAssetGUID": "8dc24026-649d-4d5b-aee4-f3d24cf56fbe",
      "FOffline": "0",
      "FInsType": "P04",
      "FT_P04Ins": {
        "FOperationType": "1",
        "FUpLoadInterval": "30",
        "FAwakenInterval": "30",
        "FMotionUpLoadInterval": "45",
        "FStaticUpLoadInterval": "60",
        "FJudgingTime": "3"
      }
}
      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;
文档更新时间: 2023-12-01 10:11   作者:admin