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

  1. Have an overview of the configurable properties and their default values of UC51x .
  2. Copy the example code and remove the comments and parameters that do not require modification.
  3. Edit the desired properties according to the detailed properties description .
    Note: Make sure that the edited example code complies with the JSON format requirements.
  4. 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.

Note:
  • 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).

  • Default value : 21600
  • Valid value : 60 - 64800
reporting_interval Integer

Specify the interval for data reporting (Unit: Second).

  • Default value : 21600
  • Valid value : 60 - 64800
time_zone Enum

Specify the time zone for this device.

  • Default value: 0 (UTC / Western European Time)
  • Valid value: Refer to time_zone Value for valid values and description.
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 :
  • false : Disable (Default value).
  • true : Enable.
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 :
  • false : Disable (Default value).
  • true : Enable.
retransmission_interval Struct
Note: This setting ONLY takes effect when retransmission_enable is set to true.
The interval for data retransmission.
interval Integer
Specify the interval for data retransmission (Unit: Second).
  • Default value: 600
  • Valid value: 30 - 1200
retrival_interval Struct

The time interval for data retrieval.

interval Integer
Specify the time interval for data retrieval (Unit: Second).
  • Default value: 60
  • Valid value: 30 - 1200
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 :
  • false : Disable (Default value).
  • true : Enable.
class_a_response_time Long

Specify the interval to receive downlink commands when device class type is Class A (Unit: second).

  • Default value : 600
  • Valid value : 0 - 64800
    Note: the minimum valid value is 10 if device hardware version is 2.x or 3.x.
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 :
  • 1 : Microsecond (μs) (Default value).
  • 2 : Millisecond (ms).
time Integer

Specify the time for pulse filter (Unit: second).

  • Default value : 250
  • Valid value : 0 - 65535
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.
  • Default value : 40
  • Valid value : 0 - 255
solenoid_setting Struct

Solenoid control settings.

count Integer

Specify the times to send the pulse to control the valve.

  • Default value : 1
  • Valid value : 1 - 5
time Integer

Specify the pulse time to send to the valve ( Unit : millisecond).

  • Default value : 100
  • Valid value : 20 - 1000
power_time Integer

Specify the power time before sending the pulse to control the valve ( Unit : ms).

  • Default value : 1000
  • Valid value : 500 - 10000
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 :
  • false : Disable (Default value).
  • true : Enable.
d2d_key String
Note: This setting ONLY takes effect when d2d_enable is set to true.
Specify the key for D2D communication.
  • Default value : 5572404c696e6b4c
  • Restrictions : 16 characters long. The last 16 characters are set as all 0.
rule_setting Array
Note: This setting ONLY takes effect with hardware version 4.x.

Rule Engine Settings.

channel Integer

Specify the Rule ID.

  • Default value : 1
  • Valid value : 1 - 16
enable Boolean

Decide whether to enable to execute this rule.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
condition_mode Enum

Specify the condition of this rule.

Valid value :
  • 0 : N/A (Default value).
  • 1 : Time.
  • 2 : Milesight D2D.
  • 3 : Threshold (Pulses).
  • 4 : Every increase of water volume.
time_condition Struct
Note: This setting ONLY takes effect when condition_mode is set to 1.
Set the time range to trigger the actions.
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 :
  • false : Disable (Default value).
  • true : Enable.
repeat_mode Enum

Specify the repeat period of this rule.

Valid value :
  • 0 : Month.
  • 1 : Day (Default value).
  • 2 : Week.
repeat_time Integer

Set the repeat period when repeat_mode is set to 0 or 1.

  • Default value : 0
  • Valid value : 0 - 65535
repeat_monday Boolean

Set the repeat period as every Monday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_tuesday Boolean

Set the repeat period as every Tuesday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_wednesday Boolean

Set the repeat period as every Wednesday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_thursday Boolean

Set the repeat period as every Thursday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_friday Boolean

Set the repeat period as every Friday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_saturday Boolean

Set the repeat period as every Saturday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
repeat_sunday Boolean

Set the repeat period as every Sunday when repeat_mode is set to 2.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
d2d_condition Struct
Note: This setting ONLY takes effect when condition_mode is set to 2.
Milesight D2D condition settings.
cmd String

Specify the D2D control command from Milesight D2D Controller device.

  • Default value : 0000
  • Restrictions : 4 characters long.
