Skip to content

Commit

Permalink
Rebranding and Refactorign
Browse files Browse the repository at this point in the history
+ changed naming from MindSphere >> Insights Hub
+ updated MindConnect MQTT commanding example
- removed legacy Flows (MindConnect IoT Extension, Trend-Prediction)
  • Loading branch information
CloudFoxx committed Nov 14, 2023
1 parent 820208a commit d4019da
Show file tree
Hide file tree
Showing 25 changed files with 206 additions and 893 deletions.
12 changes: 6 additions & 6 deletions Dashboard_getting_started/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# VFC Dashboard - A Getting Started Example:
This example will guide you step by step through the VFC Dahsboard functionalities. You will create a simple but interactive dashboard that shows the status of your three (simulated) machines that you already connected to MindSphere. You will learn the essential nodes for dashboarding with the VFC and will be able to extend your dashboard according to your own needs. The Dashboard you create will look like this:
This example will guide you step by step through the VFC Dahsboard functionalities. You will create a simple but interactive dashboard that shows the status of your three (simulated) machines that you already connected to Insights Hub. You will learn the essential nodes for dashboarding with the VFC and will be able to extend your dashboard according to your own needs. The Dashboard you create will look like this:

![dashboard_image](./doc/overview.png)

Expand All @@ -10,7 +10,7 @@ This tutorial is meant to start from scratch. You will set up your Assets, gener
- Visual Flow Creator
- Asset Manager
- basic Javascript knowledge is helpful, but not required
> All required applications and resources are part of a [Start for free](https://siemens.mindsphere.io/en/start) tenant. You can follow this tutorial along regardless of your MindSphere package.
> All required applications and resources are part of a [Start for free](https://siemens.mindsphere.io/en/start) tenant. You can follow this tutorial along regardless of your Insights Hub package.
> This tutorial is designed for beginners. However, some fundamental knowledge about the VFC will make your learning journey more enjoyable. Learn the basics [Here](https://documentation.mindsphere.io/resources/html/visualflow-creator/en-US/index.html).
Expand All @@ -20,7 +20,7 @@ We will simulate three different versions of an industrial machine:
- Performance
- Eco

This step requires you to be familiar with MindSphere's asset structure and that you can create new aspects, assets and asset types. If this sounds like a big headache to you, please visit the [Asset Manager Tutorial](https://siemens.mindsphere.io/en/docs/tutorials/asset-manager) first.
This step requires you to be familiar with Insights Hub's asset structure and that you can create new aspects, assets and asset types. If this sounds like a big headache to you, please visit the [Asset Manager Tutorial](https://siemens.mindsphere.io/en/docs/tutorials/asset-manager) first.

If not, please follow the [Setup Instructions](./Setup/readme.md) and come back once you completed the process.

Expand Down Expand Up @@ -227,7 +227,7 @@ Try these new functionalities in your own dashboard. If you click on a machine,

https://user-images.githubusercontent.com/90254123/166253526-9b203cf0-5e0d-42ab-9dd6-360943efe8bd.mp4

Let's take a short summary. As a VFC user you have already visualized your three assets, their location and status. Now you want to take things to the next level. Imagine beeing a machine Operator, who wants to report a critical machine failure as quickly as possible directly from the dashboard. Furthermore, you want to be able to navigate to your machine and see what happened. MindSphere offers a functionality that supports our idea, it' called **events**. So let's implement events in our dashboard. But we have to do something else first. The logic of our flow needs to know which machine is actually selected. We need to store some kind of indicator which machine is selected and we can do it in two different ways:
Let's take a short summary. As a VFC user you have already visualized your three assets, their location and status. Now you want to take things to the next level. Imagine beeing a machine Operator, who wants to report a critical machine failure as quickly as possible directly from the dashboard. Furthermore, you want to be able to navigate to your machine and see what happened. Insights Hub offers a functionality that supports our idea, it' called **events**. So let's implement events in our dashboard. But we have to do something else first. The logic of our flow needs to know which machine is actually selected. We need to store some kind of indicator which machine is selected and we can do it in two different ways:
1. By sending the machine directly as *msg.payload* or as a *msg.xxxxx* property
2. By setting up a flow variable
When you are declaring variables in a *function* node, they are of course only valid and accessible in the respective function. Flow variables however are stored on flow level and can be used to store some data and read it again later in the flow without the need to send it in the *msg*. We now want to store our selected machine in a flow variable called *ActiveAsset*. Drop three *change* nodes and one *store ctx* node into your flow.
Expand Down Expand Up @@ -285,7 +285,7 @@ And the whole bottom part of your flow should look like this:

But what exactly are these nodes doing? If a machine is selected and you click on the button *Report emergency* you create an event for this machine, which is saved and bound to your asset, so you can see and use this event in the future or execute other commands dependent of the event severity. At the same time, a notification pops out in the right corner of your browser to inform you that the event was successfully created.

Now let's get this getting-started dashboard finished and implement one last feature: we want to see our events for a machine on our detail dashboard. MindSphere offers the pre build *event table* node exactly for this purpose. Go to your *Detail* tab and create a new group called *Events* with a width of 26. Then drop the *event table* node from the *MDSP Dashboard* section in your flow and assign it to the *Events* group. Give the node a *Size* of 26 x 12. We want it to be big, to see al the details of the events. Choose the *Basic* machine in the Asset field and check these columns to show:
Now let's get this getting-started dashboard finished and implement one last feature: we want to see our events for a machine on our detail dashboard. Insights Hub offers the pre build *event table* node exactly for this purpose. Go to your *Detail* tab and create a new group called *Events* with a width of 26. Then drop the *event table* node from the *MDSP Dashboard* section in your flow and assign it to the *Events* group. Give the node a *Size* of 26 x 12. We want it to be big, to see al the details of the events. Choose the *Basic* machine in the Asset field and check these columns to show:
- [x] Severity
- [x] EntityId
- [x] Timestamp
Expand Down Expand Up @@ -332,7 +332,7 @@ You can extend this dashboard in many ways. See it as a starting point and add t
- . . .
# Questions and Answers
Feel free to ask your questions in the [MindSphere Developer Forum](https://community.sw.siemens.com/s/topic/0TO4O000000MihsWAC).
Feel free to ask your questions in the [Insights Hub Developer Forum](https://community.sw.siemens.com/s/topic/0TO4O000000MihsWAC).
Or open an [issue](https://github.com/mindsphere/vfc-examples/issues) if you find a bug in our examples.
Expand Down
6 changes: 3 additions & 3 deletions DataLake_provideAccessToken/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Provide Access Token for Integrated Data Lake via API
<!-- (mandatory) Insert a description for the example flow. Describe the use case or its specialty. -->
This small flow triggers sets up an API endpoint which can be called from external system to get an access token to MindSpheres' Integrated Data Lake.
This small flow triggers sets up an API endpoint which can be called from external system to get an access token to Insights Hubs' Integrated Data Lake.

<!-- Insert an example image -->
![image](./doc/example.png)
Expand Down Expand Up @@ -32,9 +32,9 @@ In this example, calling the full API endpoint https://presiot-visualflowcreator


## See also
- [:shopping_cart: MindSphere Store: Integrated Data Lake](https://www.dex.siemens.com/mindsphere/mindaccess/integrated-data-lake-essential)
- [:shopping_cart: Insights Hub Store: Integrated Data Lake](https://www.dex.siemens.com/mindsphere/mindaccess/integrated-data-lake-essential)
- [Developer Documentation: Integrated Data Lake Service](https://developer.mindsphere.io/apis/iot-integrated-data-lake/api-integrated-data-lake-overview.html)
)




1 change: 0 additions & 1 deletion DataLake_scheduledImport/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ The IDL Explorer helps to browse the file structures.
## See also
- [:shopping_cart: MindSphere Store: Integrated Data Lake](https://www.dex.siemens.com/mindsphere/mindaccess/integrated-data-lake-essential)
- [Developer Documentation: Integrated Data Lake Service](https://developer.mindsphere.io/apis/iot-integrated-data-lake/api-integrated-data-lake-overview.html)
)



20 changes: 8 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# MindSphere Visual Flow Creator Examples
# 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)

# Welcome
* You are interested in MindSphere?
* You are interested in Insights Hub?
* You want to know, what you can do with it?
* You've heard about Visual Flow Creator and want to try it out?
* You know already Visual Flow Creator but search for examples?
* You want to get inspired by other flows from the community?

This repository provides example flows to be used in MindSphere Visual Flow Creator (VFC). You can use them and try it out to get an impression what is possible. Additionally you can customize them to your use cases. And of course you can contribute to this repository and share your knowledge to others.
This repository provides example flows to be used in Insights Hub Visual Flow Creator (VFC). You can use them and try it out to get an impression what is possible. Additionally you can customize them to your use cases. And of course you can contribute to this repository and share your knowledge to others.

If you do not have already purchased the app, you can get it in the [MindSphere Store](https://www.dex.siemens.com/mindsphere/applications/Visual-Flow-Creator). Or if you do not already have a MindSphere account, get one at [MindSphere Start](https://www.mindsphere.io/start).
If you do not have already purchased the app, you can get it in the [Insights Hub Store](https://www.dex.siemens.com/mindsphere/applications/Visual-Flow-Creator). Or if you do not already have a Insights Hub account, get one at [Insights Hub Start](https://www.mindsphere.io/start).

## How does this work

Expand All @@ -31,23 +31,19 @@ Please note, that the json-files are exported from another tenant. So their migh
| Name | Description | Complexity Rating | Prerequisites |
| --- | --- | --- | --- |
| [Command MQTT devices connected via MindConnect](./commandMqttDevice_MindConnect/readme.md) | Send commands back to a device via MindConnect MQTT | :star: | MindConnect MQTT connected device |
| [Command MQTT devices connected via IoT Extension](./commandMqttDevice_IoT-Extension/readme.md) | Send a command to a device via IoT Extension | :star: :star: | IoT Extension|
| [Create custom API endpoints](./createCustomEndpoint/readme.md) | | :star: | - |
| [Create rule for asset type](./createRuleForAssetType/readme.md) | Create a rule for all assets of this type | :star: | - |
| [Data Lake - timeseries import](./DataLake_scheduledImport/readme.md) | Setup scheduled trigger to start import of data from timeseries storage to Integrated Data Lake | :star: | Integrated Data Lake |
| [Data Lake - generate access token](./DataLake_provideAccessToken/readme.md) | Provides an API endpoint which feedbacks an access token for IDL data | :star: | Integrated Data Lake |
| [Generate sample data](./generateSampleData/readme.md) | Demo data for different data types in MindSphere | :star: | - |
| [Generate sample data](./generateSampleData/readme.md) | Demo data for different data types in Insights Hub | :star: | - |
| [Send SMS notifications](./sendSmsNotifications/readme.md) | Send SMS notifications and dynamically specify recipient | :star: | - |
| [Trend Prediction Example](./trendPredictionAPI/readme.md) | Application example which shows how to use trend prediction service to forecast timeseries data | :star: | - |
| [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 |
| --- | --- | --- | --- |
| [IN PROGRESS: Set Flow variables via dashboard](./setFlowVariablesViaDashboard/readme.md) | | :star: | |
| [TODO: Create dashboard for Fleet Manager](./createDashboardForFleetManager/readme.md) | | :star: | |
| [TODO: Integrate external API](./integrateExternalApi/readme.md) | | :star: | |
| [TODO: Dashboard with dynamic data layer](./dynamicDashboards/readme.md) | | :star: :star: | |

Expand All @@ -61,10 +57,10 @@ Please note that the screenshots show just the current state, when these example
Each flow has to be adapted to your tenant. Ensure, that e.g. fixed tenant names or asset ids are adapted before/after you import the flow.

## Prerequisites
All application examples shown in this repository require the MindSphere Application *Visual Flow Creator (VFC)*.
All application examples shown in this repository require the Insights Hub Application *Visual Flow Creator (VFC)*.

To use them, ensure that
- VFC is available in your MindSphere tenant ([VFC in MindSphere Store](https://www.dex.siemens.com/mindsphere/applications/visual-flow-creator))
- VFC is available in your Insights Hub tenant ([VFC in Insights Hub Store](https://www.dex.siemens.com/mindsphere/applications/visual-flow-creator))
![image](./MindSphere_Launchpad_VFC.png)
- you have *admin* or *user* access to VFC ([VFC user role settings](https://documentation.mindsphere.io/resources/html/visualflow-creator/en-US/108812512779.html))
![image](./VFC_roles.png)
Expand All @@ -81,7 +77,7 @@ If you can see Visual Flow Creator on your Launchpad, you're ready to start deve

## Questions and answers

Feel free to ask your questions in the [MindSphere Developer Forum](https://community.sw.siemens.com/s/topic/0TO4O000000MihsWAC).
Feel free to ask your questions in the [Insights Hub Developer Forum](https://community.sw.siemens.com/s/topic/0TO4O000000MihsWAC).

Or open an [issue](https://github.com/mindsphere/vfc-examples/issues) if you find a bug in our examples.

Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit d4019da

Please sign in to comment.