Device Power Monitoring API – Project Summary
This project is a FastAPI-based system for monitoring the power status of devices (e.g., laptops).
- Device registration and lookup by ID or name
- Status reporting (on/off) with timestamp
- Status history tracking
- Admin-only database control (init, read, write, clear)
Admin access via SHA3-512 hashed password in Authorization header.
A Python script collects battery data using psutil and sends periodic updates to the server via HTTP POST.
Modules:
- FastAPI
- Pydantic
Other:
- ujson
- psutil
- requests
- hashlib
Stored as JSON with two main collections:
devices: registered device infostatuses: power status records with timestamps
This is under GNU General Public License.