cctv-alert-v1
v1.0.0
Published
PPE violation alert system for CCTV monitoring
Maintainers
Readme
cctv-alert
Automatically send PPE violation alerts to team leaders via Email and Telegram — built for CCTV-based Deep Learning safety monitoring systems!
How it works ( This package specifically work for my DL project)
CCTV Camera
↓
YOLOv8 — detects PPE violation
↓
Face Recognition — identifies the person
↓
Screenshot saved
↓
cctv-alert receives the details
↓
Email + Telegram → Team Leader!Installation
npm install cctv-alertQuick Start
const cctvAlert = require('cctv-alert')
// Step 1 — Configure once
cctvAlert.configure({
email: {
user: "[email protected]",
pass: "your_app_password"
},
telegram: {
token: "your_bot_token",
chatId: "your_chat_id"
}
})
// Step 2 — DL project sends violation details
cctvAlert.alert({
camNumber : 1,
zone : "Zone B - Machine Floor",
lat : 9.9252,
lng : 78.1198,
violation : "No Helmet",
personName : "Kumaraguru R",
screenshot : "./frame.jpg",
teamLeader : "[email protected]"
})Python DL Project Integration
import requests
# YOLOv8 violation detect pannuchu
requests.post("http://localhost:3000/alert", json={
"camNumber" : 1,
"zone" : "Zone B - Machine Floor",
"lat" : 9.9252,
"lng" : 78.1198,
"violation" : "No Helmet",
"personName" : "Kumaraguru R",
"screenshot" : "./frame.jpg",
"teamLeader" : "[email protected]"
})Input Fields
| Field | Type | Description |
|---|---|---|
| camNumber | Number | Camera ID |
| zone | String | Zone name |
| lat | Number | Latitude |
| lng | Number | Longitude |
| violation | String | Violation type |
| personName | String | Detected person |
| screenshot | String | Image path |
| teamLeader | String | Leader email |
What Team Leader Receives
SAFETY VIOLATION DETECTED
Camera : 1
Zone : Zone B - Machine Floor
Person : Kumaraguru R
Violation : No Helmet
Location : 9.9252, 78.1198
Time : 21/03/2026, 10:42 AM
[ CCTV Screenshot attached]Real World Setup
Factory CCTV → Same Network → Laptop
↓
Python DL Project
↓
cctv-alert package
↓
Team Leader notified! Author
Kumaraguru R — Mepco Schlenk Engineering College
