Skip to content

fabian57fabian/esp8266-post-relay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NodeMCU_REST_Relay

Sketch Compile

A simple http REST webserver in a NodeMCU (ESP8266) microcontroller with a Relay.

Project schematics

Installation and Flash

Clone the repo. Then:

  • Install Arduino IDE
  • From Arduino IDE:
  • Install CH34x or CP210X drivers depending on your NodeMCU (bigger is 0.9 needs CH34x, smaller is 1.0 and needs CP210x)
  • Copy example_secrets.h to secrets.h and set your wifi credentials
  • If needed change the static IP address
  • Connect, select the COM port and flash

API

A complete API with example can be found here.

The API are:

  • simple webserver on '/'
  • POST on '/control' with json like {"relay": false} or {"relay": false} to change realy state
  • GET on '/status' that answers with {"status": "on"} or {"status": "off"}

About

A NodeMCU with a relay that can be activated thru post

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published