{"id":20079095,"url":"https://github.com/mkgeiger/mqtt-indoor-climate","last_synced_at":"2026-04-07T23:31:46.110Z","repository":{"id":177432004,"uuid":"330247830","full_name":"mkgeiger/mqtt-indoor-climate","owner":"mkgeiger","description":"This is an ESP8266 based MQTT client which measures indoor climate data via the Bosch BME680 sensor","archived":false,"fork":false,"pushed_at":"2021-01-16T20:16:48.000Z","size":960,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T22:23:36.329Z","etag":null,"topics":["arduino","bme680","bsec","esp8266","humidity","mqtt","pressure","sensor","staticiaq","temperature","wifi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mkgeiger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-16T20:13:10.000Z","updated_at":"2025-01-04T12:09:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"a2378068-8d15-4d31-ab1e-9e6159144220","html_url":"https://github.com/mkgeiger/mqtt-indoor-climate","commit_stats":null,"previous_names":["mkgeiger/mqtt-indoor-climate"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mkgeiger/mqtt-indoor-climate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkgeiger%2Fmqtt-indoor-climate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkgeiger%2Fmqtt-indoor-climate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkgeiger%2Fmqtt-indoor-climate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkgeiger%2Fmqtt-indoor-climate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkgeiger","download_url":"https://codeload.github.com/mkgeiger/mqtt-indoor-climate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkgeiger%2Fmqtt-indoor-climate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","bme680","bsec","esp8266","humidity","mqtt","pressure","sensor","staticiaq","temperature","wifi"],"created_at":"2024-11-13T15:19:48.014Z","updated_at":"2026-04-07T23:31:46.090Z","avatar_url":"https://github.com/mkgeiger.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MQTT Indoor Climate\r\n## Overview\r\nIn this project you will see how to build a MQTT client on base of an ESP8266 to measure high accurate indoor climate data. The features for my needs are to measure typical (indoor) climate data like temperature, humidity, pressure and air quality with high accuracy.\r\n\r\n## Hardware design\r\n### Schematic\r\n![Schematic](/hardware/Schematic.png)\r\n\r\n### ESP8266 controller board\r\nMy descision fell on the `Wemos D1 mini` board.\r\n![WemosD1mini](/hardware/WemosD1mini.png)\r\n\r\n### Sensor\r\nMy descision was to take the Bosch BME680 all-in-one sensor, which incorporates a temperature, humidity, pressure and gas sensor in one housing. The sensor is connected via I²C interface. The Bosch Sensortec Environmental Cluster (BSEC) Software library is used to talk with the BME680. This library has been conceptualized to provide higher-level signal processing and fusion for the BME680. The library receives compensated sensor values from the sensor API. It processes the BME680 signals to provide the requested sensor outputs.\r\n\r\n![BME680](/hardware/BME680.png)\r\n\r\n## SW-update\r\nSW-update is done via USB cable.\r\n\r\n## SW installation and SW build\r\nFollowing steps need to be done first:\r\n1. install Arduino IDE 1.8.1x\r\n2. download and install the ESP8266 board supporting libraries with this URL: http://arduino.esp8266.com/stable/package_esp8266com_index.json\r\n3. select the `Lolin(Wemos) D1 R2 \u0026 mini` board\r\n4. install the `BSEC Software` library\r\n5. modify the platform.txt file, see how at https://github.com/BoschSensortec/BSEC-Arduino-library/blob/master/README.md\r\n6. install the `Async MQTT client` library: https://github.com/marvinroger/async-mqtt-client/archive/master.zip\r\n7. install the `Async TCP` library: https://github.com/me-no-dev/ESPAsyncTCP/archive/master.zip\r\n8. config (see next chapter), compile and flash\r\n\r\n## SW configuration\r\nThe configuration is completely done in the web frontend of the WifiManager. At first startup, the software boots up in access point mode. In this mode you can configure parameters like\r\n* Wifi SSID\r\n* Wifi password\r\n* MQTT broker IP address\r\n* MQTT user\r\n* MQTT password\r\n* your altitude (above sea level) in meters\r\n* your temperature compensation value in degree Celsius\r\n\r\n## SW normal operation\r\nThe BSEC library collects every 3 seconds new sensor data. The software publishes averaged values every 10 minutes to 5 MQTT topics: temperature [°C], humidity [rel. %], pressure [hPa], air quality [0..500] and air quality accuracy [0..3]. Also the software supports re-connection to Wifi and to the MQTT broker in case of power loss, Wifi loss or MQTT broker unavailability. The MQTT topics begin with the device specific MAC-address string (in the following \"A020A600F73A\" as an example). This is useful when having multiple controllers in your MQTT cloud to avoid collisions.\r\n\r\nPublish topics:\r\n* Topic: \"/A020A600F73A/temperature\"            Payload example: \"22.5\"\r\n* Topic: \"/A020A600F73A/humidity\"               Payload example: \"43.2\"\r\n* Topic: \"/A020A600F73A/pressure\"               Payload example: \"1023.7\"\r\n* Topic: \"/A020A600F73A/staticiaq\"              Payload example: \"145.3\"\r\n* Topic: \"/A020A600F73A/staticiaqaccuracy\"      Payload example: \"3\"\r\n\r\n## Builtin LED\r\nIn case of no MQTT connection the blue builtin LED is permanently on. In case of severe errors of the bme680- or BSEC driver the builtin LED begins to flash for 3 minutes and the watchdog will finally reset the ESP8266. During normal operation without errors the builtin LED is off.\r\n\r\n## Correction of pressure value\r\nAs the sensor is calibrated at sea level (0m) it will show a very low pressure value at your location, which is way below the real pressure at your location and which would falsely indicate something like a hurricane. This value needs to be corrected with the international barometric formula (see https://en.wikipedia.org/wiki/Pressure_altitude). This is done in function `seaLevelForAltitude()` which has the parameters for actual outdoor temperature, the athmospheric pressure (the raw sensor pressure value) and the altitude at your location.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkgeiger%2Fmqtt-indoor-climate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkgeiger%2Fmqtt-indoor-climate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkgeiger%2Fmqtt-indoor-climate/lists"}