{"id":16752326,"url":"https://github.com/wumpf/indoor-climate-sensor","last_synced_at":"2025-07-29T02:06:25.249Z","repository":{"id":146737148,"uuid":"474628972","full_name":"Wumpf/indoor-climate-sensor","owner":"Wumpf","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-20T09:06:08.000Z","size":41,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-16T05:16:49.911Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":false,"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/Wumpf.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":"2022-03-27T12:19:56.000Z","updated_at":"2025-01-06T16:02:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"28bfb810-a738-4192-a574-1eec862dc834","html_url":"https://github.com/Wumpf/indoor-climate-sensor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Wumpf/indoor-climate-sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wumpf%2Findoor-climate-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wumpf%2Findoor-climate-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wumpf%2Findoor-climate-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wumpf%2Findoor-climate-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Wumpf","download_url":"https://codeload.github.com/Wumpf/indoor-climate-sensor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Wumpf%2Findoor-climate-sensor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267617643,"owners_count":24116208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-10-13T02:46:40.545Z","updated_at":"2025-07-29T02:06:25.220Z","avatar_url":"https://github.com/Wumpf.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Indoor Climate Sensor\n=======================\n\nSimple [ESPHome](https://esphome.io/) based indoor climate sensor using Sensirion SCD41 CO2 sensor, with buzzer and color LED.\n\nUsage\n--------------\n\n[Install esp command line tools](https://esphome.io/guides/installing_esphome.html)\n\nConnect esp32 and run:\n```\nesphome run 0-sensorita.yaml\n```\nAfter first run OTA updates are possible.\n\nTested with esphome `2022.6.1`\n\nHardware used\n---------------\n\n* [FireBeetle ESP32-E](https://wiki.dfrobot.com/FireBeetle_Board_ESP32_E_SKU_DFR0654)\n* [Sparkfun 8mm Adressable RGB LED (WS2812)](https://www.sparkfun.com/products/12877#reviews)\n* [TDK PS1240P02BT Piezzo Buzzer](https://www.digikey.se/en/products/detail/tdk-corporation/PS1240P02BT/935930)\n* [SCD41 Sensor](https://www.digikey.se/en/products/detail/sensirion-ag/SEK-SCD41-SENSOR/13684004)\n\nNotes on LED wiring\n--------------\nShould probably put a resistor on the datapin. Didn't do so so far and things seem to work fine.\nIn a similar fashion, common wisdom seems to be to add a capacitor before (and smaller between) the LEDs.\nAgain, it seems I'm getting away with it just fine, but notably I'm also driving only a single LED so not too surprising.\n\n(See guides by [Sparkfun](https://learn.sparkfun.com/tutorials/ws2812-breakout-hookup-guide#addressable-through-hole-led) and [Adafruit](https://learn.adafruit.com/adafruit-neopixel-uberguide))\n\nWS2818 LEDs usually require 5V both on Data and Vin.\nI tried with both 5V and 3.3V supply and it worked fine without any flickering.\nThe [specs](https://cdn.sparkfun.com/assets/a/b/1/e/1/DS-12877-LED_-_RGB_Addressable__PTH__8mm_Diffused__5_Pack_.pdf) that Sparkfun linked to the LEDs I bought actually says 2.5V - 7.5V which implies that I got lucky again? (admittedly I read up on all of this only after the fact). But it also says that the data voltage should be somewhere around the supply voltage, so going with that now (i.e. having input voltage on 3.3V since I can't do much about data without an extra voltage regulator).\n\n\nNote on update interval\n--------------\n\nResponse times to change of the sensor are \n\n* CO2: 60s\n* Humidity: 90s\n* Temperature: 120s\n\nResponse time define as \"Time for achieving 63% of a respective step function\".\n(see [datasheet](https://sensirion.com/media/documents/C4B87CE6/61652F80/Sensirion_CO2_Sensors_SCD4x_Datasheet.pdf))\n\nPeriodic measurement time is 5 seconds.\nThere is also a power saving mode in which measurements are taken only every 30 seconds.\n\nNote on calibration\n--------------\n\nThe SCD41 calibrates itself by default, but for this to work it needs to be exposed to ~400PPM (i.e. outdoors) at least once a week. This [blog](https://emariete.com/en/sensor-co2-sensirion-scd40-scd41-2/#Calibracion_automatica) further notes that:\n\n\u003e Although, we generally talk about the sensor taking 7 days to calibrate, to be precise, what you need are 7 good measurements separated by at least 18 hours (that is, approximately 5 days).\n\nGenerally, any settings are not written to the EEPROM (which only lives for ~2000 write cycles!). Calibration history however is automatically stored in a separate EEPROM \"dimensioned for the specified sensor lifetime\".\n\nFactory default for temperature offset is 4C because of assumed self-heating.\nCO2 measurement accuracy is independent of temperature offset\n\n\nAs automatic calibration requires outdoor air every few days while the sensor is on, I disabled automatic self calibration and instead manually calibrated the sensor. (This requires esphome 2022.5.0 or newer which adds manual calibration to scd4x)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwumpf%2Findoor-climate-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwumpf%2Findoor-climate-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwumpf%2Findoor-climate-sensor/lists"}