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

Usage

  1. Have an overview of the configurable properties and their default values of VS34x.
  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 VS34x 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": {    // The interval for data reporting (minute).
            "time": 1440
        },
        "led_indicator": false,    // Disable LED indicator for occupancy status.
        "vacancy_reporting_interval": 300,    // The interval for reporting vacancy (second).
        "pir_collecting_setting":{    // Disable PIR collection settings.            
            "enable": false,
            "count": 3
        },
        "d2d_enable": false,    // Disable D2D communication.
        "d2d_key": "5572404c696e6b4c",    
        "d2d_trigger_by_occupied":{    // Disable D2D communication triggered by occupied status.
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        },
        "d2d_trigger_by_vacant":{    // Disable D2D communication triggered by vacant status.
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        }
    }
}

Description

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

Parameter Type Description
reporting_interval Struct

The interval for data reporting.

time Integer

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

  • Default value: 1440
  • Valid value: 1 - 1440
vacancy_reporting_interval Integer
Specify the interval for reporting vacancy (Unit: Second).
Note: When the sensor continuously detects no presence within this period, an idle packet will be reported to Milesight Development Platform.
VS341:
  • Default value: 60
  • Valid value: 15 - 600

VS340:

  • Default value: 300
  • Valid value: 15 - 1800
led_indicator Boolean

Decide whether to enable LED indicator for occupancy status.

Valid value:
  • false: Disable (Default value).
  • true: Enable. The LED indicator will blink according to the occupancy status.
    • Occupied: Flashing red.
    • Vacant: Flashing green.
pir_collect_setting Struct

PIR collection settings.

pir_collect_setting.enable Boolean

Specify whether to enable to change PIR collection settings.

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

Specify the threshold count value if PIR triggers during collecting interval.

  • Default value: 3
  • Valid value: 1 - 5
d2d_enable Boolean

Decide whether to enable Device-to-Device (D2D) communication for this device.

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: Only support to configure the first 16 characters, the last 16 characters are fixed as 0.
d2d_trigger_by_occupied Struct

Settings of D2D communication triggered by occupied status.

enable Boolean

Decide whether to trigger D2D communication when it's detected as occupied status.

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.
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 occupied status.

  • Default value: 0000
  • Restrictions: 4 characters long.
control_time_enable Boolean

Decide whether to enable control time to specify the duration for executing control actions within D2D communication.

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

Specify the control time (Unit: Minute).

Default value: 5

d2d_trigger_by_vacant Struct Settings of D2D communication triggered by vacant status.
enable Boolean

Decide whether to trigger D2D communication when it's detected as vacant status.

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.
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 vacant status.

  • Default value: 0000
  • Restrictions: 4 characters long.
control_time_enable Boolean

Decide whether to enable control time to specify the duration for executing control actions within D2D communication.

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

Specify the control time (Unit: Minute).

Default value: 5