Tia Openness Controlのロゴ

Tia Openness Control

コミュニティ
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.

概要

公開者huahaizo
リポジトリtia-portal-openness-ai
スキル名tia-openness-control
スター
81
フォーク
11
同梱ファイル
4
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    huahaizoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Tia Openness Control」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/huahaizo/tia-portal-openness-ai/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/huahaizo/tia-portal-openness-ai.git \
  .claude/skills/tia-openness-control
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでTia Openness Controlを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にTia Openness Controlを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Tia Openness Controlは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでTia Openness Controlを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Tia Openness Controlはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにTia Openness Controlをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/huahaizo/tia-portal-openness-ai/tree/mainを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Tia Openness Controlを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Tia Openness Controlで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもTia Openness Controlを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Tia Openness Control」は無料ですか?

huahaizoがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