Logo: Tia Openness Control

Tia Openness Control

Communautéit
huahaizo
tia-openness-control

Build, review, and run Siemens TIA Portal Openness automations that let any AI-assisted workflow control TIA Portal projects through the official Siemens.Engineering .NET API. Supports TIA Portal V15 through V21, including automatic installed-version detection. Use when the user asks to automate BoTu/TIA Portal operations, generate C# or PowerShell wrappers for Openness, open/create/modify/compile/export/import/archive TIA projects, inspect PLC/HMI/hardware objects, or design a safe AI-to-TIA command layer.

Iwwersiicht

Editeurhuahaizo
Repositorytia-portal-openness-ai
Skill-Nummtia-openness-control
Stären
81
Forks
11
Matgeliwwert Dateien
4
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 4 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    huahaizo huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Tia Openness Control an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/huahaizo/tia-portal-openness-ai/tree/main
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huahaizo/tia-portal-openness-ai.git \
  .claude/skills/tia-openness-control
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Tia Openness Control an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Tia Openness Control automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Tia Openness Control net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

TIA Openness Control

Mission

Use TIA Portal Openness as the execution boundary: any AI proposes structured actions, generated .NET code performs them through Siemens.Engineering, and every destructive or plant-impacting operation is explicit, logged, and reviewable.

Workflow

  1. Identify the project path and exact operation. Detect the installed TIA Portal version automatically when the user does not specify one.
  2. Confirm prerequisites: Windows host, TIA Portal V15 through V21 installed, user in the Siemens TIA Openness Windows group, Openness enabled, project backed up, and matching PublicAPI path. For first-time setup, instruct the user to add the Windows account to that group with administrator rights, then sign out and back in.
  3. Choose execution mode: WithUserInterface for exploratory/debug work, WithoutUserInterface for repeatable batch work.
  4. Generate or modify a C# .NET controller. Use scripts/new-openness-controller.ps1 to scaffold a starter controller when useful.
  5. Keep AI commands declarative, such as JSON/YAML action plans, and map them through a whitelist. Do not execute arbitrary prompt text as code.
  6. Run read-only or dry-run behavior first; then write only the requested target objects.
  7. Capture stdout, stderr, exit code, active project path, and log file path for every run.
  8. Verify results by reading the project back through Openness. Do not claim success from exit code, file timestamp, or "no exception" alone.
  9. Save or archive the project and report changed objects, warnings, and compile diagnostics.

Universal AI Interface

Keep this skill usable by any AI agent or automation runner:

  • Describe actions as plain JSON/YAML command documents.
  • Generate ordinary PowerShell, C#, .csproj, and CLI commands.
  • Avoid product-specific hidden state, proprietary prompt features, or assumptions about a single AI runtime.
  • Make every generated controller runnable by a human from a terminal.
  • Return machine-readable results when possible so another AI can continue from logs.

Example command document:

json
{
  "tiaVersion": "auto",
  "projectPath": "D:/Projects/Line1.ap20",
  "mode": "WithUserInterface",
  "dryRun": true,
  "actions": [
    { "type": "ListDevices" }
  ]
}

Version Support

Support TIA Portal V15, V15.1, V16, V17, V18, V19, V20, and V21.

When scaffolding a controller, prefer automatic detection:

powershell
powershell -ExecutionPolicy Bypass -File .\scripts\new-openness-controller.ps1 -OutputPath . -ProjectName TiaOpennessController

The script scans C:\Program Files\Siemens\Automation\Portal V*\PublicAPI\V* and selects the highest supported installed version. Use -TiaVersion V17 or -TiaVersion V15_1 only when the user explicitly wants a specific version.

Safety Rules

  • Never connect to a PLC, download to a device, change online state, or alter production hardware without explicit user approval.
  • Prefer offline project edits and generated source import/export.
  • Before writes, create a .zap archive or duplicate project folder when TIA Portal supports the workflow.
  • Pin Siemens.Engineering.dll to the detected or selected TIA Portal version; do not mix assemblies and runtime versions.
  • Set Siemens Engineering assembly references to Copy Local = false, or load them from PublicAPI at runtime.
  • Treat block names, device names, file paths, credentials, project libraries, and know-how protected content as user data.

First-Time Windows Group Setup

If the current Windows account is not in the Siemens TIA Openness group, tell the user to run an elevated PowerShell session and execute:

powershell
net localgroup "Siemens TIA Openness" "$env:USERNAME" /add

After adding the account, the user should sign out and sign in again, or restart Windows, before running Openness automation.

Common Tasks

  • Open, create, save, close, or archive a project.
  • Enumerate devices, PLC software, blocks, external sources, tag tables, HMI objects, and libraries.
  • Import/export PLC blocks, tag tables, libraries, and hardware descriptions as source/XML files.
  • Generate SCL/LAD/FBD source files, then import them through Openness.
  • Compile software or hardware and summarize diagnostics.
  • Start TIA Portal, use a visible UI session, or attach to an existing Openness process when the local version supports it.

Implementation Patterns

Read references/openness-patterns.md when generating C# code, planning an AI command schema, or troubleshooting assembly loading/version problems.

Critical assembly-loading rule: keep Main as a clean bootstrap that does not reference any Siemens.Engineering types. Register AssemblyResolve, preload Siemens.Engineering.dll, then call the real Openness logic in a separate [MethodImpl(MethodImplOptions.NoInlining)] method or class. If Main directly uses TiaPortal, TiaPortalMode, Project, or an Options property typed as TiaPortalMode, .NET Framework can throw FileNotFoundException before the resolver is registered.

When another AI or user reports FileNotFoundException at Program.Main, replace the generated controller with the current scaffold from scripts/new-openness-controller.ps1 before attempting feature work. Do not keep patching a controller whose Main directly references Siemens types.

For device creation tasks, require a read-back verification step such as ListDevices after saving and reopening the project. If the target order number, device type identifier, or catalog version is unknown for the installed TIA version, inspect/export an existing matching device or ask the user for the exact catalog item instead of guessing.

For Chinese users, read README.md when user-facing guidance is needed.

Use official Siemens documentation for exact version-specific APIs. Useful starting points:

Output Expectations

When helping a user, provide:

  • the exact command or C# project to run,
  • detected TIA Portal version, PublicAPI path, and project path,
  • the list of operations the automation will perform,
  • stdout, stderr, and exit code from the last automation run,
  • validation steps and expected diagnostics,
  • read-back evidence for created or modified objects,
  • any operation that still needs manual confirmation inside TIA Portal.

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Tia Openness Control?

Build, review, and run Siemens TIA Portal Openness automations that let any AI-assisted workflow control TIA Portal projects through the official Siemens.Engineering .NET API. Supports TIA Portal V15 through V21, including automatic installed-version detection. Use when the user asks to automate BoTu/TIA Portal operations, generate C# or PowerShell wrappers for Openness, open/create/modify/compile/export/import/archive TIA projects, inspect PLC/HMI/hardware objects, or design a safe AI-to-TIA command layer.

Firwat Tia Openness Control op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Tia Openness Control besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Tia Openness Control an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/huahaizo/tia-portal-openness-ai/tree/main an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Tia Openness Control benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Tia Openness Control benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Tia Openness Control domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Tia Openness Control gratis?

huahaizo huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