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

Usage

  1. Have an overview of the configurable properties and their default values of WS52x.
  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 WS52x 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": 1200,        // The interval for data reporting (second).
        "set_socket":{                     // Socket on/off settings.
            "status": 0
        },
        "power_consumption_enable": true,  // Enable to record power consumption. 
        "led_indicator_mode": true,           // Enable LED indicator. 
        "button_lock_config":{             // Button lock settings.
            "enable": false
        },
        "overcurrent_alarm":{             // Overcurrent alarm settings.
            "enable": false,
            "current": 10
        },
        "overcurrent_protect":{             // Overcurrent protection settings.
            "enable": false,
            "current": 10
        }
    }
}

Description

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

Parameter Type Description
reporting_interval Integer

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

  • Default value: 1200
  • Valid value: 60 - 64800
set_socket Struct Socket on/off settings.
status Enum

Specify the status of socket.

Valid value:
  • 0: Socket off (Default value).
  • 1: Socket on.
power_consumption_enable Boolean

Decide whether to record power consumption.

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

Decide whether to enable button LED indicator.

Valid value:
  • false: Disable.
  • true: Enable (Default value).
button_lock_config Struct Button lock settings.
enable Boolean

Decide whether to lock the button.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
overcurrent_alarm Struct Overcurrent alarm settings.
enable Boolean

Decide whether to send alarms when current reaches the threshold.

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

Specify the overcurrent threshold value (Unit: Amp).

  • Default value: max valid value
  • Valid value: 1 - 16
Note: the max value depends on the model of WS52x among 10 to 16A.
overcurrent_protect Struct Overcurrent protection settings.
enable Boolean

Decide whether to stop power supply when current reaches the threshold.

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

Specify the overcurrent threshold value (Unit: Amp).

  • Default value: max valid value
  • Valid value: 1 - 16
Note: the max value depends on the model of WS52x among 10 to 16A.