Skip to content

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

HydroTemp OS – RPI Sensor Dashboard

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.


What It Does

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

Sensors

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)

Data Sources

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.


Project Structure

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

Requirements

R packages

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.

Hardware context

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.


Running the App

  1. Clone the repository and open the project in RStudio (a .Rproj file, .git directory, or .here marker at the repo root lets here resolve all paths automatically).
  2. Ensure source_data/OnBoard.log and source_data/templog.csv are present.
  3. Open app_rpi.R and click Run App, or execute from the console:
shiny::runApp("app_rpi.R")

Author

Mike Proctor – FlatBroke Farms

About

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.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages