Validating data exchange between AWS IoT Core and PLC
This tutorial shows how to validate the data exchange between the PLC and AWS IoT Core
Table of Contents
Setting up the AWS IoT MQTT ClientUsing the SIA Connect and AWS IoT Core togetherPublishing from SIA and subscribing in AWS IoT CorePublishing from AWS IoT Core and subscribing in SIAAfter setting up AWS IoT Core and an virtual representation in SIA Connect, you can test the connection and message flow between the two.
To validate the message flow and data exchange you can setup an MQTT Client in AWS IoT Core to subscribe and publish data from and to the PLC.
This article will guide you through the process of validating the data exchange.
Setting up MQTT Test Client in AWS
In the AWS IoT Console, go to Test page, where you will find the MQTT Test Client.
To subscribe to a topic, you enter the name of the topic and click the Subscribe button. If you subscribe to the topic '#' you will read all the data sent to your endpoint, regardless of the topic.
To publish to a topic, you will need to enter a specific topic. Here you cannot broadcast to all topics using the '#' topic.
Validating data exchange to IoT Core
To validate the data exchange from AWS IoT Core and to SIA Connect you can publish and subscribe items and afterwards validate if the messages arrives on both sides of the connection. This section will guide you through the validation process.
Publishing from SIA Connect and subscribing in AWS IoT Core
The two pictures below show the SIA side and the AWS side. We publish a message with the write-only item to the PublishTopic. On the AWS side we see that the PublishTopic recieves the message.
Here we publish a message using the read/write item to the Pub/SubTopic. On the AWS side we can see that when monitoring the topic, the message comes through.
Here we see AWS subscribe to the '#' topic. This topic will show all messages sent to your endpoint. We see that both the PublishTopic and the Pub/SubTopic is shown in the same table.
Publishing from AWS IoT Core and subscribing in SIA Connect
Here we publish a message from AWS to a topic in SIA that will act as the subscriber. You need to enter a specific topic, the AWS publish will not work with the '#' topic. We see that our read-only item with the SubscribeTopic topic receives the payload from AWS.