docs: create roadmap (4 phases)

This commit is contained in:
2026-03-12 06:08:15 +08:00
parent 1e12303920
commit 5876e61cbf
3 changed files with 304 additions and 0 deletions

156
.planning/REQUIREMENTS.md Normal file
View File

@@ -0,0 +1,156 @@
# Requirements: TCKRTUIYO - Rainfall Station RTU Web Interface
**Defined:** 2026-03-12
**Core Value:** Real-time rainfall and environmental sensor monitoring with automatic data transmission to myvscada server
## v1 Requirements
Requirements for initial release. Each maps to roadmap phases.
### Dashboard
- [ ] **DASH-01**: Display current rainfall readings (Today, Hourly, MAR Acc, Yearly Acc)
- [ ] **DASH-02**: Display solar voltage reading
- [ ] **DASH-03**: Display battery voltage with status indicator (HIGH/NORMAL/LOW)
- [ ] **DASH-04**: Display current date and time (HH:MM:SS DD-MM-YYYY)
- [ ] **DASH-05**: Display station ID
- [ ] **DASH-06**: Display communication status (signal strength, connection status)
- [ ] **DASH-07**: Display software version
- [ ] **DASH-08**: Real-time updates (auto-refresh or Socket.IO)
- [ ] **DASH-09**: Last updated timestamp indicator
### User Interface
- [ ] **UI-01**: Touch-optimized interface for 7" 1024x600 display
- [ ] **UI-02**: Large touch targets (minimum 48px)
- [ ] **UI-03**: Main menu navigation
- [ ] **UI-04**: Responsive layout for remote HD access (1920x1080 on port 9090)
- [ ] **UI-05**: Login/logout functionality
### Settings
- [ ] **SETT-01**: Station Info display and edit
- [ ] **SETT-02**: Date/Time setting
- [ ] **SETT-03**: Mobile network settings view/edit
- [ ] **SETT-04**: ADC channel configuration (4 channels, types: 4-20mA, 0-10vDC)
- [ ] **SETT-05**: Rainfall sensor settings (ID, thresholds)
- [ ] **SETT-06**: Water level threshold settings
- [ ] **SETT-07**: EVAP settings
- [ ] **SETT-08**: Network settings (IP, subnet, gateway, DNS, MAC)
- [ ] **SETT-09**: Protocol settings (FTP, SCP, SFTP, WebDAV server config)
### Calibration
- [ ] **CAL-01**: View live ADC readings (4 channels)
- [ ] **CAL-02**: View current sensor readings with units
- [ ] **CAL-03**: Reset rainfall counters
- [ ] **CAL-04**: Display channel type, ADC value, datum, reading
### File Management
- [ ] **FILE-01**: List CSV files in flash memory
- [ ] **FILE-02**: View CSV file contents
- [ ] **FILE-03**: Navigate file list (scroll up/down)
- [ ] **FILE-04**: Delete CSV files
- [ ] **FILE-05**: Generate tidEDA formatted files
### Backend
- [ ] **BACK-01**: Flask backend running on Raspberry Pi
- [ ] **BACK-02**: Sensor data API endpoints
- [ ] **BACK-03**: Settings API (read/write)
- [ ] **BACK-04**: File management API
## v2 Requirements
Deferred to future release. Tracked but not in current roadmap.
### Historical Data
- [ ] **HIST-01**: Historical rainfall graphs (daily, weekly, monthly)
- [ ] **HIST-02**: Historical voltage graphs
- [ ] **HIST-03**: Date range selection for historical view
- [ ] **HIST-04**: Export data to CSV
### Alerts & Notifications
- [ ] **ALERT-01**: Configurable rainfall threshold alerts (Warning, Danger)
- [ ] **ALERT-02**: Configurable water level threshold alerts
- [ ] **ALERT-03**: Visual indicators for alert states
- [ ] **ALERT-04**: SMS notification on threshold breach
### Advanced Network
- [ ] **NETW-01**: Automatic retry on transmission failure
- [ ] **NETW-02**: Transmission queue status display
- [ ] **NETW-03**: Manual trigger for immediate transmission
- [ ] **NETW-04**: Transmission log/history
### GPS Integration
- [ ] **GPS-01**: Display GPS coordinates
- [ ] **GPS-02**: Manual coordinate entry (backup to USB GPS)
## Out of Scope
Explicitly excluded. Documented to prevent scope creep.
| Feature | Reason |
|---------|--------|
| Third-party cloud integration | Direct server connection only per requirements |
| Mobile native apps | Web-first approach |
| Multi-station dashboards | Server handles aggregation |
| Real-time chat | Outside domain |
| OAuth authentication | Simple session-based auth sufficient for local device |
## Traceability
Which phases cover which requirements. Updated during roadmap creation.
| Requirement | Phase | Status |
|-------------|-------|--------|
| DASH-01 | Phase 1 | Pending |
| DASH-02 | Phase 1 | Pending |
| DASH-03 | Phase 1 | Pending |
| DASH-04 | Phase 1 | Pending |
| DASH-05 | Phase 1 | Pending |
| DASH-06 | Phase 1 | Pending |
| DASH-07 | Phase 1 | Pending |
| DASH-08 | Phase 1 | Pending |
| DASH-09 | Phase 1 | Pending |
| UI-01 | Phase 1 | Pending |
| UI-02 | Phase 1 | Pending |
| UI-03 | Phase 1 | Pending |
| UI-04 | Phase 4 | Pending |
| UI-05 | Phase 4 | Pending |
| SETT-01 | Phase 1 | Pending |
| SETT-02 | Phase 1 | Pending |
| SETT-03 | Phase 1 | Pending |
| SETT-04 | Phase 1 | Pending |
| SETT-05 | Phase 1 | Pending |
| SETT-06 | Phase 1 | Pending |
| SETT-07 | Phase 1 | Pending |
| SETT-08 | Phase 1 | Pending |
| SETT-09 | Phase 3 | Pending |
| CAL-01 | Phase 1 | Pending |
| CAL-02 | Phase 1 | Pending |
| CAL-03 | Phase 1 | Pending |
| CAL-04 | Phase 1 | Pending |
| FILE-01 | Phase 2 | Pending |
| FILE-02 | Phase 2 | Pending |
| FILE-03 | Phase 2 | Pending |
| FILE-04 | Phase 2 | Pending |
| FILE-05 | Phase 2 | Pending |
| BACK-01 | Phase 1 | Pending |
| BACK-02 | Phase 1 | Pending |
| BACK-03 | Phase 1 | Pending |
| BACK-04 | Phase 2 | Pending |
**Coverage:**
- v1 requirements: 41 total
- Mapped to phases: 41
- Unmapped: 0 ✓
---
*Requirements defined: 2026-03-12*
*Last updated: 2026-03-12 after initial definition*

