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

Usage

  1. Have an overview of the configurable properties and their default values of WS50x.
  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 WS50x 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).
        "power_consumption_enable": true,  // Enable to record power consumption. 
        "led_indicator_mode": 1,           // Enable LED indicator. 
        "button_reset_config": false,      // Disble to press button to reset device. 
        "button_lock_config":{             // Button lock settings.
            "enable": false
        },
        "set_socket":{                     // Switch on/off settings.
            "ctrl_status1": 1
        }
    }
}

Description

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

Parameter Type Description
reporting_interval Integer

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

  • Default value: 1200
  • Valid value: 60 - 64800
power_consumption_enable Boolean
Decide whether to record power consumption.
Note: this setting ONLY takes effect with 3-wire version devices with PN "3W".
Valid value:
  • false: Disable.
  • true: Enable (Default value).
led_indicator_mode Enum

Decide whether to enable button LED indicators.

Valid value:
  • 0: Disable.
  • 1: Enable LED on when switch off (Default value).
  • 2: Enable LED on when switch on.
button_reset_config Boolean

Decide whether to enable device reset via button.

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

Decide whether to lock the buttons.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
set_socket Struct Button switch on/off settings.
ctrl_status1 Enum

Decide whether to switch on 1 for WS501, WS502 or WS503.

Valid value:
  • 0: Switch off (Default value).
  • 1: Switch on.
ctrl_status3 Enum

Decide whether to switch on 2 for WS502 or WS503.

Valid value:
  • 0: Switch off (Default value).
  • 1: Switch on.
ctrl_status3 Enum

Decide whether to switch on 3 for WS503.

Valid value:
  • 0: Switch off (Default value).
  • 1: Switch on.