pulse_per_time_condition Struct
Note: This setting ONLY takes effect when condition_mode is set to 3.
Set the condition of reaching threshold pulses within a specific time range.
target Enum

Specify the target pulse counter interface.

Valid value :
  • 1 : Water Volume Counter1 (Default value).
  • 2 : Water Volume Counter2.
time Integer

Specify the time period to reach the threshold ( Unit : minute) .

  • Default value : 0
  • Valid value : 0 - 65535
threshold Long

Specify the threshold (Pulses) value to meet this condition.

  • Default value : 0
  • Valid value : 0 - 4294967295
pulse_per_count_condition Struct
Note: This setting ONLY takes effect when condition_mode is set to 4.
Every increase of water volume condition settings.
target Enum

Specify the target pulse counter interface.

Valid value :
  • 1 : Water Volume Counter1 (Default value).
  • 2 : Water Volume Counter2.
threshold Long

Specify the threshold (Pulses) value to meet this condition.

  • Default value : 0
  • Valid value : 0 - 4294967295
action_mode Enum

Specify the action of this rule.

Valid value :
  • 0 : N/A (Default value).
  • 1 : D2D Action.
  • 2 : Regular Control Action.
  • 3 : Message Alarm.
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 :
  • 1 : Valve1 (Default value).
  • 2 : Valve2.
state Boolean

Specify the valve control status.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
time_enable Boolean

Decide whether to enable time control.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
time_continue Long

Specify the continue time to control the valve ( Unit : second) .

  • Default value : 0
  • Valid value : 0 - 4294967295
count_enable Boolean

Decide whether to enable water volume flow control.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
count_continue Long

Specify the water volume (pulses) to continue the control of the valve.

  • Default value : 0
  • Valid value : 0 - 4294967295
normal_task_action Struct
Note: This setting ONLY takes effect when condition_mode is set to 1.
Valve control settings.
target Enum

Specify the target valve to control.

Valid value :
  • 1 : Valve1 (Default value).
  • 2 : Valve2.
state Boolean

Specify the valve control status.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
time_enable Boolean

Decide whether to enable time control.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
time_continue Long

Specify the continue time to control the valve ( Unit : second) .

  • Default value : 0
  • Valid value : 0 - 4294967295
count_enable Boolean

Decide whether to enable water volume flow control.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
count_continue Long

Specify the water volume (pulses) to continue the control of the valve.

  • Default value : 0
  • Valid value : 0 - 4294967295
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 :
  • 1 : Report Interface1 Status (Default value).
  • 2 : Report Interface2 Status.
  • 3 : Report Custom Message.
message String
Note: This setting ONLY takes effect when type is set to 3.
Customize the message content.
  • Restrictions : Not more than 8 characters long.
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.

  • Default value : 1
  • Valid value : 1 - 16
enable Boolean

Decide whether to enable this rule.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
solenoid1 Boolean

Decide whether to control the Valve1 in this rule.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
solenoid2 Boolean Decide whether to control the Valve2 in this rule.
Valid value :
  • false : Disable (Default value).
  • true : Enable.
state Enum

Specify the valve control status.

Valid value :
  • 0 : Close (Default value).
  • 1 : Open.
monday Boolean

Set the repeat period as every Monday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
tuesday Boolean

Set the repeat period as every Tuesday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
wednesday Boolean

Set the repeat period as every Wednesday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
thursday Boolean

Set the repeat period as every Thursday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
friday Boolean

Set the repeat period as every Friday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
saturday Boolean

Set the repeat period as every Saturday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
sunday Boolean

Set the repeat period as every Sunday.

Valid value :
  • false : Disable (Default value).
  • true : Enable.
start_hour Integer

Specify the Start Hour of this rule.

  • Default value : 0
  • Valid value : 0 - 24
start_min Integer

Specify the Start Minute of this rule.

  • Default value : 0
  • Valid value : 0 - 59
end_hour Integer

Specify the End Hour of this rule.

  • Default value : 0
  • Valid value : 0 - 24
end_min Integer

Specify the End Minute of this rule.

  • Default value : 0
  • Valid value : 0 - 59
continue_pulse Integer

Specify the Water Volume (Pulse) to control the valve status.

  • Default value : 0
  • Valid value : 0 - 65535