项目作者: alexandru-gaidei

项目描述 :
ESP8266 aREST DHT11/Led/Relay
高级语言: C++
项目地址: git://github.com/alexandru-gaidei/esp8266-arest.git
创建时间: 2020-02-17T15:41:02Z
项目社区:https://github.com/alexandru-gaidei/esp8266-arest

开源协议:

下载


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

  1. {
  2. "variables":{
  3. "temperature":25.00,
  4. "humidity":33.00,
  5. "heatindex":24.42,
  6. "relay":0
  7. },
  8. "id":"1",
  9. "name":"Hall",
  10. "hardware":"esp8266",
  11. "connected":true
  12. }

http://wifi-ip/temperature

  1. {
  2. "temperature":25.00,
  3. "id":"1",
  4. "name":"Hall",
  5. "hardware":"esp8266",
  6. "connected":true
  7. }

http://wifi-ip/relay-switch

  1. {
  2. "return_value":0|1,
  3. "id":"1",
  4. "name":"Hall",
  5. "hardware":"esp8266",
  6. "connected":true
  7. }

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

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