Set Valve Openness

Last Updated on : 2023-06-15 05:30:51

Send a command of setting the valve openness to a smart water meter. On receiving the command, the smart water meter will set the valve openness.

API address

POST: /v1.0/water-meter/{device_id}/actions/valve-open-degree

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.

Description of body

Parameter nameTypeINRequiredDescription
open_percentInteger falseThe valve openness. Unit: %.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

POST: /v1.0/water-meter/6ce****/actions/valve-open-degree
{
  "openPercent": 10
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.