A python framework to develop automation industrial processes applications and Artificial Intelligence applications for the industrial field
Project description
PyAutomation 2.0.0
Industrial Automation Meets Modern Web Technology
Empowering Industry 4.0 with Python, React, and Open Standards
Features โข Quick Start โข Documentation โข Contributing
๐ What is PyAutomation?
PyAutomation is a comprehensive, enterprise-grade Python framework designed for Industrial IoT (IIoT) and Automation projects. Version 2.0.0 introduces a revolutionary modern React-based web interface that combines powerful industrial automation capabilities with an exceptional user experience.
PyAutomation serves as the bridge between Operational Technology (OT) and Information Technology (IT), enabling seamless integration of industrial systems with modern web applications and data analytics platforms.
PyAutomation 2.0.0 - Modern React-based Human Machine Interface (HMI)
๐ฅ The Open Source Revolution
๐ฏ Enterprise-Grade Features. Zero Cost. Open Source.
PyAutomation delivers the same industrial automation power as traditional SCADA systemsโmonitoring, alarm management, data logging, real-time trends, and moreโcompletely FREE.
Why Open Source Wins
| Traditional SCADA | PyAutomation |
|---|---|
| ๐ฐ Expensive licensing (per-seat, per-tag) | โ FREE forever |
| ๐ Proprietary, vendor lock-in | โ Open source, full control |
| ๐ High initial costs (6-figure investments) | โ Zero upfront costs |
| ๐ธ Annual maintenance fees | โ No ongoing fees |
| ๐ซ Limited customization | โ Fully customizable |
You get the same power. You get the same reliability. You get the same features. But you pay $0. Forever.
โจ Features
๐จ Modern Web Interface (v2.0.0)
- React-Based HMI: Fast, responsive, and intuitive user experience
- Real-Time Updates: Live data visualization without page refreshes
- Mobile-Friendly: Responsive design that adapts to different screen sizes
- Dark/Light Themes: Customizable interface themes
- Multi-Language Support: Internationalization ready
๐ Industrial Connectivity
- OPC UA Client & Server: Native support for OPC UA protocol
- Multi-Connection Support: Connect to multiple OPC UA servers simultaneously
- Data Acquisition:
- DAQ: Polling-based data collection
- DAS: Event-driven data collection by subscription
- Node Browser: Visual exploration of OPC UA address spaces
๐ Real-Time Monitoring & Visualization
- Current Value Table (CVT): In-memory real-time database for fast access
- Real-Time Trends: Configurable strip charts with multiple tags
- Custom Dashboards: Drag-and-drop dashboard customization
- Historical Trends: Long-term data visualization and analysis
๐จ Alarm Management
- ISA-18.2 Compliant: Industry-standard alarm management
- Multiple Alarm Types: BOOL, HIGH, LOW, HIGH-HIGH, LOW-LOW
- State Management: Complete lifecycle tracking
- Alarm History: Comprehensive audit trail
- Export Capabilities: CSV export for compliance reporting
๐พ Data Logging & Persistence
- Multi-Database Support: SQLite, PostgreSQL, MySQL
- Historical Data Logging: Configurable sampling rates
- Event Logging: Complete system event tracking
- Operational Logs: Manual log entry for documentation
- Data Export: Flexible filtering and export capabilities
๐ Security & User Management
- Role-Based Access Control (RBAC): Admin, Operator, Guest roles
- Secure Authentication: Password management and policies
- User Administration: Complete user lifecycle management
- Audit Trails: Comprehensive activity logging
โ๏ธ State Machines & Concurrency
- Concurrent Execution: Run multiple state machines in parallel
- State Machine Framework: Define complex control logic
- Machine Monitoring: Real-time state machine status
- Interval Configuration: Performance tuning capabilities
๐ง Extensibility
- Modular Architecture: Easy to extend with custom logic
- RESTful API: Full API access for integration
- Custom State Machines: Build your own automation logic
- Plugin Support: Extensible driver and logger system
๐ฏ What You Can Do
๐ Monitoring System
Comprehensive real-time monitoring with intuitive dashboards and live data visualization.
๐ Real-Time Trends
Advanced strip chart visualization with configurable dashboards and multiple chart support.
๐จ Alarm Management
Enterprise-grade alarm management following ISA-18.2 standards.
๐พ Historical Data Logging
Comprehensive historical data logging for trend analysis and compliance.
๐ฅ User Management
Robust user management with role-based access control.
๐ฎ Coming Soon
- Configurable SCADA Diagram Access: Customizable SCADA diagram access with visual process flows
- Role-Based View Access Control: Granular permissions for dashboard and view access
- Modbus TCP: Direct integration with Modbus-enabled devices
- MQTT: IoT and cloud connectivity support
๐ Quick Start
Prerequisites
- Python 3.10 or higher
- Docker and Docker Compose (recommended)
- pip and virtualenv (for local setup)
Option 1: Docker Deployment (Recommended)
- Clone the repository:
git clone https://github.com/know-ai/PyAutomation.git
cd PyAutomation
- Create an
.envfile:
AUTOMATION_PORT=8050
AUTOMATION_HMI_PORT=3000
AUTOMATION_VERSION=latest
AUTOMATION_OPCUA_SERVER_PORT=53530
AUTOMATION_APP_SECRET_KEY="CHANGE_ME_TO_A_SECURE_RANDOM_VALUE"
AUTOMATION_SUPERUSER_PASSWORD="CHANGE_ME_SUPERUSER_PASSWORD"
# Configuraciรณn del HMI (opcional)
# Si usas HTTPS con certificados autofirmados:
VITE_USE_HTTPS=true
VITE_API_HOST=localhost:8050
# O especifica la URL completa:
# VITE_API_BASE_URL=https://localhost:8050/api
# VITE_SOCKET_IO_URL=https://localhost:8050
- Create a
docker-compose.yml:
services:
automation:
container_name: "Automation"
image: "knowai/automation:${AUTOMATION_VERSION:-latest}"
restart: always
ports:
- ${AUTOMATION_PORT:-8050}:${AUTOMATION_PORT:-8050}
- ${AUTOMATION_HMI_PORT:-3000}:3000
volumes:
- automation_db:/app/db
- automation_logs:/app/logs
environment:
AUTOMATION_OPCUA_SERVER_PORT: ${AUTOMATION_OPCUA_SERVER_PORT:-53530}
AUTOMATION_APP_SECRET_KEY: ${AUTOMATION_APP_SECRET_KEY}
AUTOMATION_SUPERUSER_PASSWORD: ${AUTOMATION_SUPERUSER_PASSWORD}
# Variables de entorno para configuraciรณn del HMI (HTTP/HTTPS)
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-}
VITE_USE_HTTPS: ${VITE_USE_HTTPS:-}
VITE_API_HOST: ${VITE_API_HOST:-localhost:8050}
VITE_SOCKET_IO_URL: ${VITE_SOCKET_IO_URL:-}
healthcheck:
test: ["CMD", "python", "/app/healthcheck.py"]
interval: 15s
timeout: 10s
retries: 3
volumes:
automation_db:
automation_logs:
- Start the service:
docker-compose --env-file .env up -d
- Access the HMI:
Open your browser and navigate to http://localhost:3000 (or your configured HMI port).
๐ Production Configuration: HTTP/HTTPS Setup
For production deployments, you need to configure the HMI to use the correct protocol (HTTP or HTTPS) based on your backend configuration.
Configuration Options
Option 1: Force HTTPS (Recommended for Production with SSL Certificates)
# .env file
VITE_USE_HTTPS=true
VITE_API_HOST=your-domain.com:8050
Option 2: Specify Complete URLs
# .env file
VITE_API_BASE_URL=https://your-domain.com:8050/api
VITE_SOCKET_IO_URL=https://your-domain.com:8050
Option 3: Automatic Detection (Default)
If no variables are set, the HMI will automatically detect the protocol:
- If you access the HMI via HTTPS, it will use HTTPS for API calls
- If you access the HMI via HTTP, it will use HTTP for API calls
Example Production .env File
# Backend Configuration
AUTOMATION_PORT=8050
AUTOMATION_HMI_PORT=3000
AUTOMATION_VERSION=2.0.5
AUTOMATION_OPCUA_SERVER_PORT=53530
AUTOMATION_APP_SECRET_KEY="your-secure-secret-key-here"
AUTOMATION_SUPERUSER_PASSWORD="your-secure-password-here"
# Database Configuration
AUTOMATION_DB_TYPE=postgresql
AUTOMATION_DB_HOST=db.example.com
AUTOMATION_DB_PORT=5432
AUTOMATION_DB_NAME=automation_db
AUTOMATION_DB_USER=automation_user
AUTOMATION_DB_PASSWORD=secure_db_password
# HMI Configuration (HTTPS with Self-Signed Certificates)
VITE_USE_HTTPS=true
VITE_API_HOST=your-domain.com:8050
# Or use complete URLs:
# VITE_API_BASE_URL=https://your-domain.com:8050/api
# VITE_SOCKET_IO_URL=https://your-domain.com:8050
Important Notes for HTTPS with Self-Signed Certificates
-
First Access: When using HTTPS with self-signed certificates, the browser will show a security warning on first access. Users must accept the certificate manually.
-
Subsequent Access: After accepting the certificate, the browser will remember the exception and all API calls will work normally.
-
Development: For local development with self-signed certificates, use:
VITE_USE_HTTPS=true VITE_API_HOST=localhost:8050
-
Production: For production with valid SSL certificates, the HMI will automatically use HTTPS when accessed via HTTPS.
How It Works
- Runtime Injection: Variables are injected into the HMI HTML at container startup
- Automatic Detection: If variables are not set, the HMI detects the protocol from the current page URL
- No Rebuild Required: You can change these variables and restart the container without rebuilding the image
Option 2: Local Development Setup
- Clone the repository:
git clone https://github.com/know-ai/PyAutomation.git
cd PyAutomation
- Create a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install --upgrade pip
pip install -r requirements.txt
- Run the application:
./docker-entrypoint.sh
# Or directly:
# python wsgi.py
- Access the application:
Open your browser and navigate to http://localhost:8050.
๐ Documentation
Comprehensive documentation is available at Read the Docs.
Documentation Sections
-
User Guide: Complete guide for operators and engineers
- Tags Management
- Alarm Configuration
- Database Setup
- Real-Time Trends
- User Management
- And much more...
-
Developer Guide: For developers and integrators
- Architecture Overview
- API Reference
- State Machine Development
- Custom Extensions
-
Quick Start Guide: Get up and running quickly with Docker
๐๏ธ Architecture
PyAutomation is built on a modular, extensible architecture:
Core Components
- State Machines: Concurrent execution engine for automation logic
- CVT (Current Value Table): In-memory real-time database
- OPC UA Client/Server: Industrial protocol integration
- Data Logger: Historical data persistence
- Alarm Manager: ISA-18.2 compliant alarm system
- Web Server: React-based HMI with RESTful API
๐ฏ Use Cases
๐ญ Industrial Monitoring
Real-time monitoring of process variables, equipment status, and system health.
๐ Process Visualization
Create custom dashboards and strip charts for live process visualization.
๐จ Alarm Management
Enterprise-grade alarm handling with complete lifecycle management.
๐ Data Analytics
Historical data logging and analysis for process optimization.
๐ Secure Operations
Role-based access control and comprehensive audit trails.
๐ System Integration
OPC UA integration for seamless connectivity with industrial systems.
๐ Why Choose PyAutomation?
Modern Technology Stack
- โ React-based interface for exceptional UX
- โ Python backend for flexibility and power
- โ Open standards (OPC UA, ISA-18.2)
- โ Docker-ready for easy deployment
Enterprise Features
- โ Comprehensive monitoring and visualization
- โ Industry-standard alarm management
- โ Secure user management
- โ Reliable data logging
- โ Complete audit trails
Developer Friendly
- โ Well-documented with extensive examples
- โ Modular architecture for easy extension
- โ RESTful API for integration
- โ Open source and community-driven
Cost Effective
- โ FREE forever - No licensing costs
- โ Open Source - Full source code access
- โ No Vendor Lock-in - Complete freedom
- โ Community Support - Active development
๐ค Contributing
We welcome contributions! PyAutomation is an open-source project, and we're excited to work with the community.
How to Contribute
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Please see CONTRIBUTING.md for detailed guidelines on:
- Code of conduct
- Development setup
- Coding standards
- Pull request process
- Issue reporting
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
The MIT License means you are free to:
- โ Use PyAutomation commercially
- โ Modify the source code
- โ Distribute your modifications
- โ Use privately
๐ Community & Support
Resources
- ๐ Full Documentation: Comprehensive guides and API reference
- ๐ Issue Tracker: Report bugs and request features
- ๐ฌ Discussions: Ask questions and share ideas
- ๐ง Contact: Reach out through GitHub issues or discussions
Stay Updated
- โญ Star this repository to stay updated on new releases
- ๐ Watch the repository for notifications
- ๐ข Follow our releases for the latest features
๐ Acknowledgments
PyAutomation is made possible by:
- The open-source community and contributors
- Industry standards (OPC UA, ISA-18.2) for interoperability
- Modern web technologies (React, Python, Docker) for innovation
- Users and feedback that drive continuous improvement
๐ Ready to Transform Your Industrial Automation?
Start your journey with PyAutomation 2.0.0 today
Experience the power of modern industrial automation with a world-class user interface
Welcome to PyAutomation 2.0.0 - Where Industrial Excellence Meets Modern Innovation!
Made with โค๏ธ by the PyAutomation Team
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyautomationio-2.1.3.tar.gz.
File metadata
- Download URL: pyautomationio-2.1.3.tar.gz
- Upload date:
- Size: 2.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d74d13bff5015d86f00434b788f23801715a022243314f2f5d0cd4f0fd3e524
|
|
| MD5 |
037a9102356379a9fc9e6dd5fa61bccb
|
|
| BLAKE2b-256 |
54f33fcdd146d6f928bd8dcf672ccb79a3405c73abc58ce74f4faaf2c25aed76
|
Provenance
The following attestation bundles were made for pyautomationio-2.1.3.tar.gz:
Publisher:
publish.yml on know-ai/PyAutomation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyautomationio-2.1.3.tar.gz -
Subject digest:
5d74d13bff5015d86f00434b788f23801715a022243314f2f5d0cd4f0fd3e524 - Sigstore transparency entry: 1188964145
- Sigstore integration time:
-
Permalink:
know-ai/PyAutomation@cf82ae62da0fd115ddb80cd397762eb5561bb8a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/know-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf82ae62da0fd115ddb80cd397762eb5561bb8a1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyautomationio-2.1.3-py3-none-any.whl.
File metadata
- Download URL: pyautomationio-2.1.3-py3-none-any.whl
- Upload date:
- Size: 2.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d26e34b2db32600ae3033c9122295b13cc560dea184314304b5b0c50d7ed670
|
|
| MD5 |
f468ef23bd4a83bc5d6f3f279a9df1b8
|
|
| BLAKE2b-256 |
764e979b2630ecdef1ed5b3d30fa77d1d924476148001f026aff2a448d3c34de
|
Provenance
The following attestation bundles were made for pyautomationio-2.1.3-py3-none-any.whl:
Publisher:
publish.yml on know-ai/PyAutomation
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyautomationio-2.1.3-py3-none-any.whl -
Subject digest:
5d26e34b2db32600ae3033c9122295b13cc560dea184314304b5b0c50d7ed670 - Sigstore transparency entry: 1188964152
- Sigstore integration time:
-
Permalink:
know-ai/PyAutomation@cf82ae62da0fd115ddb80cd397762eb5561bb8a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/know-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cf82ae62da0fd115ddb80cd397762eb5561bb8a1 -
Trigger Event:
push
-
Statement type: