Bring your OPC-UA tags to the cloud with AWS IoT and Kepware (1/3)

Matthieu Croissant
4 min readJul 10, 2020

--

See the full tutorial on : https://mcroissant.github.io/buttery-coder/blog/2020/07/10/bring-your-opc-ua-tags-to-the-cloud-with-aws-iot-and-kepware/#provide-real-time-dashboarding-on-top-of-your-data

Today I would like to introduce you to a set of nice functionalities of both Kepware and AWS.

We all have of favorite OPC server depending on the task, but for me, it is Kepware without a doubt. No, I’m not sponsored, I just love it! The nice thing about OPC servers is usually that they cover way more communication protocols and allow us to connect to otherwise non-OPC compatible machines.

Now with all these collecting capabilities, we need to be able to store, analyze, and display such data. There is of course some powerful tool to do this such as historians like Osi Pi, but what would be nice is if we could set up as a scalable solution within minutes with unlimited integration and that’s where cloud solution comes handy.

Luckily for us, Kepware got us covered and is already providing an IoT Gateway that will allow us to choose tag which should be forwarded to the cloud.

The first step is to download and set up your kepware server, you can download it by requesting it at https://www.kepware.com/en-us/products/kepserverex/ Once installed if you open the Kepware configuration tool you will find existing tags in there like the simulation examples.

We now have an OPC server set up on our machine we are ready to tackle the cloud part. To win some time and space I’ll consider you already have your AWS account. Go to Services -> AWS IoT Core and click on the get started button, you should then be redirected to this welcome page.

For the following part of setting up AWS IoT and Kepware certificates for MQTT communication, I point you to this fine how-to: https://steveunofficialguide.wordpress.com/sending-kepware-data-to-aws-iot-hub/

If you did everything alright and added some more tags to your IoT Gateway in Kepware like the simulated tags you should be able to do like me and use the Test interface from AWS IoT to look into the MQTT topic and see your tags being updated

The next task is to set up a Kinesis stream for forwarding the opc tag values to the analytic component of our solution. Go to Services -> Kinesis -> Data Streams -> Create Kinesis stream

As this is just a demo let’s keep things simple and not talk about shard yet. Now that we have a Kinesis stream we can ask our IoT service to forward everything there.

We go back to AWS IoT Service -> Act -> Create a rule. Give you rule a name

Give your rule a select statement, I kept it very generic because I have only a single opc tag forwarded but you can play around and filter your data before it gets to the analytic side of thing

Now we will plug this action to our Kinesis stream, click on Add action button and select Kinesis stream, then find back your previously created stream

You can now complete the IoT rule creation. To see if you’re alright you can go to the Kinesis stream monitoring tab to see incoming messages from your kepware installation

That’s it for this article I hope you enjoyed this first part, even if it is holding the most interesting part of the solution.

Check the detailed tutorials here :

--

--

Matthieu Croissant
Matthieu Croissant

Written by Matthieu Croissant

Software engineer with a focus on manufacturing and laboratory automation , scientific software https://www.linkedin.com/in/matthieu-croissant-0285a54a/

No responses yet