4.2.2.3 Output Value Setting

Set the output value or switchable IO direction. Name – GPIO name, refer to 4.2.2.1 GPIO List Getting. Type can have the values {value, direction}. 

GPIO name {out1, out2, relay1, relay2}, type=value:

  • Value can be {0, 1}

GPIO name {io1, io2}, type = direction:

  • Value can be {in, out}

Success can be false if GPIO is locked for setting via another application.

URL:

https://<IP>/api/v1/gpio?action=set&name=<string>&type=<string>&

value=<bit>

HTTP method:

GET

Request body:

N/A

Response code:

 

Response data:

{"data":{"success":<boolean>}}