{"id":21135035,"url":"https://github.com/kampi/sensorhub","last_synced_at":"2026-04-10T02:02:42.217Z","repository":{"id":115571625,"uuid":"267547209","full_name":"Kampi/SensorHub","owner":"Kampi","description":"Solar-powered, low energy environment sensor node with WiFi interface.","archived":false,"fork":false,"pushed_at":"2022-04-14T19:49:54.000Z","size":12674,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T16:53:40.254Z","etag":null,"topics":["c","cpp","electronics","iot","mqtt","mqtt-client","particle","particle-argon","qt","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kampi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2020-05-28T09:24:09.000Z","updated_at":"2020-07-18T21:23:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd8360a9-5561-491e-82f2-9025c89241d1","html_url":"https://github.com/Kampi/SensorHub","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kampi%2FSensorHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kampi%2FSensorHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kampi%2FSensorHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kampi%2FSensorHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kampi","download_url":"https://codeload.github.com/Kampi/SensorHub/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243581061,"owners_count":20314163,"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":["c","cpp","electronics","iot","mqtt","mqtt-client","particle","particle-argon","qt","raspberry-pi"],"created_at":"2024-11-20T06:40:54.338Z","updated_at":"2025-12-31T00:24:29.239Z","avatar_url":"https://github.com/Kampi.png","language":"C++","readme":"# SensorHub\n\n## Table of Contents\n\n- [SensorHub](#sensorhub)\n  - [Table of Contents](#table-of-contents)\n  - [About](#about)\n  - [Image sources](#image-sources)\n  - [Setup](#setup)\n  - [Device modes](#device-modes)\n  - [Bluetooth](#bluetooth)\n  - [Measurement](#measurement)\n  - [History](#history)\n  - [Maintainer](#maintainer)\n\n## About\n\nSolar-powered, low energy environment sensor node with WiFi interface. The device will measure the following parameter:\n\n- Temperature (with a [MCP9808](http://ww1.microchip.com/downloads/en/DeviceDoc/25095A.pdf))\n- Humidity (with a [BME680](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf))\n- Pressure (with a [BME680](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf))\n- Gas resistance (with a [BME680](https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bme680-ds001.pdf))\n- Ambient light (with a [BH1726](https://fscdn.rohm.com/en/products/databook/datasheet/ic/sensor/light/bh1726nuc-e.pdf))\n- UV (with a [VEML6070](https://www.vishay.com/docs/84277/veml6070.pdf))\n\nThe whole device is designed for low power operation and for a solar panel as current source. A backup battery will be used to buffer the sun-free time during the night or on cloudy days.\nThis battery will be charged by an integrated solar-charging circuit.\n\n![Overview](docs/img/SensorHub.png)\n\nThe integrated WiFi is used to transmit the data as an [MQTT](http://mqtt.org/) message to a broker (i. e. a Raspberry Pi). The included Qt application for the Raspberry Pi can be used to visualize and record the received data.\n\n![Application](docs/img/Application.png)\n\nPlease visit the [project site](https://www.kampis-elektroecke.de/wetterdaten-aufzeichnen/) or write me an [e-mail](mailto:DanielKampert@kampis-elektroecke.de) when you need additional informations or if you have any questions.\n\n## Image sources\n\n- [Language Icons](https://www.iconfinder.com/iconsets/flags_gosquared)\n- [Icons8](https://icons8.com/icon/set/database/material)\n- [Qt project](https://www.qt.io/blog/2016/06/20/introducing-new-built-with-qt-logo)\n\n## Setup\n\n- You have to use the [Particle CLI](https://docs.particle.io/reference/developer-tools/cli/) or the [Particle App](https://play.google.com/store/apps/details?id=io.particle.android.app\u0026hl=de) to setup your WiFi credentials in the microcontroller module before you can use the software.\n\n```bash\n$ particle usb start-listening\nDone.\n\n$ particle serial wifi\n? Should I scan for nearby Wi-Fi networks? (Y/n) y\n? Should I scan for nearby Wi-Fi networks? Yes\n? SSID ...\n? SSID ...\n? Security Type (Use arrow keys)\n? Security Type ...\n? Cipher Type (Use arrow keys)\n? Cipher Type ...\n? Wi-Fi Password ...\n? Wi-Fi Password ...\nDone! Your device should now restart.\n```\n\n- Download a bluetooth app for your smartphone (i. e. [nRF Connect](https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp\u0026hl=de)).\n- Make sure that your microcontroller module runs at least firmware version [1.5.2](https://github.com/particle-iot/device-os/releases/tag/v1.5.2).\n- **Optional:** Build the firmware from the soures in `software/SensorHub` by using [Visual Studio Code](https://code.visualstudio.com/) and the [Particle Workbench](https://www.particle.io/workbench/).\n- Power up the `SensorHub` and flash the firmware from `software/release` by using the [Particle CLI](https://docs.particle.io/tutorials/developer-tools/cli/#flashing-over-serial-for-the-electron).\n- Hold the `MODE` button of the microcontroller module to enter the setup mode.\n- After entering the setup mode the RGB LED of the device will lights up red.\n- Open the app and connect your smartphone with the `SensorHub`. When the connection is successful the RGB LED of the `SensorHub` starts to blink green until you close the connection or a IP address of the MQTT broker was transmitted successfully.\n\n## Device modes\n\nThe `SensorHub` use the RGB led of the microcontroller module to display his current state. Each state is encoded in a blink pattern which begins with a **3 seconds** group color.\n\n| **RGB color** | **Group** |\n|:-------------:|:---------:|\n| Blue          | Sensors   |\n| Green         | Network   |\n| Red           | Device    |\n\nThe group color is followed by the error code which is encoded with a white flashing of the RGB LED. Each flash has a duration of **1 second**.\n\n| **Blink code** | **Sensors** | **Network** | **Device** |\n|:--------------:|:------------------------------------------:|:-----------:|:-----------:|\n| 1x             | Temperature sensor failure. | No valid WiFi credentials found. \u003cbr\u003e Please use the [Particle CLI](https://docs.particle.io/reference/developer-tools/cli/) to setup your WiFi credentials. | - |\n| 2x             | Light sensor failure. | No valid IP address found. | - |\n| 3x             | Environment sensor failure. | Connection error. | - |\n| 4x             | UV sensor failure. | Network timeout. | - |\n| 5x             | Communication error. | - | - |\n\nThe current device error is also printed over the serial interface of the microcontroller module or is published over the MQTT tag `sensorhub/errors` (this required valid network settings).\n\n## Bluetooth\n\nThe firmware use the following UUIDs for the bluetooth low energy service:\n\n| **UUID** | **Description** |\n|:------------------------------------:|:---------:|\n| b4250401-fb4b-4746-b2b0-93f0e61122c6 | General service UUID for the BLE service. |\n| b4250402-fb4b-4746-b2b0-93f0e61122c6 | Server IP UUID to configure the IP address of the MQTT server. |\n\n## Measurement\n\nAfter a successful configuration and initialization the device will enter the sleep mode. The microcontroller is woken up every three minutes to read in new data from the sensors. After a successful read of the\nsensors the data gets packed in a [JSON](https://www.json.org/json-en.html) structure and published by using the [MQTT](http://mqtt.org/) protocol. The firmware uses the topic `sensorhub/weather` to publish the sensor data in the network.\nThe JSON object uses the following structure:\n\n```json\n{\n  \"Temperature\": \"23.0\",\n  \"Ambient light\": \"1000.0\",\n  \"UV\": \"7\",\n  \"Pressure\": \"1004\",\n  \"Humidity\": \"44.0\",\n  \"Gas resistance\": \"20000\",\n  \"Gas valid\": \"0\",\n  \"IAQ\": \"97.5\",\n  \"IAQ valid\": \"0\",\n  \"Solar\": \"1.2\",\n  \"Battery\": \"3.3\"\n}\n```\n\n| **Element**    | **Description** |\n|:--------------:|:---------------:|\n| Temperature    | Temperature as float in °C. |\n| Ambient light  | Illuminance as float in lux. |\n| UV             | UV-A index as byte in the range of 0 to 11. |\n| Pressure       | Air pressure as float in hPa. |\n| Humidity       | Humidity as float in %RH. |\n| Gas resistance | Gas resistance as float in Ohms. |\n| Gas valid      | Boolean flag to indicate a valid gas measurement. |\n| IAQ            | [Indor Air Quality](https://en.wikipedia.org/wiki/Indoor_air_quality) in %. |\n| IAQ valid      | Boolean flag to indicate a valid IAQ index. |\n| Solar          | Solar cell voltage as float in V. |\n| Battery        | Battery voltage as float in V. |\n\n## History\n\n| **Version**   | **Description** | **Date**   |\n|-------------|---------------------------------------------|----------|\n| 0.1           | Release hardware version 1.1 \u003cbr\u003e Firmware version 1.0 \u003cbr\u003e Release application version 1.0 | 13.07.2020 |\n| 0.2           | Release hardware version 1.2 \u003cbr\u003e Improve firmware and release firmware 1.1 \u003cbr\u003e Release application version 1.1 | 18.07.2020 |\n\n## Maintainer\n\n- [Daniel Kampert](mailto:DanielKampert@kampis-elektroecke.de)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampi%2Fsensorhub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkampi%2Fsensorhub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkampi%2Fsensorhub/lists"}