The mqtt-bme280-homie project is a small and easy to integrate temperature, air pressure and humidity monitoring solution with an extra SSD1306 OLED display. Sensor data is send via MQTT and displayed on the small screen. Local time is loaded via NTP. The project is built with a cost-effective ESP8266 WiFi chip (I used a NodeMCU from ebay, Wemos D1 mini will do as well).
The software is based on Homie to enable an easy integration with home automation systems like OpenHab.
- ESP8266 (Wemos D1 mini, Nodemcu)
- BME280 sensor breakout
- SSD1306 OLED display
- USB power supply and cable
- Enclosure
I got the BME280 breakout form Adafruit, others will do as well. The SSD1306 OLED displays I ordered at Aliexpress. This enclosure keeps everything together.
The following software libraries are used. If using PlatformIO all dependencies are resolved automatically.
- Homie V2 (dev) including dependencies
- Adafruit BME280 Driver
- Adafruit Unified Sensor
- SSD1306 driver for ESP8266 platform
- NTPClient to connect to a time server
- Optionally PlatformIO environment for building the code
The following config parameters are available via MQTT message (see Homie documentation how to use):
Parameter | Type | Usage |
---|---|---|
sensorInterval | long | temperature reading interval in seconds |
temperatureOffset | double | temperature offset (-/+) to correct the sensor reading, for example if used in enclosure box |
flipScreen | bool | filp the display screen vertically |