WS203可配置属性

你可以通过 API 修改物模型的可配置属性来更新设备的设置。本文档提供 WS203 物模型的可配置参数以及如何使用它们。

使用方法

  1. 参考 WS203默认属性与可修改属性
  2. 复制示例代码,去掉不需要修改的注释和参数。
  3. 根据详细信息编辑所需的属性属性描述
    注: 确保编辑后的示例代码符合JSON格式要求。
  4. 使用编辑后的示例代码作为主体参数 更新设备属性

可配置属性

以下代码表示 WS203 物模型中的所有可配置属性及其默认值。
注:
  • 单击属性可查看其详细说明和有效值。
  • 根据需要配置示例代码,然后将其作为主体参数 更新设备属性 来快速完成配置。
{
    "properties": {
        "reporting_interval": {    // 数据上报周期(分钟)。
            "time": 30
        },
        "collecting_interval": 1,    // 数据采集周期(分钟)。
        "vacancy_reporting_interval": 300,    // 空闲时间上报(秒)
        "led_indicator": false,    // 禁用LED指示灯功能。
        "time_zone": 0,    // 设置时钟。
        "data_storage_enable": false,    // 禁用数据存储功能。
        "retransmission_enable": false,    // 禁用数据重传功能。
        "retransmission_interval":{    // 数据重传时间间隔(秒)。
            "interval":600
        },
        "retrival_interval":{   // 历史数据回传间隔(秒)。
            "interval": 60
        },
        "threshold_parameter":{    // 禁用温度阈值告警。
            "threshold_condition": 0,    
            "threshold_min": 0,
            "threshold_max": 0
        },
        "d2d_enable": false,    // 禁用D2D。
        "d2d_key": "5572404c696e6b4c",    
        "d2d_trigger_by_occupied_temperature":{    // 禁用温度告警与红外占用状态的D2D联动。
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        },
        "d2d_trigger_by_occupied":{    // 禁用红外占用状态的D2D联动。
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        },
        "d2d_trigger_by_vacant":{    // 禁用红外空闲状态的D2D联动。
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        },
        "d2d_trigger_by_temperature_threshold":{    // 禁用温度阈值告警的D2D联动。
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        },
        "d2d_trigger_by_temperature_threshold_release":{    // 禁用温度阈值告警解除的D2D联动。
            "enable": false,
            "lora_uplink_enable": false,
            "control_command": "0000",
            "control_time_enable": false,
            "control_time": 5
        }
    }
}

描述

下表提供了 WS203 可配置属性的描述和有效值。

参数 类型 描述
reporting interval Struct

数据上报周期。

time Integer

配置数据上报周期 (单位: 分钟)。

  • 默认值: 30
  • 有效值: 1 - 1440
collecting_interval Integer

配置数据采集周期 (单位: 分钟)。

  • 默认值: 1
  • 有效值: 1 - 1440
vacancy_reporting_interval Integer
Specify the interval for reporting vacancy (Unit: Second).
注: When the sensor continuously detects no presence within this period, an idle packet will be reported to Milesight Development Platform.
  • Default value: 300
  • Valid value: 60 - 3600
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.
time_zone Enum

Specify the time zone for this device.

  • Default value: 0 (UTC / Western European Time)
  • Valid value: Refer to 时区列表 for valid values and description.
data_storage_enable Boolean

Decide whether to allow the device to store data.

Valid value:
  • false: Disallow (Default value).
  • true: Allow.
retransmission_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.
retransmission_interval Struct
注: This setting ONLY takes effect when retransmission_enable is set to true.
The interval for data retransmission.
interval Integer
Specify the interval for data retransmission (Unit: Second).
  • Default value: 600
  • Valid value: 30 - 1200
retrival_interval Struct

The time interval for data retrieval.

interval Integer
Specify the time interval for data retrieval (Unit: Second).
  • Default value: 60
  • Valid value: 30 - 1200
threshold_parameter Struct

Temperature alarm settings.

threshold_condition Enum

Specify the conditions for triggering the temperature alarm.

Valid value:
  • 0: Do NOT send temperature alarm (Default value).
  • 1: The detected temperature < Minimum threshold.
  • 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_min Float

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

  • Default value: 0
  • Valid value: -30 - 60
    注: This value supports setting one decimal place.
threshold_max Float

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

  • Default value: 0
  • Valid value: -30 - 60
    注: This value supports setting one decimal place.
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
注: This setting ONLY takes effect when d2d_enable is set to true.
Specify the key for D2D communication.
  • Default value: 5572404c696e6b4c
  • Restrictions: 16 characters long.
d2d_trigger_by_occupied_temperature Struct

Settings of D2D communication triggered by temperature and occupancy status.

enable Boolean

Decide whether to enable D2D communication triggered by temperature and occupancy status.

Valid value:
  • false: Disable (Default value).
  • true: Enable.
    注: The settings of the following sub-parameters ONLY take effect when this value is set to true.
lora_uplink_enable Boolean
有效值:
  • false: Disable (Default value).
  • true: Enable.
control_command String

Specify the control command for D2D communication triggered by temperature and occupancy status.

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

是否启用 D2D 控制动作的持续时长。

有效值:
  • false: 禁用 (默认)。
  • true: 启用。
control_time Integer

控制时长(单位: 分钟)。

默认值: 5

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.
    注: The settings of the following sub-parameters ONLY take effect when this value is set to true.
lora_uplink_enable Boolean

是否在D2D控制命令发出后,同时向网关上报数据包。

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

是否启用 D2D 控制动作的持续时长。

有效值:
  • false: 禁用 (默认值)。
  • true: 启用。
control_time Integer

配置控制时间 (单位: 分钟)。

默认值: 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.
    注: The settings of the following sub-parameters ONLY take effect when this value is set to true.
lora_uplink_enable Boolean

是否在D2D控制命令发出后,同时向网关上报数据包。

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

是否启用 D2D 控制动作的持续时长。

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

Specify the control time (Unit: Minute).

Default value: 5

d2d_trigger_by_temperature_threshold 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.
    注: The settings of the following sub-parameters ONLY take effect when this value is set to true.
lora_uplink_enable Boolean

是否在D2D控制命令发出后,同时向网关上报数据包。

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.
control_time_enable Boolean

是否启用 D2D 控制动作的持续时长。

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

Specify the control time (Unit: Minute).

Default value: 5

d2d_trigger_by_temperature_threshold_release 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.
    注: The settings of the following sub-parameters ONLY take effect when this value is set to true.
lora_uplink_enable Boolean

是否在D2D控制命令发出后,同时向网关上报数据包。

有效值:
  • false: 禁用 (默认)。
  • true: 启用。
control_command String

指定温度超出阈值时触发的 D2D 控制命令。

  • 默认值: 0000
  • 限制Restrictions: 控制命令长度为4个字符。
control_time_enable Boolean

是否启用 D2D 控制动作的持续时长。

有效值:
  • false: 禁用 (默认)。
  • true: 启用。
control_time Integer

配置控制时间 (单位: 分钟)。

默认值: 5