Skip to content

MovieaT33/Electricity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Electricity

Device Power Monitoring API – Project Summary

This project is a FastAPI-based system for monitoring the power status of devices (e.g., laptops).

🔧 Features

  • 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)

🛡️ Security

Admin access via SHA3-512 hashed password in Authorization header.

📡 Client (sender) Script

A Python script collects battery data using psutil and sends periodic updates to the server via HTTP POST.

🧱 Tech Stack

Modules:

  • FastAPI
  • Pydantic

Other:

  • ujson
  • psutil
  • requests
  • hashlib

📁 Data

Stored as JSON with two main collections:

  • devices: registered device info
  • statuses: power status records with timestamps

📄 License

This is under GNU General Public License.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Contributors