Skip to content

Import the WAGO PLC configuration from the CODESYS 2.3 export - #2

Merged
MathiasVDA merged 1 commit into
mainfrom
feat/wago-import
Oct 11, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
feat/wago-import

Conversation

@MathiasVDA

Copy link
Copy Markdown
Contributor

Requested by Mathias · project thread

Before: every PLC module, channel and variable had to be typed into devices.yaml and signals.yaml by hand.

After: drop the CODESYS PLC CONFIGURATION.EXP into the data folder and point settings.imports.wago.config at it. Each I/O module then shows up as a device named after its comment (DI 11 becomes plc-di11) with its four ports. Each named channel becomes a signal (PLC-SM_0_E2, "Voordeur", %IX6.9). A module's page lists every port with its PLC variable, the point it is linked to, its cables, or "spare". Imported channels that aren't linked to a point yet are grouped under "To check", and search finds them by PLC name or comment.

To link an imported signal to a point, or to add notes, write an entry with the same ID. Its fields are laid over the import, and ports are matched by name. The export is read on every load, so a re-export from CODESYS updates HAdoc without editing anything.

How

  • server/src/importers/wago.ts: a line-based parser for the export format, plus the mapping to HAdoc devices and signals. Default CODESYS channel comments ("Ch_3 Digital input") are dropped and real ones become the signal name.
  • load.ts: runs the configured imports, overlays hand-written records on imported ones, and reads every list from <name>.yaml plus <name>/*.yaml.
  • signals.schema.json: port is no longer required, so an overlay entry can be just id + point.
  • Device trace now includes ports. The details panel shows a port table, search covers unlinked signals, and issues are grouped per source.
  • The demo house now gets its PLC modules from a small export in examples/demo-house/imports/.

I tested against Mathias's real export, which is not committed: 59 modules, 232 ports and 186 signals, with no errors.

🤖 Generated with Claude Code

https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv


Generated by Claude Code

- Parser for PLC CONFIGURATION.EXP: one device per I/O module named
  after its comment, one port per channel, one signal per named channel
  with its IEC address; default channel comments are dropped
- settings.imports.wago points at the export; it is read on every load
- Hand-written records with the same ID are laid over imported ones
  (ports matched by name), so imported signals can be linked to points
- Every list can be split over <name>/*.yaml
- Device pages list their ports with signals, cables and spare ports;
  search finds unlinked PLC signals; issues are grouped per source
- Demo house uses a small export; README explains the workflow

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017KyUdSpsGYq6NV2mMmxJBv
@MathiasVDA MathiasVDA self-assigned this Oct 10, 2026
@MathiasVDA
MathiasVDA merged commit 415259d into main Oct 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants