Skip to content

alexandru-gaidei/esp8266-arest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266 aREST DHT11/Led/Relay

Overview

A simple example that implements a REST API for ESP8266 WiFi chip for handling DHT11 sensor and LED/Relay.
If you want to know more about aREST, go over to http://arest.io/.

Setup

  1. Rename env.h.example to env.h
  2. Upload

Endpoints

http://wifi-ip

{ 
   "variables":{ 
      "temperature":25.00,
      "humidity":33.00,
      "heatindex":24.42,
      "relay":0
   },
   "id":"1",
   "name":"Hall",
   "hardware":"esp8266",
   "connected":true
}

http://wifi-ip/temperature

{ 
   "temperature":25.00,
   "id":"1",
   "name":"Hall",
   "hardware":"esp8266",
   "connected":true
}

http://wifi-ip/relay-switch

{ 
   "return_value":0|1,
   "id":"1",
   "name":"Hall",
   "hardware":"esp8266",
   "connected":true
}

http://wifi-ip/esp?params=reset

Reset the module, returns http error due to restart hardware.

Releases

No releases published

Packages

No packages published

Languages