TS201v2 – 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 TS201V2 TSL model, their descriptions, and how to use them.

Usage

  1. Have an overview of the configurable properties and their default values of TS201V2 .
  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 TS201V2 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": "v1.0",
    "type": "TSL",
    "properties": {
        "reporting_interval": { // Reporting Interval Type: struct
            "time": 10 // Reporting Interval Type: int Unit: min
        },
        "collection_interval": 600, // Collecting Interval Type: int Unit: s
        "temperature_alarm_rule": { // Temperature Threshold Alarm Type: struct
            "enable": false, // Temperature Threshold Alarm Type: bool
            "condition": "1", // Threshold Condition Type: enum
            "threshold_max": 0, // Value B Type: float Unit: ℃
            "threshold_min": 0 // Value A Type: float Unit: ℃
        },
        "temperature_mutation_alarm_rule": { // Temperature Change Alarm Type: struct
            "enable": false, // Temperature Shift Threshold Type: bool
            "threshold_max": 0.1 // Temperature change greater than Type: float Unit: ℃
        },
        "humidity_alarm_rule": { // Humidity Threshold Alarm Type: struct
            "enable": false, // Humidity Threshold Alarm Type: bool
            "condition": "1", // Threshold Condition Type: enum
            "threshold_max": 0, // Value B Type: float Unit: %RH
            "threshold_min": 0 // Value A Type: float Unit: %RH
        },
        "humidity_mutation_alarm_rule": { // Humidity Shift Threshold Type: struct
            "enable": false, // Humidity Change Alarm Type: bool
            "threshold_max": 0.5 // Humidity change greater than Type: float Unit: %RH
        },
        "alarm_reporting_times": 1, // Alarm Reporting Times Type: int
        "alarm_deactivation_enable": false, // Alarm Dismiss Report Type: bool
        "d2d_enable": false, // D2D Enable Type: bool
        "d2d_trigger_by_temperature": { // Temperature Threshold Triggered Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0000" // Control Command Type: string
        },
        "d2d_deactivation_by_temperature": { // Temperature Alarm Dismiss Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0001" // Control Command Type: string
        },
        "d2d_trigger_by_temperature_mutation": { // Temperature Shift Threshold Triggered Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0002" // Control Command Type: string
        },
        "d2d_trigger_by_humidity": { // Humidity Threshold Triggered Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0003" // Control Command Type: string
        },
        "d2d_deactivation_by_humidity": { // Humidity Alarm Dismiss Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0004" // Control Command Type: string
        },
        "d2d_trigger_by_humidity_mutation": { // Humidity Shift Threshold Triggered Type: struct
            "enable": false, // Trigger Enable Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "control_command": "0005" // Control Command Type: string
        },
        "d2d_send": { // Data Send Settings Type: struct
            "enalbe": false, // Send Enalbe Type: bool
            "lora_uplink_enable": false, // LoRa Uplink Type: bool
            "temperature_enable": false, // Temperature Type: bool
            "humidity_enable": false // Humidity Type: bool
        },
        "temperature_calibration_settings": { // Temperature Calibration Settings Type: struct
            "enable": false, // Temperature Type: bool
            "value": 0 // Calibration Value Type: float Unit: ℃
        },
        "humidity_calibration_settings": { // Humidity Calibration Settings Type: struct
            "enable": false, // Humidity Type: bool
            "value": 0 // Calibration Value Type: float Unit: %RH
        },
        "data_storage_enable": false, // Data Storage Type: bool
        "retrival_interval": 60, // Retrival Interval Type: int Unit: s
        "retransmission_interval": { // Retransmission Interval Settings Type: struct
            "enable": false, // Data Retransmission Type: bool
            "interval": 600 // Retransmission Interval Type: int Unit: s
        },
        "button_lock": { // Button
Lock Type: struct
            "power_off_enable": true, // Turn Off Type: bool
            "collect_report_enable": false // Collect and Report Type: bool
        },
        "change_lora_ack_retry_times": { // Change the number of ACK retransmissions for LORA Type: struct
            "times": 1 // Retry Cnt Type: int
        }
    }
}

Description

The following table provides the description and valid values for the configurable properties of TS201V2.

Parameter Type Description
reporting_interval Struct

The interval for data reporting.

time Integer

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

  • Default value: 10
  • Valid value: 1 - 1440
collection_interval Integer

Specify the interval for collecting data (Unit: second).

  • Default value: 600
  • Valid value: 60 - 64800
temperature_alarm_rule Struct Temperature Threshold Alarm settings.
enable Boolean Decide whether to enable temperature threshold alarm.
Valid value:
  • false: disable (Default value).
  • true: enable.
condition Enum

Specify the conditions for triggering the temperature alarm.

Valid value:
  • 1: The detected temperature < Minimum threshold (Default value).
  • 2: The detected temperature > Maximum threshold.
  • 3: Minimum threshold < The detected temperature < Maximum threshold.
  • 4: The detected temperature < Minimum threshold or the detected temperature > Maximum threshold.
threshold_max Float

Specify the maximum threshold for temperature alarm (Unit: °C).

  • Default value: 0
  • Valid value: -3000 - 3000
threshold_min Float

Specify the minimum threshold for temperature alarm (Unit: °C).

  • Default value: 0
  • Valid value: -3000 - 3000
temperature_mutation_alarm_rule Struct

Temperature Change Alarm settings.

enable Boolean

Decide whether to enable temperature change alarm.

Valid value:
  • false: disable (Default value).
  • true: enable.
threshold_max Float

Specify the change value for temperature alarm (Unit: °C).

  • Default value: 0.1
  • Valid value: 0.1 - 100
humidity_alarm_rule Struct
Humidity Threshold Alarm settings.
Note: This only works with TH version.
enable Boolean

Decide whether to enable humidity threshold alarm.

Valid value:
  • false: disable (Default value).
  • true: enable.
condition Enum

Specify the conditions for triggering the humidity alarm.

Valid value:
  • 1: The detected humidity < Minimum threshold (Default value).
  • 2: The detected humidity > Maximum threshold.
  • 3: Minimum threshold < The detected humidity < Maximum threshold.
  • 4: The detected humidity < Minimum threshold or the detected humidity > Maximum threshold.
threshold_max Float

Specify the maximum threshold for humidity alarm ( Unit : %RH).

  • Default value: 0
  • Valid value: 0 - 100
threshold_min Float

Specify the minimum threshold for humidity alarm ( Unit : %RH).

  • Default value: 0
  • Valid value: 0 - 100
humidity_mutation_alarm_rule Struct
Humidity Change Alarm settings.
Note: This only works with TH version.
enable Boolean

Decide whether to enable humidity change alarm.

Valid value:
  • false: disable (Default value).
  • true: enable.
threshold_max Float

Specify the change value for humidity ( Unit : %RH).

  • Default value: 0.5
  • Valid value: 0.5 - 100
alarm_reporting_times Integer

Specify the number of alarms.

  • Default value: 1
  • Valid value: 1 - 1000
alarm_deactivation_enable Boolean

Decide whether to enable alarm dismiss report.

Valid value:
  • false: disable (Default value).
  • true: enable.
d2d_enable Boolean Decide whether to enable Device-to-Device (D2D) controller for this device.
Valid value:
  • false: disable (Default value).
  • true: enable.
d2d_trigger_by_temperature Struct

Settings of D2D communication triggered by temperature reaching the threshold.

enable Boolean

Decide whether to trigger D2D communication when the detected temperature reached the threshold.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by temperature reaching the threshold.

  • Default value: 0000
  • Restrictions: 4 characters long.
d2d_deactivation_by_temperature Struct

Settings of D2D communication triggered by temperature outside the threshold.

enable Boolean

