Skip to content

Control switches remotely using http server on esp8286

Notifications You must be signed in to change notification settings

debendraoli/esp8266-rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266 REST API

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.

Installation

  1. Load Additional Board: http://arduino.esp8266.com/stable/package_esp8266com_index.json

  2. Install esp8266 from board manager.

Features

  1. Rest Api to control GPIO PIN
  2. Auth
  3. Get GPIO Status

Modules Used

  1. ESP 8266
  2. 8 Channel Relay module
  3. 20 female-female jumper wires.

Additional Libraries Used

  1. ArduinoJson

Endpoints

This webserver exposes two endpoints.

  1. Get Status

    Method: GET

    Endpoint: /

Exampe Response:

{
    "1": true,
    "2": false,
    "3": true,
    "4": true,
    "5": true,
    "6": true,
    "7": false,
    "8": true
}
  1. Set Status

    Method: POST

    Endpoint: /switch

Example:

{
    "1": true,
    "2": false,
    "3": true,
    "4": true,
    "5": true,
    "6": true,
    "7": false,
    "8": true
}

Support

Feel free to raise issue for bugs.

Ping me at debendraoli@gmail.com for support.

About

Control switches remotely using http server on esp8286

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published