Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudFoxx committed Sep 13, 2024
2 parents f5f9c58 + cd00a6d commit 802709b
Show file tree
Hide file tree
Showing 12 changed files with 36 additions and 67 deletions.
2 changes: 1 addition & 1 deletion Dashboard_getting_started/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Now create a second tab called *Detail* with only one group named *Events*. We w
# Designing the Dashboard:
In this chapter, we will bring some life and functionality to our Overview dashboard. This tutorial is designed to build all elements from scratch and simultaneously show the logic behind a VFC dashboard. Some steps might be overcomplicated with the purpose of demonstrating several VFC nodes.

> If you just want to check out the final result, you can copy paste the [Json Flow Data From Here](./Resources/Dashboard.json). It will import all elements, including nodes, tabs and groups. Remember to adjust all *read-timeseries* and *write-timeseries* nodes to your own assets.
> If you just want to check out the final result, you can copy paste the [Json Flow Data From Here](./Resources/IMPORT_Dashboard.json). It will import all elements, including nodes, tabs and groups. Remember to adjust all *read-timeseries* and *write-timeseries* nodes to your own assets.
For the beginning, we will place three *text* nodes and three *button* nodes in the flow. This will be our Asset selector, where each machine has it's own button like below:

Expand Down
5 changes: 3 additions & 2 deletions DataLake_provideAccessToken/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ This small flow triggers sets up an API endpoint which can be called from extern
The function delivers the body for the API request against the `/api/datalake/v3/generateAccessToken` endpoint. From here, the Access Token is provided and feedback to the user via the `http`-Node

## Result
Once the API endpoint is accessed, the user is presented with a JSON respose containing the Access Token for IDL.
This can then be used in native S3-Tools to be worked with and connect to the IDL:
Once the API endpoint is accessed, the user is presented with a JSON response containing the Access Token for IDL.
This can then be used in native S3-Tools to be worked with and connect to the IDL:
<!-- markdown-link-check-disable-next-line -->
In this example, calling the full API endpoint https://presiot-visualflowcreatorhttp.eu1.mindsphere.io/public/presiot/getAccessTokenForIDL?key=1a03090a3cc44d56c57d5cd7d545899219523b5127079317fcc2c637b3a0cab23cc1fcadce75196b36f761428e6ee80dacc64e4349928b23a2cf8e0e6495b897 results in a JSON response like shown below.
![image](./doc/result_IDL_AccessToken.png)

Expand Down
38 changes: 19 additions & 19 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
<!-- @format -->

# MindSphere Development License Agreement
# Development License Agreement

December 2018
April 2023

This Development License Agreement (the “License”) stipulates the rights that Siemens AG, Germany (“Siemens”) grants to you (“you”) in receipt of certain development material in relation to MindSphere (the Platform). This material may include software, sample code, scripts, libraries, software development kits, technology, documentation, and other proprietary material or information (collectively, the “Licensed Material”).
This Development License Agreement (the “License”) stipulates the rights that Siemens AG, Germany (“Siemens”) grants to you (“you”) in receipt of certain development material in relation to Insights Hub and Industrial IoT offerings (the "Platform"). This material may include software, sample code, scripts, libraries, software development kits, technology, documentation, and other proprietary material or information (collectively, the “Licensed Material”).
Siemens retains the right to utilize its affiliated companies in pursuing any of its rights and fulfilling any of its obligations under this License. Therefore, the term “Siemens” as used herein may also refer to affiliated companies that are directly or indirectly owned or controlled by the ultimate parent company of Siemens AG and who have been authorized by Siemens AG to distribute the Licensed Material.

## 1. Proprietary Rights in the Licensed Material
## 1. Proprietary Rights in the Licensed Material

All rights, title, interest and know-how in and to the Licensed Material, any part and improvement thereof and all intellectual property rights in or to the foregoing, other than those rights expressly granted in this License, shall remain wholly vested in Siemens or its third party business partners and/or licensors.

## 2. License Grant
## 2. License Grant

If you have entered a separate commercial license agreement with Siemens that covers the Licensed Material, such license agreement shall prevail and this License shall not apply.
You must accept this License to use the Licensed Material. If you use the Licensed Material, any such use shall constitute acceptance of this License. The Licensed Material is licensed, not sold.
Subject to the terms and conditions of this License, Siemens grants you a non-exclusive, worldwide, royalty-free, non-transferable right to:

