Remote temperature monitoring and control system for potato storage boxes.
Each box runs Arduino firmware that reads RTD temperature sensors, monitors voltage, adjusts a motor-driven variac, and reports data over LoRa. A Raspberry Pi receives box data, stores it in PostgreSQL, exposes a Flask API, and supports a React/Vite dashboard.
Box_1/throughBox_8/- PlatformIO firmware for each production box.RaspberryPiV2/V2/backend/- Flask API, LoRa serial receiver, scheduler, and database initialization.RaspberryPiV2/V2/frontend/- React/Vite dashboard.RaspberryPiV2/V2/docker-compose.yml- Raspberry Pi backend and PostgreSQL stack.experiments/lora/- focused LoRa configuration, diagnostics, and loopback prototypes.Lora Testing/,motor_test/,Temperature_Sensors/,Voltage Monitor/- hardware test sketches.RaspberryPiV2/V2/README.md- detailed system architecture and deployment notes.
- Arduino Uno R4 WiFi per box
- RYLR998 LoRa radios
- Adafruit MAX31865 RTD boards
- Four internal temperature sensors plus ambient sensing
- Motor driver for variac/vent control
- Raspberry Pi host with LoRa module on
/dev/ttyS0
From RaspberryPiV2/V2:
docker compose up --build
docker compose exec backend python init_db.pyRequired environment variables:
- Root
.env:DB_USERNAME,DB_PASSWORD backend/.env:DB_USERNAME,DB_PASSWORD,THINGSPEAK_API_WRITE_KEY1throughTHINGSPEAK_API_WRITE_KEY4
Useful commands:
docker compose up -d
docker compose logs -f backend
docker compose downFrom RaspberryPiV2/V2/frontend:
npm install
npm run dev
npm run buildEach box folder is a PlatformIO project targeting uno_r4_wifi.
cp src/secrets.example.h src/secrets.h
pio run
pio run --target uploadBefore uploading firmware, confirm the boxID in src/headers.cpp matches the target box.
Keep src/secrets.h local because it contains WiFi and ThingSpeak credentials.
GET /getData/<boxID>/<limit>- latest readings for a boxPOST /changeDelta/<boxID>/<delta>- send a delta command, valid range0-30GET /schedules/<boxID>- list scheduled commandsPOST /schedules- create a scheduled commandDELETE /schedules/<scheduleID>- delete a scheduled command
Mason Menser created the original system architecture and implementation. Jefferson Kline is the current maintainer and expanded the system from four to eight production boxes, including per-box firmware, LoRa addressing, persistent controller state, scheduled power control, dashboard operations, and diagnostic tooling. The Git history preserves the original authorship and later work.