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 SiteWise Asset Models and Assets. 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 components. This tutorial will use the AWS IoT Core MQTT Server implementation. However, IB IBAS does work with any MQTT v3.1.1 compliant MQTT Server.

...

Before configuring IoT Bridge (IBIBAS), 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 IB IBAS 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
    • Note this will be used for both a publisher connection (Ignition) and a subscriber (IBIBAS)
  • 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 IBIBAS): us-east-1, us-west-2, eu-central-1, or eu-west-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 IBIBAS) and then click 'Next'.

This will bring up the following page. Click the 'One-click certificate creation' option shown below.

...

This will bring up the page similar to what is shown below. At this point, you must download the UUID.cert.pem file and the UUID.private.key file. These will both be used in the IB IBAS configuration to connect to AWS IoT later. These files will not be accessible later and must be downloaded now. In addition, there is a link to download the root CA for AWS IoT. Make sure to download this as well. The 'RSA 2048 bit key: Amazon Root CA 1' is the preferred root certificate to download.

...

Once you have these, click the 'Activate' button. Then, click the 'Attach a policy' button. This will bring up the following page.

Now select the 'IBIBAS_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 IBIBAS.

With AWS IoT now properly provisioned and IB IBAS installed, IB IBAS 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:

...

Code Block
languagebash
mkdir /opt/ibibas/conf/certs

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

...

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

...

Code Block
languagebash
sudo /etc/init.d/ibibas restart

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

Code Block
languagebash
tail -f /opt/ibibas/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 IB IBAS and properly provisioned AWS IoT Core.

...

At this point IoT Bridge is configured and ready to receive data. To get data flowing into IB IBAS 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, data should be flowing into AWS SiteWise. By tailing the log in IB IBAS you should see something similar to what is shown below. This shows IB IBAS receiving the messages published from Ignition/MQTT Transmission. When IB IBAS receives the Sparkplug MQTT messages, it creates and updates asset models and assets in SiteWise. The log below is also a useful debugging tool if things don't appear to work as they should.

...