How to integrate Altair SmartWorks with InitialState.

0. Introduction

By using the Altair SmartWorks External API, you could send data to InitialState for monitoring your metrics. A real time visualization of your key performance indicators. Can you imagine the possibilities of this?.


1. How to use

To send data to InitialState with Altair SmartWorks, the first step you have to do is create your InitialState account. Try it for free! If you already have an account you could use it. Login into InitialState. Remember to first create a Streaming event Bucket. If you don't know how, click here.

In this tutorial we will follow a simple example. Our goal is to represent the wind direction graphically.

Range Values

The following table shows the ranges of degrees used to define each orientation:

Orientation Degrees
N - North [0 - 23], [337 - 359]
NE - North East [24 - 66]
E - East [67 - 113]
SE - South East [114 - 156]
S - South [157 - 203]
SW - South West [204 - 246]
W - West [247 - 293]
NW - North West [294 - 336]

  • Wind directions

Then suppose we are receiving wind direcction data from an external device in Altair SmartWorks:

  • Data received in Altair SmartWorks

Using Listener

We have enhanced the listener creation process with our Flow Tool.

We want to push the wind direction to InitialState service when receiving the data.

To create a listener click on "Listeners" Menu option, inside "Rules". Then click on "New" button and create the listener. To know more about it please read the tutorial How to create a listener.

Fill the fields with the following values and continue to the next step.

  • Name: The name that you prefer
  • Description: The description that you prefer
  • Entity type: Device
  • Entity id: Your device id_developer (defaultDevice@example.example)
  • Event to listen: "Event Data Persisted"
  • Be sure to have your listener enabled if you want it to be executed
  • Click on the "Next Step: design the code" button to visually design the listener functionality

In the Flow editor we'll only need drag & drop a "function" node and add our custom code since this tutorial is not intended to explain the details of the Flow Tool. For a deeper vision of the tool please read its documentation or our "How to create a listener" tutorial.

  • Flow designer: Function node

2. Examples

  • Last Value
  • Bar Graph
  • Last Value
  • Bar Graph Creation
  • Bar Graph

3. Public view examples

Initialstate offers you the possibility to publish your dashboard publicly.

  • Public view builder
  • Sharing your public dashboard

You can see a simple example of our public dashboard HERE.

From now on you can add other widgets and send more data to complete your public dashboard:

  • More complete dashboard