Build a network of ("edge") humidity sensors using Raspberry Pis with SenseHats and additional cheaper sensors
For our house, I want to make sure I can track the effectiveness of regularly ventilating the rooms by adding humidity sensors and tracking the measurements over time.
We've already started with this little project:
https://github.com/benediktwerner/humidity-logger
Goal for this Hackweek
The setup we built over the holidays works just fine, but there are a few practical issues and a few stretch goals I'd have:
With a Raspberry Pi plus the Sense Hat, a single sensor is pretty expensive and over-specced. Using a Raspberry Pi as the master is ok (especially as I already have two with two Sense Hats), but I'd like to add extra sensors that can be connected wirelessly directly to one of the Raspberry Pis using Bluetooth or WiFi. Those could either be ready to go or a combination of "bare" sensor and a cheap board like the Raspberry Pico W or a similar board (e.g., based on the ESP32).
Currently, there's only a Grafana dashboard with a "forever" history. Would love to add extra reporting, e.g., sending alerts when certain humidity thresholds are exceeded, archiving older data.
None of the setup is "SUSEfied" (using SUSE Linux images, k3s, Rancher, ...). I'd love to change that, so that the setup can be used as a showcase for SUSE Edge. The stretch goal would be to make the SUSE version at least as easy to use as the current Raspberry Pi OS setup.
I'm looking for contributors who want to hack on either the hardware part (building an affordable Bluetooth or WiFi humidity/temperature sensor from components) or the SUSEfied software stack or both.
The software stack has many areas to work on, from building out-of-the box containers that can be deployed from Rancher to improving the Grafana dashboards.
Resources
- https://github.com/benediktwerner/humidity-logger
- https://www.raspberrypi.com/products/sense-hat/
- https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html
- https://community.ibm.com/community/user/cloud/blogs/alexei-karve/2022/05/08/microshift-15
Looking for hackers with the skills:
raspberrypi esp32 microos k3s rancher elemental sensors grafana influxdb containers helm microcontroller edge
This project is part of:
Hack Week 22
Activity
Comments
-
over 2 years ago by idefx | Reply
Hello! Have you check on the Home Assistant and ESPHome projects?
I run Home Assistant on a k3s cluster, with 2 raspberry pi 4 and 2 intel low-power (a VM inside a NAS and a NUC). Everything is on SLE Micro, and I use Rancher for the management of the cluster, and longhorn for persistent data. For the sensor part, I have a couple of Arduino m5 atoms lite. They support a variety of sensors, and with ESPHome, it is super easy to connect them to Home Assistant. Then you can design automations, mobile notification, etc. from Home Assistant, and even plug it to other services so you get a phone call if something goes wrong, for example.
Don't hesitate to reach out to me if you want to discuss this!
-
over 2 years ago by joachimwerner | Reply
Thanks for the great pointers! We started off with a much smaller scope (no home automation, really just data gathering and visualisation), but it makes perfect sense to think of it in the context of home assistant for the future (e.g., so that a smart thermostat automatically shuts down the heating in the room when it's being ventilated). Will certainly get back to you with some questions.
-
over 2 years ago by joachimwerner | Reply
Found this on how to get the Sense Hat to work on openSUSE: https://community.ibm.com/community/user/cloud/blogs/alexei-karve/2022/05/08/microshift-15
-
over 2 years ago by gpathak | Reply
Hi @joachimwerner For adding extra sensors, I found out that it can be done with DHT22 and ESP8266. Some information about interfacing DHT22 with ESP8266 can be found here: Getting Started With the ESP8266 and DHT22 Sensor
-
over 2 years ago by bigironman | Reply
An alternative solution might be using a Raspberry Pi Pico W with MicroPython and BME280 sensor (temperature, humidity, pressure). It is easy to program and you can integrate it into nearly everything via Wifi. I'm using it in combination with Home Assistant and MQTT.
Similar Projects
Flaky Tests AI Finder for Uyuni and MLM Test Suites by oscar-barrios
Description
Our current Grafana dashboards provide a great overview of test suite health, including a panel for "Top failed tests." However, identifying which of these failures are due to legitimate bugs versus intermittent "flaky tests" is a manual, time-consuming process. These flaky tests erode trust in our test suites and slow down development.
This project aims to build a simple but powerful Python script that automates flaky test detection. The script will directly query our Prometheus instance for the historical data of each failed test, using the jenkins_build_test_case_failure_age metric. It will then format this data and send it to the Gemini API with a carefully crafted prompt, asking it to identify which tests show a flaky pattern.
The final output will be a clean JSON list of the most probable flaky tests, which can then be used to populate a new "Top Flaky Tests" panel in our existing Grafana test suite dashboard.
Goals
By the end of Hack Week, we aim to have a single, working Python script that:
- Connects to Prometheus and executes a query to fetch detailed test failure history.
- Processes the raw data into a format suitable for the Gemini API.
- Successfully calls the Gemini API with the data and a clear prompt.
- Parses the AI's response to extract a simple list of flaky tests.
- Saves the list to a JSON file that can be displayed in Grafana.
- New panel in our Dashboard listing the Flaky tests
Resources
- Jenkins Prometheus Exporter: https://github.com/uyuni-project/jenkins-exporter/
- Data Source: Our internal Prometheus server.
- Key Metric:
jenkins_build_test_case_failure_age{jobname, buildid, suite, case, status, failedsince}. - Existing Query for Reference:
count by (suite) (max_over_time(jenkins_build_test_case_failure_age{status=~"FAILED|REGRESSION", jobname="$jobname"}[$__range])). - AI Model: The Google Gemini API.
- Example about how to interact with Gemini API: https://github.com/srbarrios/FailTale/
- Visualization: Our internal Grafana Dashboard.
- Internal IaC: https://gitlab.suse.de/galaxy/infrastructure/-/tree/master/srv/salt/monitoring