UC51x – Configurable Properties
You can update a device's settings by modifying the configurable properties of its TSL model via API. This topic provides the configurable parameters for UC51x TSL model, their descriptions, and how to use them.
Usage
- Have an overview of the configurable properties and their default values of UC51x .
- Copy the example code and remove the comments and parameters that do not require modification.
- Edit the desired properties according to the detailed
properties description
.
Note: Make sure that the edited example code complies with the JSON format requirements.
- Use the edited example code as the body parameters of Update Device Properties Incrementally.
Configurable Properties
The following code represents all configurable properties in the UC51x TSL model, along with their default values.
- Click a property to view its detailed description and valid values.
- Configure the example code as needed, then use it as the body parameters of Update Device Properties Incrementally to save time and effort.
{
"version": "v4.0", //This version is for hardware version 4.x of UC51x.
"type": "TSL",
"properties": {
"collect_interval": 21600, // Collecting Interval Type: int Unit: s
"reporting_interval": 21600, // Reporting Interval Type: int Unit: s
"time_zone": "0", // Time Zone Type: enum
"data_storage_enable": false, // Data Storage Enable Type: bool
"retransmission_enable": false, // Data Retransmission Enable Type: bool
"retransmission_interval": { // Retransmission Interval Settings Type: struct
"interval": 600 // Retransmission Interval Type: int Unit: s
},
"retrival_interval": { // Retrival Interval Settings Type: struct
"interval": 60 // Retrival Interval Type: int Unit: s
},
"auto_confirm": false, // Auto-Confirmed Mechanism Type: bool
"class_a_response_time": 600, // ClassA Response Time Type: long Unit: s
"filter_setting": { // Pulse Filter Setting Type: struct
"mode": "1", // Pulse Filter Mode Type: enum
"time": 250 // Pulse Filter Rate Type: int
},
"jitter_time": 40, // Jitter Time Type: int Unit: s
"solenoid_setting": { // Control Settings Type: struct
"count": 1, // Valve Control frequency Type: int
"time": 100, // Valve Control Pulse Time Type: int Unit: ms
"power_time": 1000 // Valve Control Power Time Type: int Unit: ms
},
"d2d_enable": false, // D2D Enable Type: bool
"d2d_key": "5572404c696e6b4c", // D2D Key Type: string
"rule_setting": [ // Rule Engine Settings Type: array Length: 1
{
"channel": 1, // Rule ID Type: int
"enable": false, // Rule Enable Type: bool
"condition_mode": "0", // If Type: enum
"time_condition": { // Time Type: struct
"start_timestamp": " ", // Start Time Type: date Unit: s
"end_timestamp": " ", // End Time Type: date Unit: s
"repeat_enable": false, // Is Loop Type: bool
"repeat_mode": "1", // Loop Mode Type: enum
"repeat_time": 0, // Loop Period Type: int
"repeat_monday": false, // Monday Type: bool
"repeat_tuesday": false, // Tuesday Type: bool
"repeat_wednesday": false, // Wednesday Type: bool
"repeat_thursday": false, // Thursday Type: bool
"repeat_friday": false, // Friday Type: bool
"repeat_saturday": false, // Saturday Type: bool
"repeat_sunday": false // Sunday Type: bool
},
"d2d_condition": { // D2D Type: struct
"cmd": "0000" // D2D Conmand Type: string
},
"pulse_per_time_condition": { // Threshold (Pulses) Type: struct
"target": "1", // Water Volume Counter Type: enum
"time": 0, // Period Type: int Unit: min
"threshold": 0 // Threshold (Pulses) Type: long
},
"pulse_per_count_condition": { // Every increase of water volume Type: struct
"target": "1", // Water Volume Counter Type: enum
"threshold": 0 // Threshold (Pulses) Type: long
},
"action_mode": "0", // Then Type: enum
"urgent_task_action": { // D2D Action Type: struct
"target": "1", // Valve Type: enum
"state": false, // Valve Control Type: bool
"time_enable": false, // Enable Time Rule Type: bool
"time_continue": 0, // Duration Type: long Unit: s
"count_enable": false, // Enable Water Volume Rule Type: bool
"count_continue": 0 // Water Volume (Pulse) Type: long
},
"normal_task_action": { // Regular Control Action Type: struct
"target": "1", // Valve Type: enum
"state": false, // Valve Control Type: bool
"time_enable": false, // Enable Time Rule Type: bool
"time_continue": 0, // Duration Type: long Unit: s
"count_enable": false, // Enable Water Volume Rule Type: bool
"count_continue": 0 // Water Volume (Pulse) Type: long
},
"message_alarm_action": { // Message Alarm Type: struct
"type": "1", // Alarm Type Type: enum
"message": "B5ROF" // Reported Message Type: string
}
}
]
}
}
Description
The following table provides the description and valid values for the configurable properties of UC51x.
Parameter | Type | Description | ||
---|---|---|---|---|
collect_interval | Integer |
Specify the interval for collecting data (Unit: second).
|
||
reporting_interval | Integer |
Specify the interval for data reporting (Unit: Second).
|
||
time_zone | Enum |
Specify the time zone for this device.
|
||
data_storage_enable | Boolean |
Decide whether to allow the device to store data. Note: This setting ONLY takes effect with
hardware version 3.x and 4.x.
Valid value :
|
||
retransmission_enable | Boolean |
Decide whether to enable data
retransmission, which allows the device to log time point of
network disconnection periodically resend the accumulated
data during the disconnection period upon reconnection.
Note: This setting ONLY takes effect
when data_storage_enable is set to
true .
Valid value :
|
||
retransmission_interval | Struct |
Note: This setting ONLY takes effect
when retransmission_enable is set to
The interval for data
retransmission.true . |
||
interval | Integer |
Specify the interval for data retransmission (Unit:
Second).
|
||
retrival_interval | Struct |
The time interval for data retrieval. |
||
interval | Integer |
Specify the time interval for data retrieval (Unit:
Second).
|
||
auto_confirm | Boolean |
Decide whether to enable device to reply the confirmed packet
starting with “FE” even receiving downlink commands.
Note: This setting ONLY takes effect
with hardware version 3.x and 4.x.
Valid value :
|
||
class_a_response_time | Long |
Specify the interval to receive downlink commands when device class type is Class A (Unit: second).
|
||
filter_setting | Struct |
Pulse filter settings when GPIO working mode is Water Volume
Counter.
Note: This setting ONLY
takes effect with hardware version 4.x. |
||
mode | Enum |
Decide the unit of pulse filter.
Valid value :
|
||
time | Integer |
Specify the time for pulse filter (Unit: second).
|
||
jitter_time | Integer |
Specify the jitter delay time when GPIO working mode is
Digital Input. (Unit: second).
Note: This setting ONLY takes effect
with hardware version 4.x.
|
||
solenoid_setting | Struct |
Solenoid control settings. |
||
count | Integer |
Specify the times to send the pulse to control the valve.
|
||
time | Integer |
Specify the pulse time to send to the valve ( Unit : millisecond).
|
||
power_time | Integer |
Specify the power time before sending the pulse to control the valve ( Unit : ms).
|
||
d2d_enable | Boolean |
Decide whether to enable Device-to-Device (D2D) communication for this device. Note: This setting ONLY takes effect with
hardware version 4.x and it is suggested to use when
selecting work mode as Class C.
Valid value :
|
||
d2d_key | String |
Note: This setting ONLY takes effect
when d2d_enable is set to
Specify the key for D2D
communication.true .
|
||
rule_setting | Array |
Note: This setting ONLY takes effect
with hardware version 4.x.
Rule Engine Settings. |
||
channel | Integer |
Specify the Rule ID.
|
||
enable | Boolean |
Decide whether to enable to execute this rule.
Valid value :
|
||
condition_mode | Enum |
Specify the condition of this rule.
Valid value :
|
||
time_condition | Struct |
Note: This setting ONLY takes effect
when condition_mode is set to
Set the time range to trigger
the actions.1 . |
||
start_timestamp | Date |
Specify the Unix timestamp of start time. |
||
end_timestamp | Date | Specify the Unix timestamp of end time. | ||
repeat_enable | Boolean |
Decide whether to repeat the rule.
Valid value :
|
||
repeat_mode | Enum |
Specify the repeat period of this rule.
Valid value :
|
||
repeat_time | Integer |
Set the repeat period when repeat_mode is set to
|
||
repeat_monday | Boolean |
Set the repeat period as every Monday when repeat_mode
is set to
Valid value :
|
||
repeat_tuesday | Boolean |
Set the repeat period as every Tuesday when
repeat_mode is set to
Valid value :
|
||
repeat_wednesday | Boolean |
Set the repeat period as every Wednesday when
repeat_mode is set to
Valid value :
|
||
repeat_thursday | Boolean |
Set the repeat period as every Thursday when
repeat_mode is set to
Valid value :
|
||
repeat_friday | Boolean |
Set the repeat period as every Friday when repeat_mode
is set to
Valid value :
|
||
repeat_saturday | Boolean |
Set the repeat period as every Saturday when
repeat_mode is set to
Valid value :
|
||
repeat_sunday | Boolean |
Set the repeat period as every Sunday when repeat_mode
is set to
Valid value :
|
||
d2d_condition | Struct |
Note: This setting ONLY takes effect
when condition_mode is set to
Milesight D2D condition
settings.2 . |
||
cmd | String |
Specify the D2D control command from Milesight D2D Controller device.
|
||
pulse_per_time_condition | Struct |
Note: This setting ONLY takes effect
when condition_mode is set to
Set the condition of reaching
threshold pulses within a specific time range.3 . |
||
target | Enum |
Specify the target pulse counter interface.
Valid value :
|
||
time | Integer |
Specify the time period to reach the threshold ( Unit : minute) .
|
||
threshold | Long |
Specify the threshold (Pulses) value to meet this condition.
|
||
pulse_per_count_condition | Struct |
Note: This setting ONLY takes effect
when condition_mode is set to
Every increase of water volume
condition settings.4 . |
||
target | Enum |
Specify the target pulse counter interface.
Valid value :
|
||
threshold | Long |
Specify the threshold (Pulses) value to meet this condition.
|
||
action_mode | Enum |
Specify the action of this rule.
Valid value :
|
||
urgent_task_action | Struct |
Note: This setting ONLY takes effect
when condition_mode is set to
2 .Valve control settings. |
||
target | Enum |
Specify the target valve to control.
Valid value :
|
||
state | Boolean |
Specify the valve control status.
Valid value :
|
||
time_enable | Boolean |
Decide whether to enable time control.
Valid value :
|
||
time_continue | Long |
Specify the continue time to control the valve ( Unit : second) .
|
||
count_enable | Boolean |
Decide whether to enable water volume flow control.
Valid value :
|
||
count_continue | Long |
Specify the water volume (pulses) to continue the control of the valve.
|
||
normal_task_action | Struct | Note: This setting ONLY takes effect
when condition_mode is set to
1 . |
||
target | Enum |
Specify the target valve to control.
Valid value :
|
||
state | Boolean |
Specify the valve control status.
Valid value :
|
||
time_enable | Boolean |
Decide whether to enable time control.
Valid value :
|
||
time_continue | Long |
Specify the continue time to control the valve ( Unit : second) .
|
||
count_enable | Boolean |
Decide whether to enable water volume flow control.
Valid value :
|
||
count_continue | Long |
Specify the water volume (pulses) to continue the control of the valve.
|
||
message_alarm_action | Struct |
Set alarm message action settings. Note: This setting ONLY takes effect
when condition_mode is set to
3
or 4 . |
||
type | Enum |
Specify the report type of alarm.
Valid value :
|
||
message | String |
Note: This setting ONLY takes effect
when type is set to
Customize the message content.3 .
|
||
local_rule_setting | Array | Note: This setting ONLY takes effect
with hardware version 2.x or 3.x. Local rule
settings. |
||
channel | Integer |
Specify the rule ID.
|
||
enable | Boolean |
Decide whether to enable this rule.
Valid value :
|
||
solenoid1 | Boolean |
Decide whether to control the Valve1 in this rule.
Valid value :
|
||
solenoid2 | Boolean | Decide whether to control the Valve2 in this rule.
Valid value :
|
||
state | Enum |
Specify the valve control status.
Valid value :
|
||
monday | Boolean |
Set the repeat period as every Monday.
Valid value :
|
||
tuesday | Boolean |
Set the repeat period as every Tuesday.
Valid value :
|
||
wednesday | Boolean |
Set the repeat period as every Wednesday.
Valid value :
|
||
thursday | Boolean |
Set the repeat period as every Thursday.
Valid value :
|
||
friday | Boolean |
Set the repeat period as every Friday.
Valid value :
|
||
saturday | Boolean |
Set the repeat period as every Saturday.
Valid value :
|
||
sunday | Boolean |
Set the repeat period as every Sunday.
Valid value :
|
||
start_hour | Integer |
Specify the Start Hour of this rule.
|
||
start_min | Integer |
Specify the Start Minute of this rule.
|
||
end_hour | Integer |
Specify the End Hour of this rule.
|
||
end_min | Integer |
Specify the End Minute of this rule.
|
||
continue_pulse | Integer |
Specify the Water Volume (Pulse) to control the valve status.
|