Skip to content

codmpm/esp-ccs811-bme280-mqtt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ESP8266 MQTT CCS811/BME280 air quality sensor

This is a simple sketch to measure the air quality with the CCS811 Air Quality Sensor. It get's compensated with an Bosch BME280.

I'm using the Adafruit CCS811 library which worked after I used the correct I2C address of 0x5A for my sensor.

Currently I'm testing if my setup works and the values are reliable - so please see this as a work in progress. Any Feedback and help is appreciated!


image of breadboard Used here are the Sparkfun CCS811 and the Adaferuit BME280 breakout.

Config

Before compiling, you must implement your config by copying the file config.example.h to config.h in directory esp-ccs811-bme280-mqtt. After that you have to fill or change the values in config.h.

The read data get's dropped to the following topics using <mqtt-topic-prefix>. All values are retained, the online state is set to offline using mqtt's last-will.

<mqttTopicPrefix>status          online/offline (last will)
<mqttTopicPrefix>ip              system ip
<mqttTopicPrefix>temperature     temperature in °C
<mqttTopicPrefix>humidity        relative humidity in %
<mqttTopicPrefix>pressure        pressure in hPa
<mqttTopicPrefix>altitude        altitude in m
<mqttTopicPrefix>co2             CO2 concentration in ppm
<mqttTopicPrefix>tvoc            total volatile compound in ppb

Todo

  • Check Sparkfuns CCS811 lib
  • better configuration

Created with

Credits

Patrik Mayer, 2018 Tobias Schmitt, 2018

License

MIT

Releases

No releases published

Packages

No packages published