cumulocity-simulator-setup
Instructions for setting up a robust Cumulocity device simulator with asset models and CSV-based data generation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Instructions for setting up a robust Cumulocity device simulator with asset models and CSV-based data generation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | cumulocity-simulator-setup |
| description | Instructions for setting up a robust Cumulocity device simulator with asset models and CSV-based data generation. |
This skill provides a standard pattern for creating Python-based simulators in Cumulocity.
All new device simulators should follow a standardized directory structure to ensure unified build and deployment scripts work out of the box.
<simulator-name>/
├── Dockerfile
├── cumulocity.json
├── requirements.txt
├── src/
│ ├── main.py # Primary entry point
│ └── cleanup.py # Script to delete generated test data
└── data/
├── asset_models/ # JSON definitions for asset models
├── devices/ # JSON configuration for devices
└── scenarios/ # CSV files containing simulation data
src/main.py for operation and src/cleanup.py for teardown.data/ directory, for example: os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "data").Asset models should follow the c8y_AssetDefinition type.
Organize models in the data/asset_models/ directory and register them in dependency order (Leaf nodes first, then Parents).
Apartment_Building).c8y_AllowedSubAssetDefinitions to establish the hierarchy.Use a configuration-driven approach for devices.
data/devices/*.json.c8y_Serial as the unique identifier in the Identity API.def get_device_id(serial):
url = f"{C8Y_BASEURL}/identity/externalIds/c8y_Serial/{serial}"
resp = requests.get(url, auth=auth)
return resp.json()['managedObject']['id'] if resp.status_code == 200 else None
Simulators should use CSV files for realistic data patterns stored in data/scenarios/ (e.g., weekday.csv, weekend.csv).
pandas for efficient loading.Minute or Timestamp column.Always use environment variables for credentials:
C8Y_BASEURLC8Y_TENANT / C8Y_USER / C8Y_PASSWORDpython:3-slim, copy src/ and data/ directories, install pandas and requests. Set CMD [ "python", "-u", "./src/main.py" ].ROLE_MEASUREMENT_ADMIN and ROLE_INVENTORY_ADMIN.REST API documentation and guidance for interacting with the Cumulocity AI service. Use when sending messages to the AI agent.
Multi-scope expert for Cumulocity IoT. Accesses live OpenAPI specs for Core API and Digital Twin Manager (DTM).
Setup the local testing environment for Cumulocity applications to test UI and microservices.
Critical implementation patterns for building Cumulocity microservices that act as MCP (Model Context Protocol) servers. Use when developing MCP servers.
Guidelines for developing microfrontends, plugins, and blueprints in Cumulocity, including manifest configuration and package structure. Use when working with microfrontends.
Guidelines for what needs to be ensured if you want to create a new open source repository in the Cumulocity organization.