Build & Debug a Flow
We will build a very basic flow using 3 modules:
- Data Generator (just to get sample data)
- Aggregate, to do a simple operation on the sample data
- MQTT Publish, to send the result to the outside world
Setup
I have a EdgeNode successfully running locally in docker. When the flow is built I will open a remote session to the local EdgeNode from cloud.crosser.io. Then the flow will be temporary deployed to the local EdgeNode and we can see the data flow from the EdgeNode to the browser, but also to a MQTT client.
We are using MQTTFx to connect to the EdgeNode over MQTT
Building the Flow
Drag out and connect the module to use
Each module has individual settings, you can read the docs for each module by clicking on the module and select the Info
tab to the right.
Configure TimeSeries Data
The FlowStudio allows you to register properties that should be displayed as time-series data in the line-chart available in the UI.
In this case we configure data.temp
and data.pressure
to be used.
Connect to Your EdgeNode
Click the Connect Node
link and select your EdgeNode from the list.
Start the Flow
Click the Play
button in the upper right corner to start the flow. This might take a few seconds since all assemblies needed are downloaded by the EdgeNode.
When the flow is running you can see debug data to the right and you will also see the time-series data being displayed at the bottom in real-time.
Connect MQTT
To get data to an external MQTT client just connect to your EdgeNode (I am using MQTTFx) the default port is 1883.
Once connected you can subscribe to the topic used in the flow. I used foo/bar