Skip to content
This repository has been archived by the owner on Jun 14, 2021. It is now read-only.

bram2202/mqtt-CO2meter

Repository files navigation

C02 logger

Using the small LOLIN D1 mini, a Oled shield and a sensor breakout board, its possible to get a sense of CO2 in the air.
Sends both eCO2 ans TVOC.

For example to use with Hass.io [link]

The Oled screen is optional and can be disabled in the settings.

End result

front:

front

back:

back

Requirements

  • ESP8266 (Wemos/LOLIN D1 mini)
  • SGP30 eCO2 sensor
  • Basic soldering and wiring skills

Optional

  • OLED Shield (Wemos/LOLIN 64x48 I2C)

Software requirements

  • Oled library [link]
  • SGP library [link]
  • Arduino IDE / VS Code
  • (For Wemos d1 mini) CH340G driver [link]

Connection scheme

The oled shield fits exactly on the ESP, so no other connections are required.

ESP8266 SGP30
3.3v VCC
GND GND
D1 SCL
D2 SDA

Settings

Copy Settings.example.h to Settings.h and fill in the correct data.

Setting default Description
WIFI_HOSTNAME C02Logger device name on network
WIFI_SSID - Wifi name to connect to
WIFI_PASSWORD - Wifi password
MQTT_HOST_NAME - MQTT broker address
MQTT_PORT 1833 MQTT broker port
MQTT_USER_NAME - MQTT user name
MQTT_PASS - MQTT password
MQTT_TOPIC co2meter MQTT topic prefix
MQTT_UPDATE_INTERVAL 30000 Send interval (ms)
SENSOR_MEASUREMENT_FREQUENCY 5000 Sensor update interval (ms)
USE_SCREEN true Enable or disable screen
SHOW_CONNECTION_STATUS true Show wifi and MQTT status
DEBUGE_MODE true Debug mode

MQTT

Subscribe to co2meter/<topic> in your MQTT client. prefix can be changes in the settings.

Topic Description Unit
eco2 eCO2 value ppm
tvoc TVOC value PPB

About

ESP8266 based CO2 logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages