Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home Simulation 🏠

A web-based Smart Home simulation application built on Object-Oriented Programming (OOP) principles. This project models the management of various smart devices, tracks real-time energy consumption, and features an automatic network overload protection system.

🚀 Key Features

⚡ Smart Energy Management

  • Centralized Control: The core Electricity class monitors the total energy consumption of all active devices in real-time.
  • Overload Protection: The system enforces a safety limit of 4000W. If consumption exceeds this threshold, a "Simulation Shutdown" is triggered to prevent damage.
  • Load Visualization: Visual indicators for network load levels (0-3).

📱 Interface & UX

  • Interactive Map: An SVG floor plan that visualizes the location and status of devices across different rooms.
  • Device Control: A user-friendly web interface with modal windows for adding and configuring new devices.
  • Filtering: Easily sort and view devices by room.

💾 Persistence (LocalStorage)

  • State Preservation: Device states (On/Off, Brightness, Volume, Temperature) and the main switch status are saved to the browser's LocalStorage.
  • Auto-Recovery: All settings are automatically restored when the page is reloaded, ensuring a seamless user experience.

🛠 Tech Stack

  • Core: JavaScript / TypeScript (Strong OOP focus)
  • Frontend: HTML5, CSS3
  • Storage: Browser LocalStorage API

🏗 Architecture

The project utilizes a modular OOP architecture:

  1. Electricity Class: Manages the global state of the power grid and calculates total consumption.
  2. Device Classes:
    • Lighting: Controls brightness levels.
    • SmartTv: Manages volume and channel selection.
    • Freezer: Regulates temperature settings.
    • Other devices inherit basic consumption and state logic from the parent class.

📦 Deployment

You can view the working version of the project here:: 🔗 Open Smart Home Simulation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages