Skip to content

About

This is a project I'm currently working on. It's a system that will be institution's ICT departments to monitor the health of computers and projectors in their organization at the comfort of their offices, significantly reducing the time spent physically checking devices connected at the labs and similar setups.

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

BAC Lab Monitor

Botswana School of Business Sciences — ICT Department Real-time health monitoring for computer labs and projectors.


Project Structure

bac-lab-monitor/
├── agent/
│   ├── BACLabAgent.ps1       # Runs on each lab PC (PowerShell)
│   └── InstallAgent.ps1      # Deploys the agent as a Windows service
├── backend/
│   ├── server.py             # Flask API + SQLite database
│   ├── projector_poller.py   # Polls projectors via PJLink protocol
│   └── requirements.txt
└── dashboard/
    └── index.html            # Live monitoring dashboard (served by Flask)

Quick Start

1. Set up the server (Windows or Linux machine with Python)

# Install Python dependencies
pip install flask flask-cors requests

# Start the monitoring server
cd backend
python server.py
# Server runs at http://0.0.0.0:5000

2. Deploy agents to lab PCs (run as Administrator on each PC)

# Edit BACLabAgent.ps1: set SERVER_URL to your server's IP
# Then on each PC, open PowerShell as Administrator:

cd \\server\ICTShare\BACAgent     # or copy files locally
.\InstallAgent.ps1 -LabName "Lab1" -ServerUrl "http://192.168.1.100:5000"

# Change -LabName for each lab: "Lab18", "Lab19", "Lab20", "Lab21"

3. Start projector polling (on the server)

# Edit projector_poller.py: set IPs for each projector
python projector_poller.py

4. Open the dashboard

Navigate to http://192.168.1.100:5000 from any browser on the network.


Device Status Thresholds

Metric Warning Critical
CPU > 70% > 90%
RAM > 75% > 90%
Disk > 80% > 95%
Offline > 2 min —

Projector Monitoring

Projectors are polled using the PJLink protocol (industry standard, TCP port 4352).

  • Supported brands: Epson, BenQ, Sony, NEC, Hitachi, Panasonic
  • Queries: power state, lamp hours, input signal, error codes
  • Fallback: ICMP ping if PJLink is unavailable

To enable PJLink on your projectors: see the projector's network settings menu and enable "PJLink" (no password for simplicity on a private LAN, or set a password and update projector_poller.py).


Extending the System

Add more labs

Edit PROJECTORS dict in both server.py and projector_poller.py. Run InstallAgent.ps1 on each PC with the correct -LabName.

Connect to Power BI

The SQLite database (bac_monitor.db) can be queried directly by Power BI Desktop:

  • Data Source: ODBC → SQLite ODBC Driver
  • Tables: device_reports, projector_reports, alerts
  • Refresh on a schedule to build utilization reports for management.

Enable AI recommendations (Claude API)

Set your API key as an environment variable before starting the server:

set ANTHROPIC_API_KEY=sk-ant-...   # Windows
export ANTHROPIC_API_KEY=sk-ant-...  # Linux
python server.py

Deploy on IIS (Windows Server)

Install wfastcgi and configure IIS to serve the Flask app, or use a reverse proxy (nginx/Caddy) in front of python server.py.


Author

Jason Lungisani Seretse — BAC ICT Department Work Placement, 2025/2026 Student ID: Bida23-141 | Mentor: Tshepho Kgopana

About

This is a project I'm currently working on. It's a system that will be institution's ICT departments to monitor the health of computers and projectors in their organization at the comfort of their offices, significantly reducing the time spent physically checking devices connected at the labs and similar setups.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages