WT201 – Available Services

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

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: demo.milesight.cam
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6Inxxxxxxxxxxxxxx
Content-Type: application/json

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

Supported services

Service ID

Query Device Status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Time Synchronize
{
    "serviceId": "time_synchronize",
    "inputs": {}
}
Query Schedule
{
    "serviceId": "query_schedule",
    "inputs": {}
}
Clear historical data
{
    "serviceId": "clear_historical_data",
    "inputs": {}
}
Retrieve historical data for a specific time
{
    "serviceId": "retrival_historical_data_by_time",
    "inputs": {
        "time": "date" // Time Point Type: date Unit: s
    }
}
Retrieve historical data for a specific time range
{
    "serviceId": "retrival_historical_data_by_time_range",
    "inputs": {
        "start_time": "date", // Start Time Type: date Unit: s
        "end_time": "date" // End Time Type: date Unit: s
    }
}
Stop Retrieving historical data
{
    "serviceId": "stop_historical_data_retrival",
    "inputs": {}
}
Temperature Source Settings
{
    "serviceId": "temperature_mode_settings",
    "inputs": {
        "enable": "0", // Temperature Source 0-embedded temperature 1-external temperature
        "timeout": 10 // Timeout Type: int Unit: min
    }
}
External Temperature Settings
{
    "serviceId": "set_temperature_extend",
    "inputs": {
        "temperature_extend_value": 21 // Temperature Extend Value Type: int Unit: °C
    }
}
Schedule Plan Control
Note: This setting ONLY takes effect when Control Permission is set to Thermostat.
{
    "serviceId": "control_event",
    "inputs": {
        "value": "0" // Switch schedule plan 0-wake 1-away 2-home 3-sleep
    }
}
Relay Status Ctrl
Note: This setting ONLY takes effect when Control Permission is set to Remote Control.
{

    "serviceId": "set_relay_control",
    "inputs": {
        "y1_relay_control_mask": false, // Relay Y1 Mask Type: bool
        "y2_gl_relay_control_mask": false, // Relay Y2/GL Mask Type: bool
        "w1_relay_control_mask": false, // Relay W1 Mask Type: bool
        "w1_aux_relay_control_mask": false, // Relay W2/AUX Mask Type: bool
        "e_relay_control_mask": false, // Relay E Mask Type: bool
        "g_relay_control_mask": false, // Relay G Mask Type: bool
        "ob_relay_control_mask": false, // Relay O/B  Mask Type: bool
        "relay_control_mask_reserved": 0, // Reserved Type: int
        "y1_relay_working_status": false, // Relay Y1 Type: bool
        "y2_gl_relay_working_status": false, // Relay Y2/GL Type: bool
        "w1_relay_working_status": false, // Relay W1 Type: bool
        "w1_aux_relay_working_status": false, // Relay W2/AUX Type: bool
        "e_relay_working_status": false, // Relay E Type: bool
        "g_relay_control_status": false, // Relay G Type: bool
        "ob_relay_control_status": false, // Relay O/B Type: bool
        "reserved": 0 // Reserved Type: int
    }
}
Reboot
{
    "serviceId": "reboot",
    "inputs": {}
}