- publish, modify and create derivative works of small source code examples (no longer than 50 lines of code) contained in Licensed Material,
- integrate and publish Licensed Material in software that interoperates with the Platform, e.g. by transmission of data between applications, devices, systems or equipment and the Platform (hereinafter referred as “Customizations”), and license such Customizations to third parties to enable your offering of services relating to the Platform,
- use, run and copy Licensed Material for your own internal use, and
- sublicense Licensed Material to a service provider for the purposes of this section.
* publish, modify and create derivative works of small source code examples (no longer than 50 lines of code) contained in Licensed Material,
* integrate and publish Licensed Material in software that interoperates with the Platform, e.g. by transmission of data between applications, devices, systems or equipment and the Platform (hereinafter referred as “Customizations”), and license such Customizations to third parties to enable your offering of services relating to the Platform,
* use, run and copy Licensed Material for your own internal use, and
* sublicense Licensed Material to a service provider for the purposes of this section.

You shall not:

- use the Licensed Material for any other technology than the Platform, or
- use the Licensed Material to abuse the Platform, or to compromise its integrity or security, or
- disassemble or reverse-engineer any Licenses Material provided in object-code format, unless such action is permitted by an applicable Open Source license or the law that applies to you, or
- remove or modify Siemens copyright, patent, trademark or attribution notices in the Licensed Material.
* use the Licensed Material for any other technology than the Platform, or
* use the Licensed Material to abuse the Platform, or to compromise its integrity or security, or
* disassemble or reverse-engineer any Licenses Material provided in object-code format, unless such action is permitted by an applicable Open Source license or the law that applies to you, or
* remove or modify Siemens copyright, patent, trademark or attribution notices in the Licensed Material.

## 3. Feedback
## 3. Feedback

If you provide Siemens with feedback regarding the Licensed Material, you grant Siemens a non-exclusive, worldwide, royalty-free and perpetual right to use, copy, modify, distribute, and sublicense any such feedback in any way.

## 4. Open Source Software
## 4. Open Source Software

The Licensed Material may contain third-party software, including Open Source Software (“OSS”). If required, Siemens will furnish a notice file with the Licensed Material. To the extent the licenses terms applicable to such OSS are in contradiction to this License, the OSS license conditions shall prevail.

## 5. Responsibility for Use of the Licensed Material and Customizations
## 5. Responsibility for Use of the Licensed Material and Customizations

Except any liability directly caused by Siemens violating its obligations under this License, you are responsible for the use of the Licensed Material (and all consequences arising therefrom), regardless of whether the use is undertaken by you, your employees or any third parties. You will ensure that the use of the Licensed Material by you, your employees or your customers complies with your obligations under this License. Should you become aware of any violation of your obligations under this License, you will (i) immediately inform Siemens thereof in reasonable detail and (ii) cease to use the Licensed Material.
You are responsible for (i) properly integrating the Licensed Material into your Customizations, (ii) configuring and testing any Customization and making sure that a Customization is able to connect to and/or interoperate with the Platform, (iii) regular testing and monitoring of integrity, accuracy and timeliness of data transmission through a Customization (e.g. by monitoring over the Platform), (iv) the security of a Customization, and (v) the security of your and your customer’s system, any third party system or any data stored on such systems.
You are responsible for the integrity, accuracy and timeliness of the exchange of data between a Customization and the Platform. Nothing in this License shall in any way constitute or be communicated by you or your customers to be an endorsement from us of a Customization in which you implemented the Licensed Material.

## 6. Warranty, Liability and Indemnification
## 6. Warranty, Liability and Indemnification

SIEMENS PROVIDES THE LICENSED MATERIAL FREE OF CHARGE AND THEREFORE “AS IS” WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. ANY STATEMENTS OR REPRESENTATIONS ABOUT THE LICENSED MATERIAL AND ITS RESPECTIVE FUNCTIONALITY IN THE LICENSED MATERIAL CONSTITUTE MERELY TECHNICAL INFORMATION AND ARE NEITHER A GUARANTEE NOR A WARRANTY. SIEMENS IS NOT AWARE THAT THE LICENSED MATERIAL VIOLATES ANY THIRD PARTY RIGHTS IF USED IN ACCORDANCE WITH THE LICENSE. FURTHERMORE, SIEMENS DOES NOT WARRANT THAT THE LICENSED MATERIAL IS FAIL-SAFE, FAULT-TOLERANT, ERROR-FREE OR THAT ANY DATA TRANSMITTED THROUGH THE LICENSED MATERIAL OR A CUSTOMIZATION WILL BE SECURE OR NOT OTHERWISE LOST OR DAMAGED.
Siemens disclaims all liability for all damages of any kind irrespective of the legal ground in relation to the Licensed Material. However, nothing in this License shall exclude or limit Siemens’ liability in case of death or personal injury of any person, or in case of our willful misconduct, gross negligence, fraud or fraudulent misrepresentation. Any limitations of liability set forth in this License shall also apply for the benefit of Siemens’ subcontractors, employees, directors, agents or any other person acting for Siemens.
You agree to indemnify, defend, and hold Siemens harmless from and against all losses, expenses, damages and costs, including reasonable attorneys’ fees, resulting from or arising out of any violation of this License by you or any other person you provided with the Licensed Material, regardless of your knowledge, including any claim, proceeding, action, fine, loss, cost and damages arising out of or relating to any non-compliance with export control regulations.

