mmichon / lil-sensor

ESP-8266-based weather station with OLED display with MQTT publishing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YAWEWSPTM

Yet Another Web-Enabled Weather Sensor Publishing To MQTT

This is ESP-8266 code that reads temp and humidity readings every minute from a DHT11, updates a small SSD-1306-based display, and publishes readings to MQTT topics. The hardware should cost <$15 and wiring it up should take <15 minutes.

Video

Demo Video

temp humid

Hardware

All this should cost <$15

Software Dependencies

  • platformio
  • The following libs:
Adafruit DHT Unified_ID18
DHT sensor library_ID19
Adafruit Unified Sensor_ID31
Adafruit GFX Library_ID13
Adafruit SSD1306_135
PubSubClient_ID89

These libraries are loaded automatically by platformio upon lib_deps dependencies. No need for manual install. If you use atom.io yoou should open this project with the platformio IDE to get these libraries into the list of installed libraries.

Provisioning an MQTT topic and connecting to Wifi

  1. Create an account on devicehub.net
  2. Create a project, device, and 2 analog 'sensors' (temp and humidity)
  3. Jot down your API key, project ID, device UUID, and sensor names
  4. Change config.h to match your Wifi and MQTT settings

About

ESP-8266-based weather station with OLED display with MQTT publishing

License:Apache License 2.0


Languages

Language:C++ 99.2%Language:C 0.8%