How gamency/smartmeter works
SmartMeter is an Android app for rental-property electricity management. Its main workflow presents dashboard totals, room-level usage and trends from the backend; users can also photograph meter readings, select rooms, and review pending recognition results. The README documents these capabilities and API endpoints. The sampled implementation excerpts are from backup_func rather than the app’s main source tree, so links between unsampled app components are omitted; the RAG/agent assistant is documented, but its backend implementation is not present in the tree.
Main entry points: OverviewFragment.java Overview · SmartPhotoActivity.java Photo capture · MainActivity.java Android app · SmartReviewActivity.java Reading review
Components 15
Usage dashboard
- Android app
app/src/main/java/com/example/smartmeter/MainActivity.java - Overview
app/src/main/java/com/example/smartmeter/OverviewFragment.java - Room details
app/src/main/java/com/example/smartmeter/DistributionActivity.java
Meter readings
- Photo capture
app/src/main/java/com/example/smartmeter/SmartPhotoActivity.java - Room selection
app/src/main/java/com/example/smartmeter/RoomSelectorAdapter.java - Reading review
app/src/main/java/com/example/smartmeter/SmartReviewActivity.java
Assistant
- Chat interface
app/src/main/java/com/example/smartmeter/ChatActivity.java - Chat sessions
app/src/main/java/com/example/smartmeter/ChatSession.java - RAG agent service
Local data
- Reading database
app/src/main/java/com/example/smartmeter/SmartReadingDatabase.java - Reading access
app/src/main/java/com/example/smartmeter/SmartReadingDao.java - Reading records
app/src/main/java/com/example/smartmeter/SmartReadingEntity.java - Room model
app/src/main/java/com/example/smartmeter/RoomItem.java
Other components
- Landlord or tenant
- Meter backend
Connections 16
- Landlord or tenant → Android app: uses
README.md - Android app → Overview: shows
README.md - Overview → Meter backend: fetches dashboard data
README.md - Overview → Meter backend: fetches room usage
README.md - Overview → Meter backend: fetches daily trends
README.md - Landlord or tenant → Photo capture: captures readings
README.md - Photo capture → Meter backend: uploads photos
README.md - Photo capture → Room selection: selects room
- Landlord or tenant → Reading review: reviews readings
README.md - Reading review → Meter backend: loads pending records
README.md - Photo capture → Reading database: caches readings
- Reading database → Reading access: provides access
- Reading access → Reading records: stores records
- Landlord or tenant → Room details: views details
README.md - Chat interface → RAG agent service: sends queries
- RAG agent service → Meter backend: uses tools