85
.planning/ROADMAP.md Normal file
View File

@@ -0,0 +1,85 @@
# Roadmap: TCKRTUIYO - Rainfall Station RTU Web Interface
## Overview
This roadmap delivers a complete rainfall monitoring system running on Raspberry Pi with a 7" touchscreen kiosk display and remote HD access. The journey progresses from core sensor-to-display functionality (Phase 1) through data persistence (Phase 2), network transmission (Phase 3), to full remote access (Phase 4).
## Phases
**Phase Numbering:**
- Integer phases (1, 2, 3): Planned milestone work
- Decimal phases (2.1, 2.2): Urgent insertions (marked with INSERTED)
Decimal phases appear between their surrounding integers in numeric order.
- [ ] **Phase 1: Foundation & Kiosk UI** - Core sensor display on 7" touchscreen (port 8080)
- [ ] **Phase 2: Data Persistence & File Management** - CSV logging and file operations
- [ ] **Phase 3: Network Transmission** - Data transmission to myvscada server
- [ ] **Phase 4: Remote Access** - Full HD remote interface (port 9090) with authentication
## Phase Details
### Phase 1: Foundation & Kiosk UI
**Goal**: Real-time rainfall and sensor data displayed on 7" touchscreen kiosk (port 8080), with settings and calibration access
**Depends on**: Nothing (first phase)
**Requirements**: DASH-01, DASH-02, DASH-03, DASH-04, DASH-05, DASH-06, DASH-07, DASH-08, DASH-09, UI-01, UI-02, UI-03, SETT-01, SETT-02, SETT-03, SETT-04, SETT-05, SETT-06, SETT-07, SETT-08, CAL-01, CAL-02, CAL-03, CAL-04, BACK-01, BACK-02, BACK-03
**Success Criteria** (what must be TRUE):
1. User can view current rainfall readings (Today, Hourly, MAR Accumulated, Yearly Accumulated) on the dashboard
2. User can view solar voltage and battery voltage with status indicator (HIGH/NORMAL/LOW) on the dashboard
3. User can view current date/time (HH:MM:SS DD-MM-YYYY) and station ID on the dashboard
4. User can view communication status (signal strength, connection status) and software version on the dashboard
5. User can navigate between Dashboard, Settings, and Calibration menus via main menu
6. User can access and modify station info, date/time, network settings, sensor thresholds, and ADC configuration
7. User can view live ADC channel readings and reset rainfall counters in calibration view
8. Dashboard updates automatically with real-time sensor data
9. Touch interface responds with large touch targets (minimum 48px) optimized for 7" 1024x600 display
**Plans**: TBD
### Phase 2: Data Persistence & File Management
**Goal**: CSV data logging to flash memory with file management UI
**Depends on**: Phase 1
**Requirements**: FILE-01, FILE-02, FILE-03, FILE-04, FILE-05, BACK-04
**Success Criteria** (what must be TRUE):
1. User can view list of CSV files stored in flash memory
2. User can navigate file list (scroll up/down) to find specific files
3. User can view contents of selected CSV files
4. User can delete unwanted CSV files from flash memory
5. User can generate tidEDA formatted files for data transmission
**Plans**: TBD
### Phase 3: Network Transmission
**Goal**: Automatic CSV data transmission to myvscada server with protocol configuration
**Depends on**: Phase 2
**Requirements**: SETT-09
**Success Criteria** (what must be TRUE):
1. User can configure server connection settings (FTP, SCP, SFTP, or WebDAV protocol)
2. System transmits CSV data files to configured myvscada server
3. Transmission status is visible in the UI
**Plans**: TBD
### Phase 4: Remote Access
**Goal**: Full HD remote interface on separate port (9090) with authentication
**Depends on**: Phase 3
**Requirements**: UI-04, UI-05
**Success Criteria** (what must be TRUE):
1. User can access the system remotely via browser on port 9090 with full HD (1920x1080) responsive layout
2. User can log in with credentials to access the remote interface
3. User can log out from any page in the remote interface
**Plans**: TBD
## Progress
**Execution Order:**
Phases execute in numeric order: 1 → 2 → 3 → 4
| Phase | Plans Complete | Status | Completed |
|-------|----------------|--------|-----------|
| 1. Foundation & Kiosk UI | 0/1 | Not started | - |
| 2. Data Persistence & File Management | 0/1 | Not started | - |
| 3. Network Transmission | 0/1 | Not started | - |
| 4. Remote Access | 0/1 | Not started | - |
---
*Roadmap created: 2026-03-12*
*Requirements coverage: 41/41 v1 requirements mapped*

