{"id":21851699,"url":"https://github.com/sighmon/ios-ble-co2-sensor","last_synced_at":"2025-04-14T16:20:47.162Z","repository":{"id":140157486,"uuid":"527976527","full_name":"sighmon/ios-ble-co2-sensor","owner":"sighmon","description":"An iOS/macOS app to read Sensirion SCD-41 CO2 sensor readings written in SwiftUI.","archived":false,"fork":false,"pushed_at":"2023-08-17T23:50:10.000Z","size":10907,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-05T09:42:52.916Z","etag":null,"topics":["app","bluetooth","co2","ios","macos","sensor"],"latest_commit_sha":null,"homepage":"https://apps.apple.com/app/co2-sensor/id1643286074","language":"Swift","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/sighmon.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}},"created_at":"2022-08-23T12:16:59.000Z","updated_at":"2025-02-04T08:35:09.000Z","dependencies_parsed_at":"2023-09-30T11:01:41.994Z","dependency_job_id":null,"html_url":"https://github.com/sighmon/ios-ble-co2-sensor","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"7327349984df075b18d8875e68d4cf128ff5f46e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighmon%2Fios-ble-co2-sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighmon%2Fios-ble-co2-sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighmon%2Fios-ble-co2-sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sighmon%2Fios-ble-co2-sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sighmon","download_url":"https://codeload.github.com/sighmon/ios-ble-co2-sensor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914127,"owners_count":21182360,"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","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":["app","bluetooth","co2","ios","macos","sensor"],"created_at":"2024-11-28T01:09:39.330Z","updated_at":"2025-04-14T16:20:47.142Z","avatar_url":"https://github.com/sighmon.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A Bluetooth CO2 monitor app for iOS/macOS\n\nAn iOS/macOS app to read Sensirion SCD-41 CO2 sensor readings written in SwiftUI.\n\n\u003cimg src=\"co2-sensor-ios-home.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-archive.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-archive-detail.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-dark.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\n\n\u003cimg src=\"co2-sensor-ios-green.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-yellow.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-orange.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-ios-red.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\n\n\u003cimg src=\"co2-sensor-macos-home.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-archive.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-archive-detail.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-dark.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\n\n\u003cimg src=\"co2-sensor-macos-green.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-yellow.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-orange.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\u003cimg src=\"co2-sensor-macos-red.png\" width=\"20%\" style=\"padding: 10px;\"\u003e\n\n## Hardware\n\n* [ESP32-C3](https://core-electronics.com.au/adafruit-qt-py-esp32-c3-wifi-dev-board-with-stemma-qt.html)\n* [Lipo charger](https://core-electronics.com.au/adafruit-liion-or-lipoly-charger-bff-add-on-for-qt-py.html)\n* [SCD-41](https://core-electronics.com.au/adafruit-scd-41-ndir-co2-temperature-and-humidity-sensor-stemma-qt-qwiic.html)\n* [Qwiic cable](https://core-electronics.com.au/flexible-qwiic-cable-50mm.html)\n* [JST 2-pin cable](https://core-electronics.com.au/jst-2-pin-cable.html)\n* Nokia BP-6MT 3.7V battery\n\n### Assembly\n\n\u003cimg src=\"https://raw.githubusercontent.com/sighmon/co2_sensor_scd4x_esp32_http_server/add/4-adafruit-qt-py-esp32-c3/scd4x-esp32-c3.jpg\" width=\"100%\" /\u003e\n\n* (optional) Solder the Lipo charger to the ESP32-C3\n* (optional) Connect the battery to the Lipo charger via the JST 2-pin cable\n* Connect the SCD-41 to the ESP32-C3 via the Qwicc cable\n* Plug the ESP32-C3 into your laptop and upload the Arduino sketch here: [co2_sensor_scd4x_esp32_http_server](https://github.com/sighmon/co2_sensor_scd4x_esp32_http_server/tree/add/4-adafruit-qt-py-esp32-c3#http-response)\n\n## Software\n\n* [Arduino ESP32-C3 BLE and HTTP exporter](https://github.com/sighmon/co2_sensor_scd4x_esp32_http_server/tree/add/4-adafruit-qt-py-esp32-c3)\n* Clone this repo, open in Xcode, tap run\n* The app will auto-detect the CO2 sensor and show live data\n* Tap the `Save` button to save the current reading shown\n* Tap the `History` button to show the readings since the sensor was turned on\n* Tap the `Sound` button to play two notes when a sensor reading happens - it first plays middle C corresponding to 1,000 ppm CO2, and then a second note corresponding to the current sensor reading\n* Tap the `Archive` button to see a list of readings saved to Core Data\n\n## Data\n\nBy pressing the `Save` button, the current reading is saved to your device's Core Data. If you have iCloud setup, the data will sync across your devices.\n\nIf you'd like to export your data to a cloud InfluxDB account:\n\n* Sign up for an InfluxDB account: https://cloud2.influxdata.com/signup\n* Copy your `OrganisationID`, `BucketID`, and generate an `APIKey`\n* Tap the `i` button on the home screen of the app and fill in your details\n\nHere's some sample data in a dashboard in InfluxDB:\n\n\u003cimg src=\"co2-sensor-to-influxdb.png\" width=\"100%\"\u003e\n\n## TODO\n\n- [x] Download historic data\n- [x] Read realtime data\n- [x] Add location data to saved sensor readings\n- [x] Add ability to run on macOS\n- [x] Save settings to user defaults\n- [x] Export to InfluxDB\n- [ ] Add [iOS 16 Chart](https://developer.apple.com/documentation/charts) for last 10 readings ([tutorial](https://www.appcoda.com/swiftui-line-charts/))\n- [ ] Add [macOS menu item](https://sarunw.com/posts/swiftui-menu-bar-app/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsighmon%2Fios-ble-co2-sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsighmon%2Fios-ble-co2-sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsighmon%2Fios-ble-co2-sensor/lists"}