Iot Blog

Connect a Kepware KEPServerEX to IBM Watson IoT Platform

Connect a Kepware KEPServerEX to IBM Watson IoT Platform

Configure the KEPServerEX IoT Gateway Plugin

In the MQTT Client Security dialog, enter the Client ID, Username and Password.  The Client ID is in the following format  d

In this recipe you learned how to connect a Kepware KEPServerEX to the IBM Watson IoT Platform using MQTT.  Now that the data is flowing to the IBM Cloud, there is a whole catalog of micorservices you can use to make use of that data.  Looking for an end-to-end IoT solution that will help you get jumpstarted in days?  Take a look at the IBM IoT Connection Servicehttps// This managed service offering from IBM provides the IoT Platform service as well as security, data lifecycle management and analytics.

is your Organization ID from your Waton IoT Platform device credentials obtained in step one of this recipe.  The topic should be in the format  iot-2/evt/

You should now see the two tags added to your IoT Gateway agent.

2.  KEPServerEX installed with the IoT Gateway plug-inhttps//

Add some simulated tags to the IoT Gateway and view events in Watson IoT Platform

If successful, you should eventually see something like the following in the KEPServerEX Event Log window

You must belogged into post a comment.

Once the tags are added, the IoT Gateway agent will begin to send the simulated data to Watson IoT Platform every 10 seconds.  To view the incoming messages on IBM Cloud, Navigate to your Watson IoT Platform service DEVICES tab.  Your device should have a small green dot next to it to denote that it is connected.  If not, recheck the KEPServerEX event log to ensure there are no connection errors.

It helps to be familiar with the IBM Watson IoT Platform service and how to register devices.

Click the + Add Type button to add a new type.

Configure the KEPServerEX IoT Gateway Plugin

IMPORTANT  After clicking Done the next view will show the Device Credentials.  Make sure you copy these credentials and store them somewhere so that you can access them again.  Once you leave this view, you will not be able to get them back.

Click on the device and switch to the Recent Events tab to view incoming messages.  You should see messages coming in about every 10 seconds.

Add some simulated tags to the IoT Gateway and view events in Watson IoT Platform

Click the + Add Device button to add a new device.

is the name of the event you want sent to Watson IoT Platform.  For example, status.  Lastly, put 60 for the timeout field and then click Next.

Now we need to add some simulated tags to send from the KEPServerEX server to the IBM Watson IoT Platform.  With the new IoT Gateway agent selected in the KEPServerEX project browser, click on Add IoT items in the right side pane.  This will bring up the Tag Browser.  In the Tag Browser left side navigation pane, select the Functions node under Simulation Examples.  This will bring up the tags in the right side pane.  Select tags Ramp2 and User3.  Then click Apply.

3.  An instance of the IBM Watson IoT Platform servicehttps//console.bluemix.net/catalog/starters/internet-of-things-platform-starter

This recipe describes the steps needed to connect a Kepware KEPServerEX to the IBM Watson IoT Platform using MQTT

Register your KEPServerEX server with Watson IoT Platform and acquire device credentials

Give the device an ID, for example MyKEPServerEX and then click Next.

Recipes are community-created content. They are neither monitored nor endorsed by IBM. If you find inappropriate content, please useReport Abuseto let us know. For more information on community content, please refer to ourTerms of Use.

In the IoT Items dialog, leave the defaults and click OK.

Open KEPServerEX and select Add Agent under the IoT Gateway in the left hand project browser.  Give the agent a name such as IBM Cloud and select MQTT Client in the type drop down list.  Then select Next.

MQTT agent IBM Cloud is connected to broker 8883

KEPServerEX from Kepware is a popular connectivity gateway for industrial automation devices. It provides a plugin called IoT Gateway that enables users to forward industrial device data from PLCs and OPC servers to the IBM Cloud using MQTT.

Register your KEPServerEX server with Watson IoT Platform and acquire device credentials

Give the type a name, for example KEPServerEX and then click Add.

In the MQTT Client Broker dialog, enter the URL, Topic and Timeout.  The URL should be in the format like the following  ssl//

Connect a Kepware KEPServerEX to IBM Watson IoT Platform

Launch your Watson IoT Platform Service and navigate to the Devices page using the DEVICES tab.

We need to change one more setting before the agent is complete.  Double-click on your new IoT Gateway agent in the project borwser.  Switch to the Security section and select v1.2 as the TLS Version.  Then click OK.

from your device credntials obtained in step one of this recipe.  The username should be use-token-auth and your password should be your Authentication Token from your device credntials obtained in step one of this recipe.  Lastly, click Finish to complete the agent.

If you have any questions or issues with this recipe, please post comments below.

Lastly, you can click on the message itself to view the raw JSON payload.

Continue clicking Next a few more times until you reach the summary and then click Done.

Exit mobile version