## 7. Term and Termination, Updates
## 7. Term and Termination, Updates

If Siemens reasonably determines that you are breaching this License and you fail to remediate such breach without undue delay, Siemens may suspend or terminate your Platform access temporarily or permanently and terminate this License at its sole discretion.
Siemens may, at its sole discretion, make available updates or security patches for the Licensed Material. Outdated versions of the Licensed Material may not be able to connect to and/or interoperate with the Platform.

## 8. Applicable Law
## 8. Applicable Law

This License shall be governed by and construed in accordance with the laws of Switzerland, without giving effect to any choice-of-law rules that may require the application of the law of another jurisdiction. The UN Convention on Contracts for the International Sale of Goods shall not apply.
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Insights Hub Visual Flow Creator Examples

[![The MDL License](https://img.shields.io/badge/license-MDL-009999.svg?style=flat)](./LICENSE.md)
[![Documentation](https://img.shields.io/badge/mindsphere-documentation-%23009999.svg)](https://opensource.mindsphere.io/docs/mindconnect-nodejs/index.html)
[![Forum](https://img.shields.io/badge/mindsphere-community-%23009999.svg)](https://community.plm.automation.siemens.com/t5/Developer-Space/bd-p/MindSphere-platform-forum)

Expand Down Expand Up @@ -40,17 +39,12 @@ Please note, that the json-files are exported from another tenant. So their migh
| [Virtual machine simulator](./virtualMachineSimulator/readme.md) | | :star: | - |
| [Write location data to your Asset](./WriteLocationToAsset/readme.md) | Write locational information directly to your Asset using the Asset Management API | :star: | - |
| [VFC Dashboard - Getting Started Guide](./Dashboard_getting_started/readme.md) | Create a dynamic Dashboard completely from scratch and learn the basics of VFC Dashboarding | :star: | - |

### Examples which have to be added:
| Name | Description | Complexity Rating | Prerequisites |
| --- | --- | --- | --- |
| [TODO: Integrate external API](./integrateExternalApi/readme.md) | | :star: | |
| [TODO: Dashboard with dynamic data layer](./dynamicDashboards/readme.md) | | :star: :star: | |
| [Integrate external API](./integrateExternalApi/readme.md) | | :star: | |

You can add here your ideas or requests for further examples.

### Example template
You want to create your own example? Just copy the [template flow-directory](./templateFlow/), adapt it and send us your pull request.
You want to create your own example? Just copy an existing folder, adapt it and send us your pull request.
## Remarks
Please note that the screenshots show just the current state, when these examples have been created. They might differ to the latest software release.

Expand Down
2 changes: 1 addition & 1 deletion commandMqttDevice_MindConnect/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Commanding can be initiated via a dedicated API. Here we will use VFC to initiat
A dedicated commanding node was added to the standard nodes of Visual Flow Creator.
https://documentation.mindsphere.io/MindSphere/apps/visual-flow-creator/mindconnect-nodes.html#command-mindconnect

Manual confuguration towards the API endpoint for commanding is no longer needed but still shown in depth in the description below.
Manual configuration towards the API endpoint for commanding is no longer needed but still shown in depth in the description below.
With "MindConnect" nodes, you can send a command to MindConnect MQTT device and check the status of the sent command. For more information about MindConnect Elements, refer to [Connectivity](https://documentation.mindsphere.io/MindSphere/connectivity/overview.html).


Expand Down
6 changes: 3 additions & 3 deletions createCustomEndpoint/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The example shows how you can
- choose who has access to this endpoint (only users of the flow, all users on the tenant, public access)
- develop the API functionality using VFC nodes

This flow demonstrates a simple getting-started example on how to provide machine data via an API for external access of the last 15min intervall of machine data as JSON object.
This flow demonstrates a simple getting-started example on how to provide machine data via an API for external access of the last 15min interval of machine data as JSON object.
![image](./doc/createCustomEndpoint.png)


Expand All @@ -20,7 +20,7 @@ This flow demonstrates a simple getting-started example on how to provide machin
- generate key in case of public API access
- the URL shown in the node setup is the direct URL to access the service
![image](./doc/setup_KeyGeneration.png)
3. Selet an Asset / Aspect / Variable(s) where you want to read the time series data from (yellow node)
3. Select an Asset / Aspect / Variable(s) where you want to read the time series data from (yellow node)
![image](./doc/setup_selectAssetToRead.png)
4. Save the flow

Expand All @@ -31,7 +31,7 @@ https://[TenantName]-visualflowcreatorhttp.eu1.mindsphere.io/public/presiot/mach

## Result

When querying the service URL e.g. via a Browser/Postman/Pyhton/... the JSON-object with the timeseries data will be received.
When querying the service URL e.g. via a Browser/Postman/Python/... the JSON-object with the timeseries data will be received.
![image](./doc/result.png)


Expand Down
Binary file removed createDashboardForFleetManager/doc/example.png
Binary file not shown.
17 changes: 0 additions & 17 deletions createDashboardForFleetManager/readme.md

This file was deleted.

1 change: 0 additions & 1 deletion createDashboardForFleetManager/template.json

This file was deleted.

4 changes: 2 additions & 2 deletions generateSampleData/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ With this example you are able to do that.
![image](./doc/generateSampleData.png)

- Import the flow in Visual Flow Creator
- Selet an asset / aspect / variable where you want to write time series data
- Doubleclick on the datatype node like `Integer` and rename the `Parameter out` value with the name of your data variable
- Select an asset / aspect / variable where you want to write time series data
- Double click on the datatype node like `Integer` and rename the `Parameter out` value with the name of your data variable
- Save the flow
- Trigger the flow
4 changes: 2 additions & 2 deletions integrateExternalApi/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ The example here demonstrates consuming a service from [OpenWeathermap](https://

- The inject node passes the `CITY` and `API_KEY` information to HTTP Request node through `msg` object.
- (**Get Weather**) node is the HTTP Request node and it contains the URL with query parameters.
- This node performs the substitution of variables with the values it recieves from the inject node.
- This node performs the substitution of variables with the values it receives from the inject node.
- Then HTTP request node fetches the data synchronously from Openweather service endpoint.
- It converts the recieved response to JSON format and sets it as value for the payload field of the msg object.
- It converts the received response to JSON format and sets it as value for the payload field of the msg object.
- Debug node in the end displays the contents of payload field to the debug window.

## Attachements
Expand Down
14 changes: 3 additions & 11 deletions virtualMachineSimulator/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ It can be used if no physical assets are available or to learn about the feature
![image](./doc/virtualMachineSimulator.png)

## Prerequisites
- access to Asset-Managment
- access to Asset-Management

## Setup & Configuration
### Setup machine asset
Expand All @@ -27,23 +27,15 @@ e.g. `my virtual machine`
2. Open the settings for the **upper** write-timeseries node select the previously generated asset instance `my virtual machine` and aspect `machine_states`. Do not select any variables.
![image](./doc/VFC_setup_Asset-Aspect.png)
4. Repeat this for the **lower** write-timeseries node and select `my virtual machine` -> `product_counter`. Do not select any variables.
5. Adjust the execution intervall for the simulation as desired in the link-in node.
5. Adjust the execution interval for the simulation as desired in the link-in node.
6. Save the flow

:cloud: :heavy_check_mark: You're done, your machine simulation is now running - enjoy!


## Result
After saving the flow, the output of the simulation is written to the asset and you can monitor the results e.g. in Fleet Manager. Based on this you can also now start calculating the machine KPIs (OEE, Availability, Quality, ...) using the VFC or other apps.
After saving the flow, the output of the simulation is written to the asset and you can monitor the results e.g. in Insights Hub Monitor. Based on this you can also now start calculating the machine KPIs (OEE, Availability, Quality, ...) using the VFC or other apps.
![image](./doc/FleetManager_Results.png)

## See also
- [Asset Manager Documentation](https://documentation.mindsphere.io/resources/html/asset-manager/en-US/index.html)








0 comments on commit 802709b

Please sign in to comment.