/Azure-IoT

Send Sensor data to Azure IoT using NodeMCU ESP8266 & DHT11

Primary LanguageC++

Azure IoT Experiment with DHT11 & NodeMCU ESP8226

Objective of this project is to send sensor data to Azure IoT Hub.

You can watch my video on YouTube : https://www.youtube.com/watch?v=A0xrhWByCtc

Architecture Arch

Below are the details -

Hardware

  1. NodeMCU 8266

2. DHT11 Temperature & Humidity sensor


3. Jumper Wires
4. Breadboard
5. USB Cable

Circuit:
Circuit Diagram

Prerequisite Software
• Arduino IDE
• Board Manager congigured with esp8266
• DHT sensor library(by Adafruit 1.4.1) installation

Azure IoT Hub Configuration

  1. Create IoT Hub with F1 Free Pricing
  2. Add Device from IoT Devices section

Azure Cloud Shell SAS Generation

  • az iot hub generate-sas-token --device-id {YourDeviceID} --hub-name {YourIoTHubName}
  • Example: az iot hub generate-sas-token --device-id esp8266 --hub-name myioteventhub

Fingerprint Generation Youtube Video Link: https://www.youtube.com/watch?v=FbOlSMrM-BE

Example:
openssl s_client -servername myioteventhub.azure-devices.net -connect myioteventhub.azure-devices.net:443 | openssl x509 -fingerprint -noout

Fingerprint Format: 9S:89:07:5D:55:5C:F7:56:79:0A:03:BD:DE:F4:54:F2:C9:E3:FF:9C

IOT Hub : Send Device Event Https Post API

Microsoft Reference Used: