Home Energy Management System
Image 1 Image 2 Image 3

Our Challenge and Our Solution

What is the challenge?

Excessive energy consumption in smart homes along with the lack of proper monitoring can lead to increased costs and the risk of power outages. In such cases, many users are not aware of the energy usage of their devices, making optimal energy management a challenge.

Our Solution

We have designed a system that manages all smart home devices. This solution includes the following components:

  • Device Management: In this system, we maintain an array of objects (devices) where each object represents a home device; for example, Living Room Light or Refrigerator. Each device includes its name, consumption rate, on/off status, and an essential flag.
  • Description of Key Functions:
    • renderDevices(): Renders the devices from the array onto the page and draws an on/off toggle button for each device.
    • updateConsumption(): Calculates the instantaneous energy consumption based on the devices that are on, adding a small random fluctuation for simulation. If the consumption exceeds the threshold, an alert is shown.
    • autoSuggestion(): If consumption is high, it suggests turning off non-essential devices.
    • energySaveMode(): Automatically turns off all non-essential devices and recalculates consumption. In this mode, the button text changes from "Activate Energy Saving Mode" to "Deactivate Energy Saving Mode".
    • initChart() and setChartData(type): These functions initialize the chart and set the data based on the user’s selection (daily, monthly, or yearly). They also adjust the X-axis to reflect the correct time period (hour, day, or month).
    • simulateTime(): Every 3 seconds, it simulates the passage of one hour in real time so that the chart and instantaneous consumption are continuously updated.
  • Adding a New Device: Users can enter their personal devices through the "Add New Device" form. The form includes the device name, energy consumption, and its essential status. Once added, the device is pushed to the devices array and both the device list and instantaneous consumption are updated.
  • Responsive User Interface (UI): The system is designed to maintain its layout and provide a quality experience across different devices (desktop, tablet, mobile).

With this approach, users can monitor real-time energy consumption, turn devices on/off as needed, and activate the automatic energy saving mode to reduce expenses and prevent potential electrical failures. The daily, monthly, and yearly charts provide analytical insights into energy usage over different time periods.

Reduced Energy Costs

Accurate Consumption Analysis

Higher Efficiency

Reliable and Stable System

Home Devices

Add New Device

Device successfully added!

Energy Consumption Display

Instant Consumption: 0 kWh
Excessive consumption! Please optimize your usage.