Query the TSL Model of a Device
Query the TSL (Thing Specification Language) model of a device.
Request URL
GET {base_url}/device/openapi/v1/devices/{deviceId}/thing-specification
Request Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Authorization | Yes | String | The valid access token for making API calls. The format should be Bearer {access_token}. |
Parameter | Required | Type | Description |
---|---|---|---|
deviceId | Yes | Long | The unique ID of this device, which is returned when you add
the device. Note: If you did NOT save the
deviceID, you can query the device's ID using Search Specific Devices.
|
Response Parameters
Parameter | Type | Description |
---|---|---|
data | Object<TSL_Model> | TSL model of the queried device. |
status | String | The result of the API request.
|
requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
- TSL_Model
-
Parameter Type Description version String The version of the device's TSL model. properties Array<TSL_Properties> Properties describe the status and information of this device. events Array<TSL_Events> Events contain the information reported from the device to Milesight Development Platform for notification and processing. services Array<TSL_Services> Services include the device's available commands or methods for external invocation.
- TSL_Properties
-
Parameter Type Description id String The unique ID of the property. propertyKey String The property key. name String The property name. description String The property description. accessMode String The access mode of the property. R
: Read-only properties, which are static data or values that can NOT be changed, used to describe the device's status or information.For example, the SN (Serial Number) and firmware version of a device.
W
: Write-only properties are configurable parameters, which represent the device's settings that can be configured.For example, the data reporting interval of a sensor.Note: You can modify the values of Write-only properties to update the device's settings using Update Device Properties Incrementally.RW
: Read and write properties, which not only describe device information but also can be modified.For example, the on/off status of a smart socket.
Note: You can modify the values of Read and write properties to update the device's settings using Update Device Properties Incrementally.
dataSpec Object Data definition of this property. Note: The returned parameters vary depending on the device's model.dataType String The data type of the property. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
elementDataType String Type of the element data. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
parentId String ID of the parent property. defaultValue String The default value of the this property. unitName String The name of the unit. fractionDigits Integer The number of decimal places to be retained. coefficient Number Coefficient of the property. validator Object The mechanism that enforces data validation rules for this property. min Number The minimum value. max Number The maximum value. minSize Integer The minimum length for String
data.maxSize Integer The maximum length for String
andArray
data.required Boolean Whether this property is required. true
: Required.false
: Optional.
encoding String Encoding methods for String
data.HEX
ASCII
UTF8
BASE64
mapping Object Enumeration mapping. key String Enum value. value String The property name. assist providerType String dependsOnValue Object id String values Array<Integer> lengthBy String indexBy String indexBase Integer separateElements Boolean
- TSL_Events
-
Parameter Type Description id String The unique ID of the event. name String The name of the event. description String The description of the event. type String The type of the event. INFO
WARN
ERROR
outputs Array The output parameters, namely, the reported data when this event occurs. id String The unique ID of the output parameter. propertyKey String Key of this reported property. name String Name of this output parameter. description String Description of this output parameter. dataSpec Object Data definition of this output parameter. dataType String The data type of the output parameter. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
elementDataType String Type of the element data. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
parentId String ID of the parent output parameter. defaultValue String The default value of the this output parameter. unitName String The name of the unit. fractionDigits Integer The number of decimal places to be retained. coefficient Number Coefficient of the output parameter. validator Object The mechanism that enforces data validation rules for this output parameter. min Number The minimum value. max Number The maximum value. minSize Integer The minimum length for String
data.maxSize Integer The maximum length for String
andArray
data.required Boolean Whether this output parameter is required. true
: Required.false
: Optional.
encoding String Encoding methods for String
data.HEX
ASCII
UTF8
BASE64
mapping Object Enumeration mapping. key String Enum value. value String The event name. ref String Referencing existing properties.
- TSL_Services
-
Parameter Type Description id String The unique ID of this service. name String The name of the service. description String The description of the service. callType String The type of this service invocation: SYNC
: Synchronous invocation.ASYNC
: Asynchronous invocation.
inputs Array The input parameters, namely, the downlink data when this service is invoked. id String The unique ID of this input parameter. propertyKey String name String The name of the input parameter. description String The description of the input parameter. dataSpec Object Data definition of this input parameter. dataType String The data type of the input parameter. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
elementDataType String Type of the element data. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
parentId String ID of the parent input parameter. defaultValue String The default value of the this input parameter. unitName String The name of the unit. fractionDigits Integer The number of decimal places to be retained. coefficient Number Coefficient of the input parameter. validator Object The mechanism that enforces data validation rules for this input parameter. min Number The minimum value. max Number The maximum value. minSize Integer The minimum length for String
data.maxSize Integer The maximum length for String
andArray
data.required Boolean Whether this input parameter is required. true
: Required.false
: Optional.
encoding String Encoding methods for String
data.HEX
ASCII
UTF8
BASE64
mapping Object Enumeration mapping. key String Enum value. value String The service name. ref String Referencing existing properties. outputs Array The output parameters, namely, the reported data when this service is invoked. id String The unique ID of the output parameter. propertyKey String name String Name of this output parameter. description String Description of this output parameter. dataSpec Object Data definition of this output parameter. dataType String The data type of the output parameter. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
elementDataType String Type of the element data. BOOL
STRING
STRUCT
DATE
ARRAY
INT
LONG
FLOAT
DOUBLE
ENUM
parentId String ID of the parent output parameter. defaultValue String The default value of the this output parameter. unitName String The name of the unit. fractionDigits Integer The number of decimal places to be retained. coefficient Number Coefficient of the output parameter. validator Object The mechanism that enforces data validation rules for this output parameter. min Number The minimum value. max Number The maximum value. minSize Integer The minimum length for String
data.maxSize Integer The maximum length for String
andArray
data.required Boolean Whether this output parameter is required. true
: Required.false
: Optional.
encoding String Encoding methods for String
data.HEX
ASCII
UTF8
BASE64
mapping Object Enumeration mapping. key String Enum value. value String The service name. ref String Referencing existing properties.
Examples
- Request example
- Query the TSL model of the device with ID "1739930666380779522"
- Response example
-
HTTP/1.1 200 OK { "data": { "version": "v1.0", "properties": [ { "id": "ipso_version", "name": "${pd.common.tsl.property.ipso_version.name}", "accessMode": "R", "dataSpec": { "dataType": "INT", "validator": { "required": true } } }, { "id": "sn", "name": "${pd.common.tsl.property.sn.name}", "accessMode": "R", "dataSpec": { "dataType": "STRING", "validator": { "maxSize": 12, "required": true }, "encoding": "HEX" } }, { "id": "hardware_version", "name": "${pd.common.tsl.property.hardware_version.name}", "accessMode": "R", "dataSpec": { "dataType": "STRING", "validator": { "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "firmware_version", "name": "${pd.common.tsl.property.firmware_version.name}", "accessMode": "R", "dataSpec": { "dataType": "STRING", "validator": { "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "lorawan_class", "name": "${pd.common.tsl.property.lorawan_class.name}", "accessMode": "R", "dataSpec": { "dataType": "ENUM", "validator": { "required": true }, "mapping": { "0": "${pd.common.tsl.property.lorawan_class.enum.0}" } } }, { "id": "battery", "name": "${pd.common.tsl.property.battery.name}", "accessMode": "R", "dataSpec": { "dataType": "INT", "unitName": "%", "validator": { "min": 1.0, "max": 100.0, "required": true } } }, { "id": "temperature", "name": "${pd.ws203.tsl.property.temperature.name}", "accessMode": "R", "dataSpec": { "dataType": "FLOAT", "unitName": "℃", "fractionDigits": 1, "coefficient": 0.1, "validator": { "required": true } } }, { "id": "humidity", "name": "${pd.ws203.tsl.property.humidity.name}", "accessMode": "R", "dataSpec": { "dataType": "FLOAT", "unitName": "%RH", "fractionDigits": 1, "coefficient": 0.5, "validator": { "min": 0.0, "max": 100.0, "required": true } } }, { "id": "pir_status", "name": "${pd.ws203.tsl.property.pir_status.name}", "accessMode": "R", "dataSpec": { "dataType": "ENUM", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.property.pir_status.enum.0}", "1": "${pd.ws203.tsl.property.pir_status.enum.1}" } } }, { "id": "reporting_interval", "name": "${pd.ws203.tsl.property.reporting_interval.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "reporting_interval.time", "name": "${pd.ws203.tsl.property.reporting_interval.time.name}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "reporting_interval", "defaultValue": "30", "unitName": "min", "validator": { "min": 1.0, "max": 1440.0, "required": true } } }, { "id": "collecting_interval", "name": "${pd.ws203.tsl.property.collecting_interval.name}", "accessMode": "W", "dataSpec": { "dataType": "INT", "defaultValue": "1", "unitName": "min", "validator": { "min": 1.0, "max": 1440.0, "required": true } } }, { "id": "vacancy_reporting_interval", "name": "${pd.ws203.tsl.property.vacancy_reporting_interval.name}", "description": "${pd.ws203.tsl.property.vacancy_reporting_interval.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "defaultValue": "300", "unitName": "s", "validator": { "min": 60.0, "max": 3600.0, "required": true } } }, { "id": "led_indicator", "name": "${pd.ws203.tsl.property.led_indicator.name}", "description": "${pd.ws203.tsl.property.led_indicator.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.led_indicator.enum.0}", "true": "${pd.ws203.tsl.property.led_indicator.enum.1}" } } }, { "id": "time_zone", "name": "${pd.ws203.tsl.property.time_zone.name}", "accessMode": "W", "dataSpec": { "dataType": "ENUM", "defaultValue": "0", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.property.time_zone.enum.0}", "10": "${pd.ws203.tsl.property.time_zone.enum.10}", "20": "${pd.ws203.tsl.property.time_zone.enum.20}", "30": "${pd.ws203.tsl.property.time_zone.enum.30}", "35": "${pd.ws203.tsl.property.time_zone.enum.35}", "40": "${pd.ws203.tsl.property.time_zone.enum.40}", "45": "${pd.ws203.tsl.property.time_zone.enum.45}", "50": "${pd.ws203.tsl.property.time_zone.enum.50}", "55": "${pd.ws203.tsl.property.time_zone.enum.55}", "57": "${pd.ws203.tsl.property.time_zone.enum.57}", "60": "${pd.ws203.tsl.property.time_zone.enum.60}", "65": "${pd.ws203.tsl.property.time_zone.enum.65}", "70": "${pd.ws203.tsl.property.time_zone.enum.70}", "80": "${pd.ws203.tsl.property.time_zone.enum.80}", "90": "${pd.ws203.tsl.property.time_zone.enum.90}", "95": "${pd.ws203.tsl.property.time_zone.enum.95}", "100": "${pd.ws203.tsl.property.time_zone.enum.100}", "105": "${pd.ws203.tsl.property.time_zone.enum.105}", "110": "${pd.ws203.tsl.property.time_zone.enum.110}", "120": "${pd.ws203.tsl.property.time_zone.enum.120}", "127": "${pd.ws203.tsl.property.time_zone.enum.127}", "130": "${pd.ws203.tsl.property.time_zone.enum.130}", "140": "${pd.ws203.tsl.property.time_zone.enum.140}", "-120": "${pd.ws203.tsl.property.time_zone.enum._120}", "-110": "${pd.ws203.tsl.property.time_zone.enum._110}", "-100": "${pd.ws203.tsl.property.time_zone.enum._100}", "-95": "${pd.ws203.tsl.property.time_zone.enum._95}", "-90": "${pd.ws203.tsl.property.time_zone.enum._90}", "-80": "${pd.ws203.tsl.property.time_zone.enum._80}", "-70": "${pd.ws203.tsl.property.time_zone.enum._70}", "-60": "${pd.ws203.tsl.property.time_zone.enum._60}", "-50": "${pd.ws203.tsl.property.time_zone.enum._50}", "-40": "${pd.ws203.tsl.property.time_zone.enum._40}", "-35": "${pd.ws203.tsl.property.time_zone.enum._35}", "-30": "${pd.ws203.tsl.property.time_zone.enum._30}", "-20": "${pd.ws203.tsl.property.time_zone.enum._20}", "-10": "${pd.ws203.tsl.property.time_zone.enum._10}" } } }, { "id": "data_storage_enable", "name": "${pd.ws203.tsl.property.data_storage_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.data_storage_enable.enum.0}", "true": "${pd.ws203.tsl.property.data_storage_enable.enum.1}" } } }, { "id": "retransmission_enable", "name": "${pd.ws203.tsl.property.retransmission_enable.name}", "description": "${pd.ws203.tsl.property.retransmission_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.retransmission_enable.enum.0}", "true": "${pd.ws203.tsl.property.retransmission_enable.enum.1}" } } }, { "id": "retransmission_interval", "name": "${pd.ws203.tsl.property.retransmission_interval.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "retransmission_interval.interval", "name": "${pd.ws203.tsl.property.retransmission_interval.interval.name}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "retransmission_interval", "defaultValue": "600", "unitName": "s", "validator": { "min": 30.0, "max": 1200.0, "required": true } } }, { "id": "retrival_interval", "name": "${pd.ws203.tsl.property.retrival_interval.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "retrival_interval.interval", "name": "${pd.ws203.tsl.property.retrival_interval.interval.name}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "retrival_interval", "defaultValue": "60", "unitName": "s", "validator": { "min": 30.0, "max": 1200.0, "required": true } } }, { "id": "threshold_parameter", "name": "${pd.ws203.tsl.property.threshold_parameter.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "threshold_parameter.threshold_condition", "name": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.name}", "accessMode": "W", "dataSpec": { "dataType": "ENUM", "parentId": "threshold_parameter", "defaultValue": "0", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.enum.0}", "1": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.enum.1}", "2": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.enum.2}", "3": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.enum.3}", "4": "${pd.ws203.tsl.property.threshold_parameter.threshold_condition.enum.4}" } } }, { "id": "threshold_parameter.threshold_max", "name": "${pd.ws203.tsl.property.threshold_parameter.threshold_max.name}", "accessMode": "W", "dataSpec": { "dataType": "FLOAT", "parentId": "threshold_parameter", "defaultValue": "0", "unitName": "℃", "fractionDigits": 1, "coefficient": 0.1, "validator": { "min": -30.0, "max": 60.0, "required": true } } }, { "id": "threshold_parameter.threshold_min", "name": "${pd.ws203.tsl.property.threshold_parameter.threshold_min.name}", "accessMode": "W", "dataSpec": { "dataType": "FLOAT", "parentId": "threshold_parameter", "defaultValue": "0", "unitName": "℃", "fractionDigits": 1, "coefficient": 0.1, "validator": { "min": -30.0, "max": 60.0, "required": true } } }, { "id": "d2d_enable", "name": "${pd.ws203.tsl.property.d2d_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_enable.enum.1}" } } }, { "id": "d2d_key", "name": "${pd.ws203.tsl.property.d2d_key.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "defaultValue": "5572404c696e6b4c", "validator": { "minSize": 16, "maxSize": 16, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_occupied_temperature", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "d2d_trigger_by_occupied_temperature.enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied_temperature", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied_temperature.lora_uplink_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.lora_uplink_enable.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.lora_uplink_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied_temperature", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.lora_uplink_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.lora_uplink_enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied_temperature.control_command", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_command.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "parentId": "d2d_trigger_by_occupied_temperature", "defaultValue": "0000", "validator": { "minSize": 4, "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_occupied_temperature.control_time_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_time_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied_temperature", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_time_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_time_enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied_temperature.control_time", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_time.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_occupied_temperature.control_time.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "d2d_trigger_by_occupied_temperature", "defaultValue": "5", "unitName": "min", "validator": { "required": true } } }, { "id": "d2d_trigger_by_occupied", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "d2d_trigger_by_occupied.enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied.lora_uplink_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.lora_uplink_enable.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.lora_uplink_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.lora_uplink_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.lora_uplink_enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied.control_command", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_command.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "parentId": "d2d_trigger_by_occupied", "defaultValue": "0000", "validator": { "minSize": 4, "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_occupied.control_time_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_time_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_occupied", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_time_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_time_enable.enum.1}" } } }, { "id": "d2d_trigger_by_occupied.control_time", "name": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_time.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_occupied.control_time.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "d2d_trigger_by_occupied", "defaultValue": "5", "unitName": "min", "validator": { "required": true } } }, { "id": "d2d_trigger_by_vacant", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "d2d_trigger_by_vacant.enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_vacant", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.enable.enum.1}" } } }, { "id": "d2d_trigger_by_vacant.lora_uplink_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.lora_uplink_enable.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.lora_uplink_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_vacant", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.lora_uplink_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.lora_uplink_enable.enum.1}" } } }, { "id": "d2d_trigger_by_vacant.control_command", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_command.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "parentId": "d2d_trigger_by_vacant", "defaultValue": "0000", "validator": { "minSize": 4, "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_vacant.control_time_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_time_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_vacant", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_time_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_time_enable.enum.1}" } } }, { "id": "d2d_trigger_by_vacant.control_time", "name": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_time.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_vacant.control_time.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "d2d_trigger_by_vacant", "defaultValue": "5", "unitName": "min", "validator": { "required": true } } }, { "id": "d2d_trigger_by_temperature_threshold", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "d2d_trigger_by_temperature_threshold.enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold.lora_uplink_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.lora_uplink_enable.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.lora_uplink_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.lora_uplink_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.lora_uplink_enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold.control_command", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_command.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "parentId": "d2d_trigger_by_temperature_threshold", "defaultValue": "0000", "validator": { "minSize": 4, "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_temperature_threshold.control_time_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_time_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_time_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_time_enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold.control_time", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_time.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold.control_time.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "d2d_trigger_by_temperature_threshold", "defaultValue": "5", "unitName": "min", "validator": { "required": true } } }, { "id": "d2d_trigger_by_temperature_threshold_release", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.name}", "accessMode": "W", "dataSpec": { "dataType": "STRUCT", "validator": { "required": true } } }, { "id": "d2d_trigger_by_temperature_threshold_release.enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold_release", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold_release.lora_uplink_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.lora_uplink_enable.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.lora_uplink_enable.description}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold_release", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.lora_uplink_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.lora_uplink_enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold_release.control_command", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_command.name}", "accessMode": "W", "dataSpec": { "dataType": "STRING", "parentId": "d2d_trigger_by_temperature_threshold_release", "defaultValue": "0000", "validator": { "minSize": 4, "maxSize": 4, "required": true }, "encoding": "HEX" } }, { "id": "d2d_trigger_by_temperature_threshold_release.control_time_enable", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_time_enable.name}", "accessMode": "W", "dataSpec": { "dataType": "BOOL", "parentId": "d2d_trigger_by_temperature_threshold_release", "defaultValue": "false", "validator": { "required": true }, "mapping": { "false": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_time_enable.enum.0}", "true": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_time_enable.enum.1}" } } }, { "id": "d2d_trigger_by_temperature_threshold_release.control_time", "name": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_time.name}", "description": "${pd.ws203.tsl.property.d2d_trigger_by_temperature_threshold_release.control_time.description}", "accessMode": "W", "dataSpec": { "dataType": "INT", "parentId": "d2d_trigger_by_temperature_threshold_release", "defaultValue": "5", "unitName": "min", "validator": { "required": true } } } ], "events": [ { "id": "temperature_threshold_alarm", "name": "${pd.ws203.tsl.event.temperature_threshold_alarm.name}", "type": "WARN", "outputs": [ { "ref": "temperature" }, { "id": "temperature_threshold_alarm.alarm_type", "name": "${pd.ws203.tsl.param.temperature_threshold_alarm.alarm_type.name}", "dataSpec": { "dataType": "ENUM", "parentId": "temperature_threshold_alarm", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.param.temperature_threshold_alarm.alarm_type.enum.0}", "1": "${pd.ws203.tsl.param.temperature_threshold_alarm.alarm_type.enum.1}" } } } ] }, { "id": "historical_data", "name": "${pd.ws203.tsl.event.historical_data.name}", "type": "INFO", "outputs": [ { "id": "historical_data.timestamp", "name": "${pd.ws203.tsl.param.historical_data.timestamp.name}", "dataSpec": { "dataType": "DATE", "parentId": "historical_data", "unitName": "s", "validator": { "required": true } } }, { "id": "historical_data.trigger_type", "name": "${pd.ws203.tsl.param.historical_data.trigger_type.name}", "dataSpec": { "dataType": "ENUM", "parentId": "historical_data", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.param.historical_data.trigger_type.enum.0}", "1": "${pd.ws203.tsl.param.historical_data.trigger_type.enum.1}", "2": "${pd.ws203.tsl.param.historical_data.trigger_type.enum.2}", "3": "${pd.ws203.tsl.param.historical_data.trigger_type.enum.3}", "4": "${pd.ws203.tsl.param.historical_data.trigger_type.enum.4}" } } }, { "id": "historical_data.pir_status", "name": "${pd.ws203.tsl.param.historical_data.pir_status.name}", "dataSpec": { "dataType": "ENUM", "parentId": "historical_data", "validator": { "required": true }, "mapping": { "0": "${pd.ws203.tsl.param.historical_data.pir_status.enum.0}", "1": "${pd.ws203.tsl.param.historical_data.pir_status.enum.1}" } } }, { "id": "historical_data.temperature", "name": "${pd.ws203.tsl.param.historical_data.temperature.name}", "dataSpec": { "dataType": "FLOAT", "parentId": "historical_data", "unitName": "℃", "fractionDigits": 1, "coefficient": 0.1, "validator": { "required": true } } }, { "id": "historical_data.humidity", "name": "${pd.ws203.tsl.param.historical_data.humidity.name}", "dataSpec": { "dataType": "FLOAT", "parentId": "historical_data", "unitName": "%RH", "fractionDigits": 1, "coefficient": 0.5, "validator": { "min": 0.0, "max": 100.0, "required": true } } } ] } ], "services": [ { "id": "reboot", "name": "${pd.ws203.tsl.service.reboot.name}", "callType": "ASYNC", "inputs": [], "outputs": [] }, { "id": "query_device_status", "name": "${pd.ws203.tsl.service.query_device_status.name}", "callType": "ASYNC", "inputs": [], "outputs": [] }, { "id": "time_synchronize", "name": "${pd.ws203.tsl.service.time_synchronize.name}", "callType": "ASYNC", "inputs": [], "outputs": [] }, { "id": "clear_historical_data", "name": "${pd.ws203.tsl.service.clear_historical_data.name}", "callType": "ASYNC", "inputs": [], "outputs": [] }, { "id": "retrival_historical_data_by_time", "name": "${pd.ws203.tsl.service.retrival_historical_data_by_time.name}", "callType": "ASYNC", "inputs": [ { "id": "retrival_historical_data_by_time.time", "name": "${pd.ws203.tsl.param.retrival_historical_data_by_time.time.name}", "dataSpec": { "dataType": "DATE", "parentId": "retrival_historical_data_by_time", "unitName": "s", "validator": { "required": true } } } ], "outputs": [] }, { "id": "retrival_historical_data_by_time_range", "name": "${pd.ws203.tsl.service.retrival_historical_data_by_time_range.name}", "callType": "ASYNC", "inputs": [ { "id": "retrival_historical_data_by_time_range.start_time", "name": "${pd.ws203.tsl.param.retrival_historical_data_by_time_range.start_time.name}", "dataSpec": { "dataType": "DATE", "parentId": "retrival_historical_data_by_time_range", "unitName": "s", "validator": { "required": true } } }, { "id": "retrival_historical_data_by_time_range.end_time", "name": "${pd.ws203.tsl.param.retrival_historical_data_by_time_range.end_time.name}", "dataSpec": { "dataType": "DATE", "parentId": "retrival_historical_data_by_time_range", "unitName": "s", "validator": { "required": true } } } ], "outputs": [] }, { "id": "stop_historical_data_retrival", "name": "${pd.ws203.tsl.service.stop_historical_data_retrival.name}", "callType": "ASYNC", "inputs": [], "outputs": [] } ] }, "status": "Success", "requestId": "f2c9e4437820f8168d23b4cf754aa62d" }