MartinWeigel / AirQuality

ESP8266 webserver serving data of a bme680 sensor using a websocket

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AirQuality

Monitor your AirQuality with an ESP8266 and a BME680. The BME680 sensor measures temperature, humitidy, air pressure, and gas concentration. The ESP8266 serves this sensor data as a website and keeps the data up-to-date over a websocket. The sensor data is also sent inside a UDP packet to a configured server in a given time interval. The current time is fetched using the Network Time Protocol (NTP) and is shown in UTC.

Website UI of AirQuality

Requirements

Hardware

  • ESP8266
  • BME680

Software

Usage

  1. Connect the ESP8266 with the BME680 over I2C. You can set SDA and SCL pins in AirQuality.ino with the defines I2C_SDA and I2C_CLK.
  2. Set your WIFI credentials in wifi_credentials.h.
  3. Optional: Disable UDP_ENABLE if you do now want sensor data being sent over UDP (see AirQLogger below).
  4. Flash the firmware to the ESP8266 using make.sh.
  5. Enter the IP of your ESP8266 in your mobile or desktop browser.

AirQLogger

If UDP_ENABLE in AirQuality.ino is enabled, the sensor data is sent in a specified interval to a server. The data is serialized using MessagePack and sent as a UDP packet. The folder AirQLogger contains a Python 3 example implementing a server that logs this data to a file. This can be useful to record the BME8266 data over a longer time span for offline analysis.

Licenses

About

ESP8266 webserver serving data of a bme680 sensor using a websocket

License:ISC License


Languages

Language:C 57.8%Language:C++ 37.4%Language:HTML 2.5%Language:Python 1.8%Language:Shell 0.5%