Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This Quickstart document covers how IoT Bridge can be used to consume MQTT Sparkplug data and create and update data in Snowflake. This will show how to configure IoT Bridge as well as show how to use Inductive Automation's Ignition platform along with Cirrus Link's MQTT modules to publish device data to an MQTT Server. This data will ultimately be consumed by IoT Bridge to create and update the SiteWise Snowflake components. This tutorial will use the AWS IoT Core MQTT Server implementation. However, IBAS does work with any MQTT v3.1.1 compliant MQTT Server.

...

Before configuring IoT Bridge (IBASIBSBNOW), you must register a 'thing' connection in AWS IoT Core. Begin by browsing to AWS IoT Core in your AWS account. Make sure you are in the same AWS region that you have already deployed IBAS IBSNOW to. Begin by expanding 'Secure' and click 'Policies' as shown below.

...

  • Name
    • Some friendly name you will remember
  • Actions
    • Set to: iot:Connect,iot:Publish,iot:Subscribe,iot:Receive,iot:RetainPublish
    • Note this will be used for both a publisher connection (Ignition) and a subscriber (IBASIBSNOW)
  • Resource ARN
    • Set to: arn:aws:iot:AWS_REGION:ACCOUNT_ID:*
    • In the above, replace the following.
      • AWS_REGION: one of the following (where you set up IBASIBSNOW): us-east-1, us-east-2, us-west-2, ca-central-1, eu-west-1, eu-west-2, eu-west-3, eu-central-1, or eu-westnorth-1
      • ACCOUNT_ID: Your AWS Account ID
  • Effect
    • Set to 'Allow'

...

Now click 'Create a single thing'. This will open the following page. Give your thing a name (such as IBASIBSNOW) and then click 'Next'.

<TODO>Add Image</TODO>

...

At this point you should have three files where 'UUID' will be some UUID specific to your thing. Do not proceed until you have all three files.

  • UUID.cert.pem
  • UUDTUUID.private.key
  • AmazonRootCA1.pem

...

<TODO>Add Image</TODO>

Now select the 'IBASIBSNOW_Policy' and finally click 'Register Thing'. At this point, you should see your newly provisioned 'thing' as shown below.

...

When selected, your AWS IoT Endpoint will be displayed. Note it for future use when configuring IBASIBSNOW.

With AWS IoT now properly provisioned and IBAS IBSNOW installed, IBAS IBSNOW must be configured. To configure it, you must be able to access it via SSH. Ensure you can access it via the Access Instructions here. Once you can access it, you must copy the three certificate files you captured when provisioning the AWS IoT Core thing. Again, these files are:

...

On the target EC2 instance, the following directory exists to hold the certificates.

/opt/ibsnow/conf/certs

Now copy the three files to the /opt/ibasibsnow/conf/certs directory. When done, it should look similar to what is shown below.

...

Now, modify the file /opt/ibasibsnow/conf/ibasibsnow.properties file. Set the following:

...

Now the service can be restarted to pick up the new configuration. Do so by running the following command.

sudo /etc/init.d/

ibas

ibsnow restart

At this point, IBAS IBSNOW should connect to AWS IoT Core and be ready to receive MQTT Sparkplug messages. Verify by running the following command.

tail -f /opt/ibsnow/log/wrapper.log

After doing so, you should see something similar to what is shown below. Note the last line is 'MQTT Client connected to ...'. That denotes we have successfully configured IBAS IBSNOW and properly provisioned AWS IoT Core.

...

At this point IoT Bridge is configured and ready to receive data. To get data flowing into IBAS IBSNOW we'll set up Inductive Automation's Ignition platform along with the MQTT Transmission module from Cirrus Link. Begin by downloading Ignition here.

...

At this point, our tags are configured. A UDT definition will map to a SiteWise Asset Model model in Snowflake and UDT instances in Ignition will map to SiteWise AssetsSnowflake. But, before this will happen we need to point MQTT Transmission to AWS IoT Core. To do so, browse back to the Ignition Gateway Web UI and select MQTT Transmission → Settings from the left navigation panel as shown below.

...

At this point, data should be flowing into AWS SiteWiseSnowflake. By tailing the log in IBAS IBSNOW you should see something similar to what is shown below. This shows IBAS IBSNOW receiving the messages published from Ignition/MQTT Transmission. When IBAS IBSNOW receives the Sparkplug MQTT messages, it creates and updates asset models and assets in SiteWiseSnowflake. The log below is also a useful debugging tool if things don't appear to work as they should.

<TODO>Add Image</TODO>

At this point, the asset models and assets have been created in AWS SiteWise as well. To see them, browse to the AWS Web Console and go to IoT SiteWise. Then click 'Models' using the left side pop-out navigation panel as shown below.

<TODO>Add Image</TODO>

At this point you should have a 'Motor' Asset Model in SiteWise that corresponds to the Motor UDT definition that was created in Ignition. If you click the 'Measurements' tab you should also see the different UDT members that were added to the definition in Ignition.

<TODO>Add Image</TODO>

Using the pop-out navigation panel on the left, now click the 'Assets'. Here you should see something similar to what is shown below. This asset represents the UDT instance that was created in Ignition. On the measurements tab you should see the values associated with these UDT member tags as shown below.

<TODO>Add Image</TODO>

Additional Resources

<TODO>SHOW DATA IN SNOWFLAKE</TODO>

Additional Resources

  • TODODue to the multiple different systems involved in a IoT Bridge deployment there are caveats with regard to ensuring compatibility between supported features: IBAS: Mappings and Constraints