An open API service indexing awesome lists of open source software.

https://github.com/mathoudebine/nodemcu-dht22-webserver-mqtt-thingsboard

A NodeMCU Lua program to serve current temperature/humidity as web page and send it to ThingsBoard using MQTT
https://github.com/mathoudebine/nodemcu-dht22-webserver-mqtt-thingsboard

Last synced: 2 months ago
JSON representation

A NodeMCU Lua program to serve current temperature/humidity as web page and send it to ThingsBoard using MQTT

Awesome Lists containing this project

README

        

# NodeMCU temperature sensor with MQTT/WebServer output
Lua program for NodeMCU open-source IoT platform.

The code reads temperature and humidity from a DHT11/DHT22 sensor and serves it as HTML data to every browser consulting its IP.

The data is also uploaded to ThingsBoard MQTT broker to be displayed on your web dashboard.
![Web Dashboard](res/thingsboard_dashboard.png)

## Pre-requisites
* A NodeMCU 2nd generation / v1.0 / V2 board (although it may work on any other board with ESP8266 ESP-12E module)
* NodeMCU latest firmware (>= 2.2.1-master_20190405 / SDK 2.2.1(6ab97e9)) with included modules : **dht,http,mqtt,wifi**
* DHT11 / DHT22 / AM2302 sensor
* A Thingsboard server / live demo account with an existing device

## HowTo
The .ini files have to be edited with your Wi-Fi access point and Thingsboard account configurations

The DHT/AM data wire shall be plugged to D4 pin (or edit source code to use another pin)
![Web Dashboard](res/Fritzing_sketch_bb.png)