How marta-dot/raspberry_mirror works
This repository implements a Raspberry Pi temperature/humidity monitor with an Angular dashboard. The backend samples a sensor, stores readings in SQLite, serves temperature/humidity data over HTTP, and periodically sends changing colors to a Bluetooth light. The dashboard bootstraps a shell containing a clock, photo slideshow, and sensor display. The sampled backend and component sources establish the shown runtime links; other frontend templates and the database schema are not inspected, so the graph avoids inferring additional behavior.
Main entry points: app.py Flask API and sampler · app.component.ts Dashboard shell · main.ts Angular bootstrap · app.config.ts App configuration
Components 14
Sensor backend
- Flask API and sampler
backend/app.py - SQLite readings
Dashboard
- Angular bootstrap
frontend/src/main.ts - App configuration
frontend/src/app/app.config.ts - Router routes
frontend/src/app/app.routes.ts - Dashboard shell
frontend/src/app/app.component.ts - Temperature client
frontend/src/app/temp-hum/temp-hum.service.ts
Dashboard features
- Clock
frontend/src/app/clock/clock.component.ts - Photo slideshow
frontend/src/app/gallery/gallery.component.ts - Sensor display
frontend/src/app/temp-hum/temp-hum.component.ts
Hardware adapters
- GPIO fallback
backend/fake_GPIO.py - DHT fallback
backend/fake_adafruit_dht.py
Other components
- Dashboard visitor
- Bluetooth light
Connections 13
- Dashboard visitor → Dashboard shell: views dashboard
- Angular bootstrap → App configuration: uses config
frontend/src/main.ts - Angular bootstrap → Dashboard shell: bootstraps
frontend/src/main.ts - App configuration → Router routes: provides routes
frontend/src/app/app.config.ts - Dashboard shell → Clock: imports
frontend/src/app/app.component.ts - Dashboard shell → Photo slideshow: imports
frontend/src/app/app.component.ts - Dashboard shell → Sensor display: imports
frontend/src/app/app.component.ts - Sensor display → Temperature client: calls
frontend/src/app/temp-hum/temp-hum.component.ts - Temperature client → Flask API and sampler: requests temperature
frontend/src/app/temp-hum/temp-hum.service.ts - Flask API and sampler → SQLite readings: writes and reads
backend/app.py - Flask API and sampler → GPIO fallback: imports fallback
backend/app.py - Flask API and sampler → DHT fallback: imports fallback
backend/app.py - Flask API and sampler → Bluetooth light: sends color
backend/app.py