Set Up Electricity Safety Rule

Last Updated on : 2023-06-15 05:59:03

Set up electricity safety rules for a specified electrical device, including overcurrent, overvoltage, undervoltage, and overload rules.

API address

POST: /v1.0/iot-03/power-devices/{device_id}/safety-rules

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Description of body

Parameter name Type IN Required Description
rules List true The list of safety rules.

Description of rules

Parameter name Type IN Required Description
rule_type String true The type of safety rules.
  • ov_cr: overcurrent rule, ranging from 10 to 100A. Unit: A.
  • ov_vol: overvoltage rule, ranging from 100 to 270V. Unit: V.
  • undervoltage: undervoltage rule, ranging from 90 to 250V. Unit: V.
  • overload: overload rule, ranging from 1 to 25 kW. Unit: kW.
rule_threshold Integer true The threshold of safety rules.
switch_off Boolean true
  • true: Power off when the threshold is reached.
  • false: Do not power off when the threshold is reached.

Return parameter

Parameter name Type Description
result Boolean
  • true: Set up successfully.
  • false: Failed to set it up.

Request example

POST: /v1.0/iot-03/power-devices/6c814919a3f54fb4eb****/safety-rules
{ "rules": [ { "rule_type": "ov_cr", "switch_off": true, "rule_threshold": 65 }, { "rule_type": "ov_vol", "switch_off": true, "rule_threshold": 255 } ] }

Return example

{ "result": true, "t": 1637835034024, "success": true }

Error code

For more information, see error code.