IIH Essentials REST API Example - Asset Hierarchy Sample App

Content Type: Sample
Categories: Internet-of-Things,Data

Overview

IIH Essentials (Data Service) connects the plant with the app. All data collected from Shopfloor is transmitted to IIH Essentials (Data Service) and can be stored there in a structured manner. The different connectors (e.g. S7 Connector in Industrial Edge or Open Pipe in the Unified Comfort Panel) can serve as data source.

IIH Essentials (Data Service) represents a centrally usable element for structuring and storing data that can be used by other Edge apps via the API interface so that they do not have to implement their own data management. Functions such as aggregations, data management and structuring are available. Each node in the structure is designated as an asset and helps structure the machines into different areas. Based on the structure, it is easier to make specific data available for all higher-level apps, such as Performance Insight, or other, even user-developed apps.

Data Service REST Example shows the capability that Mendix developers can get data from Data Service interface, it obtains the information such as Asset Model, historical data through REST API exposed by Data Service.

For IIH Essentials support, please refer to IIH Essentials (Data Service) for Industrial Edge.

For more examples, please refer to Industrial Edge.

Documentation

Description

IIH Essentials (Data Service) connects the plant with the app. All data collected from Shopfloor is transmitted to Data Service and can be stored there in a structured manner. The different connectors (e.g. S7 Connector in Industrial Edge or Open Pipe in the Unified Comfort Panel) can serve as data source.

IIH Essentials (Data Service) represents a centrally usable element for structuring and storing data that can be used by other Edge apps via the API interface so that they do not have to implement their own data management. Functions such as aggregations, data management and structuring are available. Each node in the structure is designated as an asset and helps structure the machines into different areas. Based on the structure, it is easier to make specific data available for all higher-level apps, such as Performance Insight, or other, even user-developed apps.

Data Service REST Example shows the capability that Mendix developers can get data from Data Service interface, it obtains the information such as Asset Model, historical data through REST API exposed by Data Service.

Typical usage scenario

Created a reusable module in this example to show Asset Hierarchy Model and historical data from Data Service REST API.

User can follow this example to create an app from requirement and obtain the data from shopfloor by Data Service.

Integrate 3D viewer widget to virtualize Asset Hierarchy data. User can get time series data of variables by clicking meshes which have been mapped with 3D model.

Features and limitations

v1.0.0

Obtain Asset Model and historical data from Data Service REST API.

Configure Data Service address on the configuration page when example app starts up.

v1.1.0

Integrate 3D viewer widget to virtualize Asset Hierarchy data.

Add a module to configure IIH Essentials (Data Service) endpoint and all modules depend on this configuration.

Add feedback function.

Reduce time cost for time serials data .

Reduce useless operations for data.

Optimize entity from persistent to non-persistent.

The mapped data will not be updated or deleted automatically after the Asset Hierarchy data synced with IIH Essentials server. Please use “refresh” button to do the synchronization.

Only asset of Asset Hierarchy data can be selected in 3D viewer and time series data of variables under this asset will be shown at right of the page.

V1.2.0

  • Display data panels on 3D scene.
  • Use Timer widget to get the data of Asset.
  • Added user role management, two roles as following.
    • Administrator: Configure IIH Essentials (Data Service) service endpoint, upload 3D file and configure mapper.
    • ShopFloor Maintainer: View 3D scene which is configured by Administrator.

Dependencies

Installation

Download from Mendix Marketplace and directly use it as your example app.

Configuration

v1.1.0

Entities in 'Integrate3d' Module which can be used in microflow:

  • AssetTreeNode entity: 3D viewer tree data.
    • title: Asset Hierarchy node name (assetName/aspectName/variableName).
    • key: Asset Hierarchy node id.
    • iconUrl: 3D viewer tree’s icon Integrate3dView Module -> Const.
    • disable: whether the tree node can be selected (boolean).
  • FileEntity entity: Store 3DViewer’s 3D file (gltf/obj/3mf/stl/fbx/dae).
  • AssetMeshMapper entity: Store mapper information for 3DViewer which is between 3D model and Asset Hierarchy Model.

Setting Module:

  • Validate IIH Essentials (Data Service) endpoint if it is correct or not. To change service path, please do it and following: SettingModule -> Const -> TestPath.

v1.2.0

TagConfig entity:

  • name: mesh name
  • element: style of data panel (HTML format)
  • elementId: mesh id
  • assetName: asset name
  • assetId: asset id

The life cycle of the TagConfig is accompanied by mapper, it will be stored to Entity after mapper is created and be deleted automatically after the mapper is deleted. Developer can modify display styles of data panel by modifying element attribute.

User role management:

There are two roles in 'App Security -> Demo users', 'demo_administrator' as 'Administrator' role and 'demo_user' as ShopFloor Maintainer role.

Releases

Version: 1.2.0
Framework Version: 9.15.1
Release Notes: • The data panel is displayed on the mesh which is related to Asset. Developer can customize the style of the data panel, please refer Configuration part as reference. • Added Entity “TagConfig” to store information of data panel. • Added Timer widget to get the data of Asset. • Deleted Entity “Mapper”, mapper data will be stored in 3D file instead. • Added user role management.
Version: 1.1.0
Framework Version: 9.15.1
Release Notes: Integrate 3D viewer widget to virtualize Asset Hierarchy data. User can get time series data of variables by clicking meshes which have been mapped with 3D models. • Get Asset Hierarchy data from IIH Essentials (Data Service) • Pass Asset Hierarchy data to 3D viewer widget. • Set mapper with 3D model meshes. Add IIH Essentials (Data Service) service endpoint. • Add a module to configure IIH Essentials (Data Service) endpoint and all modules depend on this configuration.
Version: 1.0.0
Framework Version: 9.15.1
Release Notes: Created the domain model and mapping based on Data Service REST API and created microflows to obtain real-time data from Data Service. Created Asset Hierarchy and Time series Chart to support Asset Model and historical data from Data Service.