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.
Demo Video
- ESP8266 microcontroller, like a Wemos D1 Mini
- DHT11 temp/humidity sensor
- SSD1036 OLED display, like a Wemos OLED Shield
- Wifi connection
- platformio
- The following libs:
pio lib install 135
pio lib install 188
pio lib install 18
pio lib install 89
- Create an account on devicehub.net
- Create a project, device, and 2 analog 'sensors' (
temp
andhumidity
) - Jot down your API key, project ID, device UUID, and sensor names
- Change
config.h
to match your Wifi and MQTT settings