Skip to content

VladSh77/demo-industrial-iot

Repository files navigation

🏭 Industrial IoT Bridge — Odoo 17 MRP Integration

Python Modbus Odoo License Status

Developed by Fayna Digital — Author: Volodymyr Shevchenko


A demonstration of an Industrial IoT Bridge built in Python — connecting a printing house machine floor directly to Odoo 17 MRP via REST API.

Eliminates manual data entry, provides real-time production transparency, and enables automated reporting of machine output directly into Odoo work orders.

Note: This is a portfolio/demo project. Client-specific logic and credentials are excluded. The plc_simulator.py allows running the full flow without physical hardware.


Architecture

┌─────────────────────────────────────────────────┐
│             Industrial Machine Floor             │
│   Heidelberg XL-106  │  HP Indigo 6K            │
│   (offset printing)  │  (digital printing)       │
└────────────┬─────────────────────────────────────┘
             │  Modbus TCP / ICMP ping
             ▼
┌─────────────────────────────────────────────────┐
│             Industrial IoT Bridge                │
│  machine_tester.py  ← heartbeat / ping check    │
│  scanner.py         ← Modbus TCP reader         │
│  main.py            ← orchestrator              │
│  odoo_api.py        ← REST API to Odoo          │
│  db_handler.py      ← local buffer (SQLite)     │
└────────────┬─────────────────────────────────────┘
             │  Odoo JSON-RPC / REST
             ▼
┌─────────────────────────────────────────────────┐
│              Odoo 17 MRP                        │
│  Work Orders  │  Production Reports  │  MO      │
└─────────────────────────────────────────────────┘

Components

File Role
main.py Orchestrator — initializes bridge, iterates monitored assets
machine_tester.py Heartbeat module — ICMP ping check per machine
scanner.py Modbus TCP reader — reads HR registers (status, speed, counter)
odoo_api.py Odoo REST/JSON-RPC client — pushes data to Work Orders
db_handler.py Local SQLite buffer — queues data if Odoo is unreachable
plc_simulator.py Modbus server simulator — test without physical hardware
config.py Security abstraction layer — credentials and endpoints

Modbus Register Map

Register Value
HR[0] Status: 0 = idle, 1 = running
HR[1] Speed (sheets/hour)
HR[2] Counter (total sheets produced)

Register map varies per machine model — configure in scanner.pyread_machine_state().


Quick Start

Requirements

  • Python 3.10+
  • pip install pymodbus requests
  • Odoo 17.0 instance (or use the PLC simulator for local testing)

Run with PLC simulator (no hardware)

# Terminal 1 — start Modbus simulator
python plc_simulator.py
# Exposes Modbus server on 127.0.0.1:5020

# Terminal 2 — run bridge
python main.py

Configure

Edit config.py:

ODOO_URL      = "https://your-odoo-instance.com"
ODOO_DB       = "your_database"
ODOO_USER     = "admin@company.com"
ODOO_PASSWORD = "your_api_key"

Business Context

Industry: Printing / Manufacturing
Client type: Printing house with 2–10 industrial machines
Problem solved: Manual production data entry into ERP — time-consuming, error-prone, delayed
Solution: Automated bridge that pushes real-time machine output directly to Odoo Work Orders
GDPR: All data processed on-premises or AWS — no third-party SaaS involved


Related Projects

  • dnj-shopfloor — full production Odoo module with operator kiosk, manager dashboard, and Modbus bridge (built on top of this demo concept)

License

MIT — see LICENSE


Built by Fayna Digital · Volodymyr Shevchenko
Systems architecture & industrial automation for manufacturing SMEs

About

Industrial IoT Bridge — real-time machine monitoring via Modbus TCP + REST API integration with Odoo 17 MRP

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages