How reef-pi/reef-pi works
reef-pi is a Raspberry Pi reef-tank automation system. A user configures equipment and automation in the browser; the web API exposes controller capabilities, whose subsystems monitor readings, schedule actions, and operate connected devices. The README also documents camera capture, telemetry, alerts, charts, and dashboards. Sampled controllers confirm device, persistence, and statistics interactions; the full API routing and several feature implementations were not sampled, so those links are kept at the documented subsystem level.
Main entry points: controller.go Controller interfaces · connectors I/O connectors · boltdb.go Bolt storage · stats_manager.go Metric history
Components 22
Web interface
- Browser UI
front-end/src/app.jsx - Feature routes
front-end/src/main_panel_routes.jsx - Dashboard and charts
front-end/src/dashboard/main.jsx
Controller capabilities
- HTTP API
controller/api/impl.go - Controller interfaces
controller/controller.go - Equipment control
controller/modules/equipment/controller.go - Temperature control
controller/modules/temperature/controller.go - pH monitoring
controller/modules/ph/controller.go - Auto top-off
controller/modules/ato/controller.go - Lighting automation
controller/modules/lighting/controller.go - Dosing control
controller/modules/doser/controller.go - Timers and reminders
controller/modules/timer/controller.go - Camera capture
controller/modules/camera
Device control
- I/O connectors
controller/device_manager/connectors - Hardware drivers
controller/device_manager/drivers - Device manager
controller/device_manager/device_manager.go
Persistence and telemetry
- Bolt storage
controller/storage/boltdb.go - Metric history
controller/telemetry/stats_manager.go - Telemetry and alerts
controller/telemetry
Other components
- Tank operator
- Tank electronics
- Telemetry services
Connections 39
- Tank operator → Browser UI: configures
- Browser UI → Feature routes: navigates
- Feature routes → HTTP API: requests
- HTTP API → Controller interfaces: dispatches
- Controller interfaces → Equipment control: manages
- Controller interfaces → Temperature control: manages
- Controller interfaces → pH monitoring: manages
- Controller interfaces → Auto top-off: manages
- Controller interfaces → Lighting automation: manages
- Controller interfaces → Dosing control: manages
- Controller interfaces → Timers and reminders: manages
- Controller interfaces → Camera capture: manages
- Equipment control → I/O connectors: configures outlets
- Temperature control → I/O connectors: reads inputs
- pH monitoring → I/O connectors: reads inputs
- Auto top-off → I/O connectors: reads inlets
- Lighting automation → I/O connectors: controls jacks
- Dosing control → I/O connectors: controls jacks
- Device manager → Hardware drivers: initializes
- Device manager → I/O connectors: provisions
- I/O connectors → Hardware drivers: uses
- Hardware drivers → Tank electronics: controls
- Equipment control → Bolt storage: persists
- Temperature control → Bolt storage: persists
- pH monitoring → Bolt storage: persists
- Auto top-off → Bolt storage: persists
- Lighting automation → Bolt storage: persists
- Dosing control → Bolt storage: persists
- Timers and reminders → Bolt storage: persists
- Temperature control → Metric history: records readings
- pH monitoring → Metric history: records readings
- Auto top-off → Metric history: records usage
- Dosing control → Metric history: records usage
- Lighting automation → Metric history: records usage
- Metric history → Bolt storage: saves history
- Dashboard and charts → Feature routes: renders view
- Telemetry and alerts → Telemetry services: publishes metrics
- Telemetry and alerts → Telemetry services: sends alerts
- Camera capture → Telemetry services: uploads photos