63
.planning/STATE.md Normal file
View File

@@ -0,0 +1,63 @@
# Project State
## Project Reference
See: .planning/PROJECT.md (updated 2026-03-12)
**Core value:** Real-time rainfall and environmental sensor monitoring with automatic data transmission to myvscada server
**Current focus:** Phase 1: Foundation & Kiosk UI
## Current Position
Phase: 1 of 4 (Foundation & Kiosk UI)
Plan: Not yet planned
Status: Ready to plan
Last activity: 2026-03-12 — Roadmap created
Progress: [░░░░░░░░░░] 0%
## Performance Metrics
**Velocity:**
- Total plans completed: 0
- Average duration: N/A
- Total execution time: 0 hours
**By Phase:**
| Phase | Plans | Total | Avg/Plan |
|-------|-------|-------|----------|
| - | - | - | - |
**Recent Trend:**
- No execution yet
*Updated after each plan completion*
## Accumulated Context
### Decisions
Decisions are logged in PROJECT.md Key Decisions table.
Recent decisions affecting current work:
- [Research]: Selected Flask + Flask-SocketIO + Bootstrap stack for Pi Zero 2 W performance
- [Research]: Four-phase vertical slice approach based on dependency analysis
### Pending Todos
[From .planning/todos/pending/ — ideas captured during sessions]
None yet.
### Blockers/Concerns
[Issues that affect future work]
None yet.
## Session Continuity
Last session: 2026-03-12
Stopped at: Roadmap creation complete
Resume file: None