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

Usage

  1. Have an overview of the configurable properties and their default values of WS201.
  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 WS201 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.
{
    "properties": {
        "reporting_interval": 64800,    // The interval for data reporting (second).
        "sleep_setting":{   // Device hibernate settings.
            "enable": true,
            "start_time": 1320,   // Hibernate start time is 22:00.
            "end_time": 540,      // Hibernate start time is 9:00.
            "monday": true
        },
        "depth_setting": 500,    // The distance from bottom of container to sensor(mm).
        "collecting_interval": 1800,    // The interval for data collecting (second).
        "alarm1": {    // Threshold alarm 1 settings.
            "enable": true,
            "value": 30,
            "disable": false
        },
        "time_zone": 0    // Set UTC / Western European Time as the device's time zone.
    }
}

Description

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

Parameter Type Description
reporting_interval Integer

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

  • Default value: 64800
  • Valid value: 3600 - 64800
sleep_setting Struct Device hibernate settings.
enable Boolean

Decide whether to enable hibernate settings.

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

Specify the start time of hibernate (Unit: minute).

  • Default value: 0
  • Valid value: 0 - 1440
end_time Integer

Specify the stop time of hibernate (Unit: minute).

  • Default value: 0
  • Valid value: 0 - 1440
monday Boolean

Decide whether to hibernate every Monday.

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

Decide whether to hibernate every Tuesday.

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

Decide whether to hibernate every Wednesday.

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

Decide whether to hibernate every Thursday.

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

Decide whether to hibernate every Friday.

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

Decide whether to hibernate every Saturday.

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

Decide whether to hibernate every Sunday.

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

Specify the distance from the bottom of container to sensor (Unit: mm).

  • Default value: 0
  • Valid value: 10 - 550
collecting_interval Integer

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

  • Default value: 1800
  • Valid value: 60 - 64800
alarm1 Struct

Alarm threshold 1 settings.

enable Boolean

Decide whether to enable the first threshold alarm for this device.

Valid value:
  • false: Disable.
  • true: Enable (Default value).
    Note: The settings of the following sub-parameters ONLY take effect when this value is set to true.
value Integer

Specify the number of tissue remaining percentage (Unit: %).

  • Default value: 30
  • Valid value: 0 - 100
disable Boolean

Decide whether to enable alarm dismiss report.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
alarm2 Struct

Alarm threshold 2 settings.

enable Boolean

Decide whether to enable the first threshold alarm for this device.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
    Note: The settings of the following sub-parameters ONLY take effect when this value is set to true.
value Integer

Specify the number of tissue remaining percentage (Unit: %).

  • Default value: 0
  • Valid value: 0 - 100
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.