A modern, responsive power monitoring application that provides real-time and historical data visualization from SQL Server power meter readings.
- Live Monitoring: View real-time power meter readings through interactive gauges
- Historical Data Analysis: Visualize historical data with customizable line charts
- Alarm System: Set up notifications for readings that exceed specified thresholds
- Responsive Design: Fully responsive UI that works on desktop and mobile devices
/backend: Node.js Express server with SQL Server connectivity/frontend: React application with Material UI components
- Node.js (v14 or higher)
- npm or yarn
- SQL Server instance with power meter data
-
Navigate to the backend directory:
cd powermonitor/backend -
Install dependencies:
npm install -
Create a
.envfile (already done) with your SQL Server credentials:SQL_SERVER=DESKTOP-C0A5N3K SQL_DATABASE=powermeters SQL_USERNAME=hassan SQL_PASSWORD=Passw0rdhasan PORT=5000 -
Start the backend server:
npm start
-
Navigate to the frontend directory:
cd powermonitor/frontend -
Install dependencies:
npm install -
Start the frontend development server:
npm start
After starting both servers:
- Open your browser and navigate to
http://localhost:3000 - The dashboard will display live readings from your power meter
- Navigate to "Historical Data" to view and analyze historical trends
- Go to "Alarm Settings" to configure notifications for values outside acceptable ranges
- Node.js with Express
- SQL Server (mssql package)
- Socket.io for real-time updates
- React
- Material UI for responsive components
- Chart.js for data visualization
- React Gauge Chart for real-time gauges
- Socket.io-client for real-time updates
The application works with the ID7 table in the PowerMeters database, which contains various electrical measurements including:
- Current readings (A, B, C, N, Avg)
- Voltage readings (A-B, B-C, C-A, etc.)
- Power readings (Active, Reactive, Apparent)
- Power factor, frequency
- Total harmonic distortion (THD) values
- Energy measurements