UC51x – Available Services

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

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": {}
}

Supported services

Service ID

Reboot
{
    "serviceId": "reboot",
    "inputs": {}
}
Query Device Status
{
    "serviceId": "query_device_status",
    "inputs": {}
}
Time Synchronize
{
    "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": "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": {}
}
Clear Water Volume Counter1 Value
{
    "serviceId": "clear_counter1",
    "inputs": {}
}
Clear Water Volume Counter2 Value
{
    "serviceId": "clear_counter2",
    "inputs": {}
}
Change Water Volume Counter1 Value
{
    "serviceId": "set_counter1",
    "inputs": {
        "count": 0 // Counter Count Type: long
    }
}
Change Water Volume Counter2 Value
{
    "serviceId": "set_counter2",
    "inputs": {
        "count": 0 // Counter Count Type: long
    }
}
Valve Control
{
    "serviceId": "solenoid_work_setting",
    "inputs": {
        "time_enable": false, // Enable Time Rule Type: bool
        "count_enable": false, // Enable Water Volume Rule Type: bool
        "solenoid_state": "0", // Valve Control Type: enum Enum: 0-Close 1-Open
        "solenoid_target": "0", // Valve Type: enum Enum: 0-Valve1 1-Valve2
        "time_continue": 0, // Time Rule Type: int
        "count_continue": 0 // Water Volume Rule Type: long
    }
}