A Shiny application for monitoring temperature and fan-control data logged by a Raspberry Pi at FlatBroke Farms. The dashboard ingests raw sensor logs, cleans them, and renders an interactive time-series chart so you can explore soil, ambient, enclosure, and on-board RPI temperatures side-by-side.
| Feature | Details |
|---|---|
| Multi-sensor time-series plot | Displays up to six data streams on a single chart with distinct, named colours |
| Sensor toggles | Sidebar checkboxes let you show/hide any individual sensor without reloading data |
| Date-range slider | Filter the chart to any sub-period within the available data |
| Fan-ON overlay | The "Fan Status" trace highlights moments the cooling fan was active by plotting RPI temp only while the fan is running |
| Automatic outlier removal | IQR-fencing (1.5 × IQR) is applied to noisy sensors before display |
| Label | Source column | Colour | Description |
|---|---|---|---|
| Soil 4 | Soil_4 |
Brown | Soil temperature at ~4-inch depth |
| Soil Surface | Soil_Surface |
Green | Surface soil temperature |
| Ambient | Ambient |
Red | Ambient air temperature |
| Enclosure | Enclosure |
Blue | Temperature inside the RPI enclosure |
| RPI Temp | RPI_Temp |
Deep pink | Raspberry Pi on-board CPU temperature |
| Fan Status | Fan_Status |
Aquamarine | Fan-ON overlay (plots RPI temp only while fan is running) |
Both files live in source_data/ and are read at app startup:
| File | Content |
|---|---|
OnBoard.log |
Tab/space-delimited RPI log: date, time, CPU temperature, fan state (Fan: ON / Fan: OFF) |
templog.csv |
Timestamped CSV from the external sensor array: Soil Surface (Bad Sensor), Soil Temp 4, Enclosure, Ambient |
The two datasets are joined on timestamp using a fuzzy (nearest-neighbour within ±4 minutes) inner join via the fuzzyjoin package, and all timestamps are converted to America/Chicago.
HydroTempOS/
├── app_rpi.R # Main Shiny app
├── Setup.R # Library loader & path definitions
├── RPI_data_processing.qmd # Exploratory / pre-processing notebook
├── source_data/
│ ├── OnBoard.log # RPI on-board log (date, time, CPU temp, fan)
│ └── templog.csv # External sensor temperature log
└── .gitignore
| Package | Role |
|---|---|
shiny |
Web application framework |
tidyverse |
Data wrangling & ggplot2 visualisation |
fuzzyjoin |
Nearest-timestamp join between the two log files |
lubridate |
Timezone-aware datetime handling |
here |
Portable project-relative file paths |
tidylog |
Verbose join/filter feedback during development |
Setup.R auto-installs any missing packages when the app is sourced. The here package auto-detects the project root from the nearest .Rproj, .git, or .here marker, so no manual root-finding call is needed.
The logs are generated by a Raspberry Pi running a Python-based sensor daemon that records DS18B20 temperature probes and a GPIO-controlled cooling fan. The Shiny app is purely a viewer — it does not connect to the Pi directly.
- Clone the repository and open the project in RStudio (a
.Rprojfile,.gitdirectory, or.heremarker at the repo root letshereresolve all paths automatically). - Ensure
source_data/OnBoard.logandsource_data/templog.csvare present. - Open
app_rpi.Rand click Run App, or execute from the console:
shiny::runApp("app_rpi.R")Mike Proctor – FlatBroke Farms