# armagedongtx/iot-system-plc-data-to-influxdb architecture

> Architecture diagram of the GitHub repository armagedongtx/iot-system-plc-data-to-influxdb, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/armagedongtx/iot-system-plc-data-to-influxdb
- Repository: https://github.com/armagedongtx/iot-system-plc-data-to-influxdb

## Overview

The product reads configured Siemens PLC values and stores them in InfluxDB; the ConfigApp creates and edits the XML configuration that the collectors load. Linux runs per-PLC processes with interval-based acquisition, while Windows runs a synchronous Windows service. The README also documents Grafana visualization from InfluxDB. Source excerpts show configuration editing, PLC reads, database setup, and service/process control; some Linux write and scheduling details are omitted, so those links are supported by the README or left out where unverified.

Main entry points: [`Linux/InfluxConnector2.py`](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py) (Interval workers), [`Windows/InfluxConnector2.py`](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py) (PLC value reader), [`ConfigApp/ConfigApp.py`](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/ConfigApp/ConfigApp.py) (Config editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_configuration["Configuration"]
  node_config_app["Config editor<br/>[ConfigApp.py]"]
  node_xml_config["XML configuration"]
end

subgraph group_linux["Linux collector"]
  node_linux_loader["Config loader"]
  node_linux_groups["PLC groups"]
  node_linux_scheduler["Interval workers"]
  node_linux_reader["PLC value reader"]
  node_linux_encoder["Point encoder"]
  node_linux_db["Influx writer"]
end

subgraph group_windows["Windows collector"]
  node_windows_service["Windows service"]
  node_windows_loader["Config loader"]
  node_windows_groups["PLC groups"]
  node_windows_reader["PLC value reader"]
  node_windows_encoder["Point encoder"]
  node_windows_db["Influx writer"]
end

subgraph group_integrations["External systems"]
  node_plc["Siemens PLC"]
  node_influx[("InfluxDB")]
  node_grafana["Grafana"]
  node_systemd["systemd"]
end

node_operator(("Operator"))

node_operator -->|"edits settings"| node_config_app
node_config_app -->|"writes XML"| node_xml_config
node_xml_config -->|"loads settings"| node_linux_loader
node_xml_config -->|"loads settings"| node_windows_loader
node_linux_loader -->|"builds groups"| node_linux_groups
node_linux_groups -->|"starts workers"| node_linux_scheduler
node_linux_scheduler -->|"runs reads"| node_linux_reader
node_linux_reader -->|"reads values"| node_plc
node_linux_scheduler -->|"encodes points"| node_linux_encoder
node_linux_encoder -->|"prepares points"| node_linux_db
node_linux_db -->|"writes points"| node_influx
node_systemd -->|"starts collector"| node_linux_loader
node_windows_service -->|"loads configuration"| node_windows_loader
node_windows_loader -->|"builds groups"| node_windows_groups
node_windows_service -->|"updates groups"| node_windows_groups
node_windows_groups -->|"reads values"| node_windows_reader
node_windows_reader -->|"reads values"| node_plc
node_windows_reader -->|"encodes points"| node_windows_encoder
node_windows_encoder -->|"prepares points"| node_windows_db
node_windows_db -->|"writes points"| node_influx
node_influx -.->|"visualizes stored data"| node_grafana

click node_config_app "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/ConfigApp/ConfigApp.py"
click node_linux_loader "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_linux_groups "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_linux_scheduler "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_linux_reader "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_linux_encoder "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_linux_db "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py"
click node_windows_service "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"
click node_windows_loader "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"
click node_windows_groups "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"
click node_windows_reader "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"
click node_windows_encoder "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"
click node_windows_db "https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_config_app,node_xml_config toneBlue
class node_linux_loader,node_linux_groups,node_linux_scheduler,node_linux_reader,node_linux_encoder,node_linux_db toneAmber
class node_windows_service,node_windows_loader,node_windows_groups,node_windows_reader,node_windows_encoder,node_windows_db toneMint
class node_plc,node_influx,node_grafana,node_systemd toneRose
class node_operator toneIndigo
```

## Components

### Configuration

- [Config editor](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/ConfigApp/ConfigApp.py): `ConfigApp/ConfigApp.py`
- **XML configuration**

### Linux collector

- [Config loader](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`
- [PLC groups](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`
- [Interval workers](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`
- [PLC value reader](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`
- [Point encoder](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`
- [Influx writer](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Linux/InfluxConnector2.py): `Linux/InfluxConnector2.py`

### Windows collector

- [Windows service](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`
- [Config loader](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`
- [PLC groups](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`
- [PLC value reader](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`
- [Point encoder](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`
- [Influx writer](https://github.com/armagedongtx/iot-system-plc-data-to-influxdb/blob/master/Windows/InfluxConnector2.py): `Windows/InfluxConnector2.py`

### External systems

- **Siemens PLC**
- **InfluxDB**
- **Grafana**
- **systemd**

### Other components

- **Operator**

## Connections

- Operator → Config editor: edits settings (evidence: `README.md`)
- Config editor → XML configuration: writes XML (evidence: `ConfigApp/ConfigApp.py`)
- XML configuration → Config loader: loads settings (evidence: `Linux/InfluxConnector2.py`)
- XML configuration → Config loader: loads settings (evidence: `Windows/InfluxConnector2.py`)
- Config loader → PLC groups: builds groups (evidence: `Linux/InfluxConnector2.py`)
- PLC groups → Interval workers: starts workers (evidence: `Linux/InfluxConnector2.py`)
- Interval workers → PLC value reader: runs reads (evidence: `Linux/InfluxConnector2.py`)
- PLC value reader → Siemens PLC: reads values (evidence: `Linux/InfluxConnector2.py`)
- Interval workers → Point encoder: encodes points (evidence: `Linux/InfluxConnector2.py`)
- Point encoder → Influx writer: prepares points (evidence: `Linux/InfluxConnector2.py`)
- Influx writer → InfluxDB: writes points (evidence: `README.md`)
- systemd → Config loader: starts collector (evidence: `README.md`)
- Windows service → Config loader: loads configuration (evidence: `Windows/InfluxConnector2.py`)
- Config loader → PLC groups: builds groups (evidence: `Windows/InfluxConnector2.py`)
- Windows service → PLC groups: updates groups (evidence: `Windows/InfluxConnector2.py`)
- PLC groups → PLC value reader: reads values (evidence: `Windows/InfluxConnector2.py`)
- PLC value reader → Siemens PLC: reads values (evidence: `Windows/InfluxConnector2.py`)
- PLC value reader → Point encoder: encodes points (evidence: `Windows/InfluxConnector2.py`)
- Point encoder → Influx writer: prepares points (evidence: `Windows/InfluxConnector2.py`)
- Influx writer → InfluxDB: writes points (evidence: `Windows/InfluxConnector2.py`)
- InfluxDB → Grafana: visualizes stored data (evidence: `README.md`)
