Add Energy-Consuming Devices

Last Updated on : 2023-06-15 05:53:20

Add energy-consuming devices to a specified space ID. Up to 20 devices can be added each time.

API address

POST: /v1.0/iot-03/energy/{energy_type}/space/{space_id}/devices

Request parameter

Parameter name Type IN Required Description
energy_type String uri true The energy type. Set the value to electricity.
space_id String uri true The ID of a specified space.

Return parameter

Parameter name Type Description
result Boolean The result of adding.

Request example

POST: /v1.0/iot-03/energy/electricity/space/111******/devices
{ "devices": [ "xxx" ] }

Return example

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

Error code

For more information, see error code.