This program allows you to control switches to control your ESP 8266 using rest api.
I have used this program to control my home appliances using relay module.
ESP 8266 is a fully Ardunio compatible hardware.
-
Load Additional Board: http://arduino.esp8266.com/stable/package_esp8266com_index.json
-
Install esp8266 from board manager.
- Rest Api to control GPIO PIN
- Auth
- Get GPIO Status
- ESP 8266
- 8 Channel Relay module
- 20 female-female jumper wires.
- ArduinoJson
This webserver exposes two endpoints.
-
Get Status
Method:
GET
Endpoint:
/
Exampe Response:
{
"1": true,
"2": false,
"3": true,
"4": true,
"5": true,
"6": true,
"7": false,
"8": true
}
-
Set Status
Method:
POST
Endpoint:
/switch
Example:
{
"1": true,
"2": false,
"3": true,
"4": true,
"5": true,
"6": true,
"7": false,
"8": true
}
Feel free to raise issue for bugs.
Ping me at debendraoli@gmail.com for support.