Decide whether to trigger D2D communication when the detected temperature is outside the threshold.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by temperature outside the threshold.

  • Default value: 0001
  • Restrictions: 4 characters long.
d2d_trigger_by_temperature_mutation Struct

Settings of D2D communication triggered by temperature change alarms.

enable Boolean

Decide whether to trigger D2D communication when the detected temperature changes the preset value.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by temperature change alarm.

  • Default value: 0002
  • Restrictions: 4 characters long.
d2d_trigger_by_humidity Struct
Settings of D2D communication triggered by humidity reaching the threshold.
Note: This only works with TH version.
enable Boolean

Decide whether to trigger D2D communication when the detected humidity reached the threshold.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by humidity reaching the threshold.

  • Default value: 0003
  • Restrictions: 4 characters long.
d2d_deactivation_by_humidity Struct
Settings of D2D communication triggered by humidity outside the threshold.
Note: This only works with TH version.
enable Boolean

Decide whether to trigger D2D communication when the detected humidity is outside the threshold.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by humidity outside the threshold.

  • Default value: 0004
  • Restrictions: 4 characters long.
d2d_trigger_by_humidity_mutation Struct Settings of D2D communication triggered by humidity change alarms.
Note: This only works with TH version.
enable Boolean

Decide whether to trigger D2D communication when the detected humidity changes the preset value.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D control command.

Valid value:
  • false: disable (Default value).
  • true: enable.
control_command String

Specify the control command for D2D communication triggered by humidity change alarm.

  • Default value: 0005
  • Restrictions: 4 characters long.
d2d_send Struct

D2D Sensor Data Transmission Settings.

enalbe Boolean

Decide whether to enable D2D Sensor Data Transmission.

Valid value:
  • false: disable (Default value).
  • true: enable.
lora_uplink_enable Boolean

Decide whether to enable LoRa Uplink, which will send an uplink LoRa packet after sending the D2D data.

Valid value:
  • false: disable (Default value).
  • true: enable.
temperature_enable Boolean

Decide whether to send temperature values.

Valid value:
  • false: disable (Default value).
  • true: enable.
humidity_enable Boolean
Decide whether to send humidity values.
Note: This only works with TH version.
Valid value:
  • false: disable (Default value).
  • true: enable.
temperature_calibration_settings Struct

Temperature calibration settings.

enable Boolean

Decide whether to enable temperature calibration.

Valid value:
  • false: disable (Default value).
  • true: enable.
value Float

Specify the calibration value (Unit: °C).

  • Default value: 0
  • Valid value: -200 - 1000
humidity_calibration_settings Struct
Humidity Calibration Settings.
Note: This only works with TH version.
enable Boolean

Decide whether to enable humidity calibration.

Valid value:
  • false: disable (Default value).
  • true: enable.
value Float

Specify the calibration value ( Unit : %RH).

  • Default value: 0
  • Valid value: -100 - 100
data_storage_enable Boolean

Decide whether to allow the device to store data.

Valid value:
  • false: disable (Default value).
  • true: enable.
retrival_interval Integer
Specify the time interval for data retrieval (Unit: Second).
  • Default value: 60
  • Valid value: 30 - 1200
retransmission_interval Struct

Data Retransmission Interval Settings

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.

Valid value:
  • false: disable (Default value).
  • true: enable.
interval Integer

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

  • Default value: 600
  • Valid value: 30 - 1200
button_lock Struct

Button Lock settings.

power_off_enable Boolean

Decide whether to enable the lock of Turn Off.

Valid value:
  • false: disable.
  • true: enable (Default value).
collect_report_enable Boolean

Decide whether to enable the lock of Collect and Report.

Valid value:
  • false: disable (Default value).
  • true: enable.
change_lora_ack_retry_times Struct

ACK resend times settings.

times Integer

Specify the resend times of the ACK packet.

  • Default value: 1
  • Valid value: 0 - 10