Industrial Edge - Device API Connector
Overview
The Industrial Edge - Device API Connector is a comprehensive interface provided by Siemens for integrating and interacting with Edge Devices. Designed to facilitate seamless management, communication and control over Edge devices, this API enables developers to leverage the capabilities of Siemens Edge devices and integrate them into their applications and systems.
By offering a Mendix Connector, we enable out-of-the-box connectivity to edge devices, allowing users to manage their lifecycle directly from within the Mendix app.
For official API documentation, please visit: IE Device API Documentation
Documentation
https://docs.eu1.edge.siemens.cloud/apis_and_references/apis/ied/ied-api-2.0.0.html
Typical usage scenario
- User authentication and token retrieval for edge management
- Utilizing IIH Essentials on the device
- Managing sub-devices
- Connecting to IIH Essentials on another device
- Monitoring device status
- Sending notifications to the edge device or IE Management
Features and limitations
- Screenshot 1
- Features: statistics data, login, logout and notifications are implemented
- Limitations: activate IE Runtime, hard-reset and shutdown not implemented
- The specification is compatible starting from version 1.13 of the IE Runtime.
Dependencies
Ensure the following dependencies are installed from the Marketplace:
- Encryption Module
-
Make sure that you set an EncyrptionKey
Installation
- Add the IE Device API module to your project: Download the module from the Marketplace or use the starter template.
- Add the microflow “ASU_IEDeviceApi_Config”: Add this to your existing "after startup" microflow or create a new one and insert it. Configure this in the "Runtime" settings.
- Assign module roles: Match the module roles with the corresponding user roles.
- Add the IED certificate in the "Certificates" section of "App Settings" in Studio Pro to connect to your device locally from Studio Pro during development.
Usage Guide
Domain Model
The core entity in the domain model is the Device entity. Each Device object represents an edge device and consists of the following attributes:
[see screenshot]
Non-Persistent Entities
- DeviceConnection_NP: Necessary for data retrieval from IEM.
- Notification: Used for sending notifications to edge devices and IEM.
- DeviceMonitoring: Manages the retrieval of device resources.
Folder Structure
_USE_ME
This folder contains all the components you need for development:
- AfterStartup: Handles initial setup after startup.
- Configuration: Contains the device overview page for creating and setting up devices. Integrate these pages into your app’s navigation or include the snippet in your own logic.
- ErrorLogging: Basic microflows for error logging, which you can customize.
- Example: Example implementations for managing devices, user login/logout, sending notifications, and retrieving device resources. Check these out to understand how to use operation calls.
- IIHEssentialsIntegration: Contains a microflow for token decryption to simplify IIH Connector integration.
- Operations: Key microflows for this connector. All operations are available here and can be accessed via the Microflow Toolbox.
Private
This folder includes all the background logic. Modify these documents only in special cases.
Additional Information
- To connect to multiple edge devices, add the corresponding certificates to your docker-compose.yml.
Error Handling
Each operations microflow includes predefined error handling to check if an error response is received. Errors are logged in both cases. To further process errors, adjust the microflows in the _USE_ME -> ErrorLogging folder:
- Error_LogWithoutResponse
- Error_LogWithResponse
Happy coding! Enjoy seamless integration of Siemens Edge devices with the Mendix Connector.