Skip to content

geosta-engineer/python-industrial-data-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 

Repository files navigation

🏭 Python Industrial Data Logger

🔒 Source code is private. This repository is a project showcase only. For inquiries, visit my portfolio or contact giorgos.stavaras@gmail.com

Python Modbus PostgreSQL ReportLab Raspberry Pi

Overview

An industrial-grade sensor data acquisition system designed for factory and process environments. The application polls Modbus RTU and TCP devices on a configurable schedule, stores all readings in a PostgreSQL time-series database, and automatically generates daily PDF shift reports using ReportLab. Threshold breach events trigger email alerts in real time, enabling proactive maintenance without a dedicated SCADA system.

Tech Stack

  • Python 3.11 — polling engine, report generation, alert dispatcher
  • pymodbus — Modbus RTU (serial RS-485) and Modbus TCP communication
  • PostgreSQL 15 — time-series storage with hypertable partitioning
  • ReportLab — programmatic PDF report generation with charts and tables
  • Raspberry Pi 4B — edge deployment with RS-485 USB adapter
  • smtplib / SMTP — email alerting via standard Python library

Key Features

  • Automated sensor polling at configurable intervals (1 s – 1 h)
  • Support for both Modbus RTU (RS-485 serial) and Modbus TCP devices
  • PostgreSQL storage with indexed time-series queries for fast reporting
  • Daily PDF reports auto-generated at midnight: charts, min/max/avg tables
  • Email alerts dispatched immediately on configurable threshold breach
  • Headless Raspberry Pi deployment with systemd service and watchdog

Architecture

Industrial Sensors / PLCs
  │                │
  │ RS-485 / RTU   │ Ethernet / TCP
  ▼                ▼
┌──────────────────────────────────┐
│        Raspberry Pi 4B           │
│                                  │
│  ┌────────────────────────────┐  │
│  │     Polling Engine         │  │
│  │  (pymodbus scheduler)      │  │
│  └──────────┬─────────────────┘  │
│             │ readings           │
│    ┌────────▼────────┐           │
│    │  PostgreSQL 15  │           │
│    │  (time-series)  │           │
│    └────────┬────────┘           │
│             │                    │
│    ┌────────▼────────┐           │
│    │ Report Generator│──▶ PDF    │
│    │  (ReportLab)    │           │
│    └─────────────────┘           │
│    ┌─────────────────┐           │
│    │  Alert Engine   │──▶ Email  │
│    │  (threshold chk)│           │
│    └─────────────────┘           │
└──────────────────────────────────┘

📬 Contact

Built by Giorgos Stavaras

About

Industrial sensor data acquisition — Modbus RTU/TCP, PostgreSQL, PDF reports

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors