Altair SmartWorks Provisioning Protocol: Auto-Provisioning

Auto-provisioning means a device can provision itself into the Altair SmartWorks Platform. The auto provisioning mechanism consists in two factors:

  • Status/data stream: This consists in sending a data or status stream from your device to Altair SmartWorks. This stream must contain all data necessary to provision the device in Altair SmartWorks. This requires programming your device firmware, but once you get the code done, you can reuse it in every device. See the doc "Altair SmartWorks Provisioning Protocol: Previous Considerations" section "Provisioning Best Practices".
  • A listener: Is a script, a piece of code that runs when a certain condition is met. This script must contain the code to extract the information from the stream and create the device using the Altair SmartWorks entities. The listener is associated to an entity type: Project, Service, Group Asset or Device. The higher in the hierarchy, the more streams will be listened to. In this case the event to trigger the listener must be Event Data Received or Event Status Received depending on your approach (using data or status streams for auto-provisioning).
  • Provisioning Schema

To create a new listener, follow these steps:

  • Access the Altair SmartWorks Control Panel by logging with your credentials at www.altairsmartcore.com.
  • Click on "Listeners" under the label "RULES" on the left menu in the screen.
  • Click on "New Listener" below the listeners list to open the form in order to create a new listener.
  • Fill the form, design the functionality with the new Flow Tool and save your listener. Your new listener will be created and provisioned with the data you supplied.

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

A typical provisioning listener would contain:

  • Event: "Event Status Data Received" (to listen to every status stream received, as we decided to send provisioning info in a status stream)
  • Switch node: the first node would be a "switch" node configured with the if expression:
    context.data.containsKey('operation')&&context.data.containsKey('resgisterEquipment')
    (As our devices send provisioning streams cointaining those two keys)
  • Switch node
  • Function node: The Groovy or Java code to be included in the function node could be like this:
  • Function node + connections