{"id":18021416,"url":"https://github.com/suda/sensorreporter","last_synced_at":"2026-04-24T16:33:35.981Z","repository":{"id":138005432,"uuid":"152999111","full_name":"suda/SensorReporter","owner":"suda","description":"Quickest way to fetch and publish data from IoT sensors","archived":false,"fork":false,"pushed_at":"2018-10-16T17:58:19.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T10:11:51.318Z","etag":null,"topics":["arduino","iot","iot-sensors","particle","sensors"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2018-10-14T17:17:03.000Z","updated_at":"2019-07-02T07:53:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"771adb98-fdd6-4171-a60d-72b0cb9c0b1c","html_url":"https://github.com/suda/SensorReporter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suda%2FSensorReporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suda%2FSensorReporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suda%2FSensorReporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suda%2FSensorReporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suda","download_url":"https://codeload.github.com/suda/SensorReporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247218300,"owners_count":20903226,"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":["arduino","iot","iot-sensors","particle","sensors"],"created_at":"2024-10-30T06:09:56.480Z","updated_at":"2026-04-24T16:33:35.935Z","avatar_url":"https://github.com/suda.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\n\t\u003cbr\u003e\n\t\u003cimg height=\"300\" alt=\"SensorReporter\" src=\"media/SensorReporter.png\"\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\u003c/h1\u003e\n\n\u003e `SensorReporter` is the quickest way to fetch and publish data from IoT sensors.\n\n\u003chr /\u003e\n\n# Installation \u0026 configuration\n\n`SensorReporter` is an Arduino Library but was only tested with [Particle ecosystem](https://docs.particle.io/guide/tools-and-features/libraries/).\n\n**Note:** if you tested it with any other platforms, please create a PR with instructions to let everyone know!\n\n1. Using the [Web IDE](https://docs.particle.io/guide/getting-started/build/photon/#using-libraries), [Desktop IDE](https://docs.particle.io/guide/tools-and-features/dev/#using-community-libraries) or the [CLI](https://docs.particle.io/guide/tools-and-features/cli/photon/#using-libraries) add the `SensorReporter` to your project.\n2. Create a [`sr-config.h` file](#sr-configh-file) and configure all connected sensors and reporters\n3. In your main file, Include and instantiate `SensorReporter`:\n    ```c\n    #include \"sensor_reporter.h\"\n    SensorReporter sensorReporter;\n    ```\n4. In `setup()` function initalize all sensors and reporters:\n    ```c\n    void setup()\n    {\n        sensorReporter.begin();\n    }\n    ```\n5. In `loop()` function request a report:\n    ```c\n    void loop()\n    {\n        sensorReporter.loop();\n    }\n    ```\n6. If you're using external library, add it to the `library.properties` file as well\n\n# Supported sensors \u0026 reporters\n\n**Note:** if you want to implement additional sensors or reporters, please submit a PR!\n\n### Sensors \n\n* Analog input using built in ADC\n* HTU21D temperature \u0026 humidity sensor via [SparkFun_HTU21D_Breakout_Arduino_Library](https://github.com/sparkfun/SparkFun_HTU21D_Breakout_Arduino_Library)\n* Soil moisture sensor using ADC\n* PMS3003 air quality sensor\n\n### Reporters\n\n* Printing to serial port in `NAME=VALUE` format\n* Publishing [Particle events](https://docs.particle.io/reference/firmware/photon/#particle-publish-)\n\n# `sr-config.h` file\n\nThis header file is used to configure the `SensorReporter`. To disable a sensor or reporter, comment out the relevant lines. Here's a reference file:\n\n```js\n// ***** GENERAL SETTINGS *****\n \n// All sample names will be prefixed with this string\n#define SAMPLE_PREFIX \"home_\"\n// How many miliseconds wait before next report\n#define REPORTING_INTERVAL 10000\n\n// ***** SENSORS *****\n\n// First built-in ADC pin (in the future, you'll be able to pull more pins)\n#define SENSOR_ANALOG_PIN_1 A0\n// Name to report this pin as\n#define SENSOR_ANALOG_PIN_1_NAME \"soil\"\n\n// HTU21D temperature and humidity sensor\n#define SENSOR_HTU21D\n\n// PMS3003 air quality sensor\n#define SENSOR_PMS3003\n\n// Soil moisture sensor using ADC\n#define SENSOR_MOISTURE_ANALOG_PIN A7\n// Pin connected to sensor's VCC\n#define SENSOR_MOISTURE_ENABLE_PIN D2\n\n// ***** REPORTERS *****\n\n// Serial port reporter\n#define REPORTER_SERIAL_BAUDRATE 9600\n\n// Particle event reporter\n#define REPORTER_PARTICLE\n```\n\n# Implementing new reporters or sensors\n\n0. Take a peek at [`src/sensors`](src/sensors) and [`src/reporters`](src/reporters) directories\n1. Create a class that inherits `ISensor` or `IReporter` and implements all virtual methods\n1. In `sensor_reporter.cpp`:\n    * add declarations of your classes in the beginning\n    * in the `begin()` function:\n        * initialize your class\n        * add it to collector with `collector.addSensor()` or `collector.addReporter()`\n\nOnce it's working, please create a PR so more people can use it :) [All contributions (no matter if small or big) are always welcome!](https://contributionswelcome.org/)\n\n\n# Attributions\n* Thermometer, Wind \u0026 Drops icons by Luis Rodrigues from the Noun Project\n* Serial Port icon by Dalpat Prajapati from the Noun Project\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuda%2Fsensorreporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuda%2Fsensorreporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuda%2Fsensorreporter/lists"}