Pre-MVP Apache 2.0 CI on every PR

Logix Gateway Bridge

Bridge Rockwell PLCs to open IIoT standards.

LGB is an open source bidirectional gateway between ControlLogix / CompactLogix PLCs and OPC UA + MQTT Sparkplug B. Visual tag mapping, per-tag write ACLs, audit trail, and Docker-first deployment — no expensive commercial gateway required.

What LGB is

A translator, not a controller.

Connecting Rockwell PLCs to modern IIoT systems usually requires expensive commercial gateways (Kepware, Cogent DataHub, Ignition) or fragile Node-RED stacks. LGB fills that gap: a pure Go binary that speaks native CIP to ControlLogix/CompactLogix and exposes tags as OPC UA variables and Sparkplug B metrics.

The PLC stays in charge of control. LGB is an observability and integration layer — it reads, writes (with explicit ACLs), and translates. No vendor lock-in on the consumer side.

Stack

  • Go 1.24
  • net/http + slog
  • SQLite (pure Go)
  • gologix (CIP)
  • gopcua (OPC UA)
  • paho MQTT
  • Sparkplug B
  • React 19 + Vite
  • Tailwind 4

One static Go binary. Pure-Go SQLite driver and no CGo means cross-compiling to Linux amd64/arm64, macOS arm64, Windows, and ARM (Raspberry Pi) works on every PR.

Planned capabilities

What the MVP will deliver.

LGB is in active development toward its first usable release. The features below represent the target MVP scope — bridging up to 10 PLCs with full bidirectional support.

Gateway

Native CIP communication

EtherNet/IP (CIP) driver via gologix with Multi-Service Packet batching for efficient PLC tag reads and writes.

OPC UA server

Bidirectional OPC UA server with namespace per PLC. Read and write PLC tags through the open OPC standard.

Sparkplug B Edge Node

MQTT Sparkplug B with NBIRTH/DBIRTH/DDATA/DCMD lifecycle. One Edge Node, multiple Devices — one per PLC.

Per-tag write ACLs

Every tag has an explicit writable flag. Writes from OPC UA and Sparkplug DCMD are gated — no accidental control.

Hot-reload connections

Add or remove a PLC connection without restarting the gateway. Changes apply immediately to all protocol servers.

Audit trail

Every PLC write and admin action persisted in SQLite. Full traceability for compliance and debugging.

Web UI

Tag mapping editor

Visual editor for mapping PLC tags to OPC UA nodes and Sparkplug metrics, with write ACL per tag.

PLC connection management

Add, configure, and monitor ControlLogix/CompactLogix PLCs from the browser. Live connection status.

Diagnostics dashboard

Real-time view of gateway health, PLC communication stats, and protocol server status.

Operations

Single binary CLI

lgb server / doctor / version — pure Go, no CGo, cross-compiled for Linux/Windows/macOS/ARM.

Docker Compose stack

Local dev environment with PLC simulator (plcsim) and MQTT broker — one command to start.

Backup & restore

Integrity-checked backups via restic with retention policies, schedules, and multi-repo support.

Quick start

Dev stack in four steps.

  1. 01
    Clone git clone https://github.com/fgjcarlos/lgb.git && cd lgb
  2. 02
    Configure secrets cp docker/.env.dev.example docker/.env.dev # edit and set LGB_AUTH_JWT_SECRET
  3. 03
    Start the stack make docker-up
  4. 04
    Verify health curl http://localhost:8080/health

See the README for full setup details including JWT secret generation.

Architecture

How it fits together.

         ┌───────────────────────────────────┐
         │           Web UI (React)          │
         └───────────────┬───────────────────┘
                    REST / WebSocket
         ┌───────────────▼───────────────────┐
         │           LGB Core (Go)           │
         │  PLC Manager ↔ Tag Store ↔ APIs   │
         └──┬──────────┬──────────┬──────┬───┘
            │          │          │      │
     ┌──────▼───┐  ┌───▼───┐  ┌──▼──┐  ┌▼──────┐
     │ Rockwell │  │ OPC   │  │MQTT │  │Restic │
     │   PLCs   │  │  UA   │  │Spark│  │Backup │
     │  (CIP)   │  │Server │  │plug │  │       │
     └──────────┘  └───────┘  └─────┘  └───────┘