TS30x – Available Services

This topic provides IDs of services that can be invoked on TS30x.

Usage

Workflow
  1. Copy the snippet of the desired service.
  2. If input parameters are required, fill in the values and remove the comments.
  3. Use it as the body parameters of Invoke Device Services Asynchronously.
Example
POST /device/openapi/v1/devices/1737019327786467329/services/call HTTP/1.1
Host: milesight.demo.com
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Inxxxxxxxxxxxxxx
Content-Type: application/x-www-form-urlencoded
User-Agent: OpenAPI

{
    "serviceId": "reboot",
    "inputs": {}
}

Available services

Service parameters

Reboot the device
{
    "serviceId": "reboot",
    "inputs": {}
}
Query device status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Synchronize device time
{
    "serviceId": "time_synchronize",
    "inputs": {}
}
Clear historical data
{
    "serviceId": "clear_historical_data",
    "inputs": {}
}
Retrieve historical data for a specific time
{
    "serviceId": "retrival_historical_data_by_time",
    "inputs": {
        "time": null   // Specify the time for querying data (Format: Timestamp).
    }
}
Retrieve historical data for a specific time range
{
    "serviceId": "retrival_historical_data_by_time_range",
    "inputs": {
        "start_time": null,   // Specify the start time for querying data (Format: Timestamp).
        "end_time": null      // Specify the end time for querying data (Format: Timestamp).
    }
}
Stop retrieving historical data
{
    "serviceId": "stop_historical_data_retrival",
    "inputs": {}
} 
Get Sensor ID
Note: This only works with hardware v2.x or later.
{
    "serviceId": "query_sensor_id",
    "inputs": {
        "channel_id": "0" // Channel ID Type: enum Enum: 0-get channel 0 sensor id 1-get channel 1 sensor id 2-get all channel sensor id
    }
}
Change the number of ACK retransmissions for LORA
Note: This only works with hardware v2.x or later.
{
    "serviceId": "change_lora_ack_retry_times",
    "inputs": {
        "times": 1 // Retry Cnt Type: int
    }
}
Get Device Configuration
Note: This only works with hardware v2.x or later.
{
    "serviceId": "get_device_cfg",
    "inputs": {
        "cfg_id": "1" // Cfg ID Type: enum Enum: 1-Report Period 2-LoRa Confirmation Packet Retransmission Count 3-Temperature Unit 4-Button Lock 5-CH1 Temperature Threshold Configuration 6-CH1 Humidity Threshold Configuration 7-CH2 Temperature Threshold Configuration 8-CH2 Humidity Threshold Configuration 9-CH1 Temperature Sudden Change Configuration 10-CH1 Humidity Sudden Change Configuration 11-CH2 Temperature Sudden Change Configuration 12-CH2 Humidity Sudden Change Configuration 13-Collect Period 14-Alarm Interval and Alarm Count 15-Threadhold Alarm dismiss 16-D2D Data Transmission Configuration 17-D2D Master Switch 18-D2D Master CH1 Temperature Threshold Trigger Configuration 19-D2D Master CH1 Temperature Threshold Release Configuration 20-D2D Master CH1 Temperature Sudden Change Threshold Trigger Configuration 21-D2D Master CH1 Humidity Threshold Trigger Configuration 22-D2D Master CH1 Humidity Threshold Release Configuration 23-D2D Master CH1 Humidity Sudden Change Threshold Trigger Configuration 24-D2D Master CH1 Door Magnet Engagement Trigger Configuration 25-D2D Master CH1 Door Magnet Disengagement Trigger Configuration 26-D2D Master CH2 Temperature Threshold Trigger Configuration 27-D2D Master CH2 Temperature Threshold Release Configuration 28-D2D Master CH2 Temperature Sudden Change Threshold Trigger Configuration 29-D2D Master CH2 Humidity Threshold Trigger Configuration 30-D2D Master CH2 Humidity Threshold Release Configuration 31-D2D Master CH2 Humidity Sudden Change Threshold Trigger Configuration 32-D2D Master CH2 Door Magnet Engagement Trigger Configuration 33-D2D Master CH2 Door Magnet Disengagement Trigger Configuration 34-Data Storage 35-Retransmit Period 36-MCS Delay Alarm 37-Retransmission Period 38-CH1 Temperature Calibration Configuration 39-CH1 Humidity Calibration Configuration 40-CH2 Temperature Calibration Configuration 41-CH2 Humidity Calibration Configuration 42-Daylight Saving Time Configuration 43-Time Display System 44-Door Magnet Anti-Shake Time 45-Screen Status 46-Retransmit Enable
    }
}