002.NODEMCU + DHT11 + Cayenne


NODEMCU + DHT11 + Cayenne

NODEMCU Temperature(DHT11) Server + Cayenne
Using arduino sketch

NODEMCU + DHT11 + Cayenne


This sensor is DHT22 but same using pin for DHT11

IDE Setting

How to Esp3266 Board add

ESPAsyncTCP & WebServer library

Cayenne Library

How to Library Add

DHT11 Lib Add

Library manager search & install

Adafruit DHT sensor library
Adafruit Unified Sensor

Cayenne Web & App

steps

Modify Your Source

WiFi SSID, PASSWD
Cayenne Authentication info
full source


// WiFi network info.
const char ssid[] = "your wifi ssid";
const char wifiPassword[] = "your wifi passwd";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "cayenees mqtt username";
char password[] = "cayenees mqtt passwd";
char clientID[] = "cayenees mqtt client id";

Upload Source

Arduino sketch

board select > esp8266
source upload

Run

Connect NODEMCU

using browser and connecting ip address (192.168.0.x)

Caynees Dashboard

this is raspberry pi Dashboard but same.

Add Widget

if you want different widget, use to button “Add Device/Widget”

ref