Tuesday, November 17, 2015

Q&A: Kepware Applications Engineers Talk IoT Gateway

Posted by Torey Penrod-Cambra

On November 5, 2015, Kepware’s Erik Dellinger (Product Manager – IoT Solutions) and Joanne Bacharach (Senior Applications Engineer) hosted a webinar that provided a virtual tour of KEPServerEX version 5.19, featuring the new IoT Gateway.

The webinar attendance and engagement were really staggering. In fact, it was the largest webinar in Kepware history, with over a thousand users registered for the virtual event. While Erik and Joanne discussed real-world IoT use cases and provided live product demonstrations, a team of Kepware Applications Engineers worked frantically to respond to the questions and comments that poured in throughout the webinar. We received such great questions that we decided to share the most popular questions (and their responses) with you here.

Check out the Q&A pairs below to learn more about the IoT Gateway for KEPServerEX, which streams industrial data into the Cloud or on-premise solutions for real-time analytics. The Q&A pairs include information on IoT Gateway application support, configuration, functionality, and security.

IoT Gateway Application Support

Q: Did I just see that the IoT Gateway will allow KEPServerEX access from any computer on the network rather than just the computer running the server?
A: While this was already possible using OPC UA (and even OPC DA), our IoT Gateway will make this much easier.

Q: Ruby on Rails applications can get information from KEPServerEX?
A: Yes, absolutely.iot-gateway-technology-stack

Q: So now it is possible to access data with an asp.net application?!
A: Yes, since you can use HTTP and handle JSON within ASP.NET, "native,” direct communication to KEPServerEX is now possible.

Q: Is it possible to use a non-relational database (NoSQL) such as HBase or MongoDB?
A: Yes, NoSQL databases such as HBase and MongoDB have handlers to consume JSON data via REST.

Q: What are the target applications of the IoT Gateway product?
A: Any industrial data you can access with our existing products (PLC data, databases, etc.) can now be pushed through Cloud applications for notifications, business analytics, and more.

Q: Would Kepware suggest a REST Light Client and a MQTT Light Server?
A: There are lots of open source options depending on the language you want to use. Chrome has a built-in REST Client you can use for testing called Postman. MQTT has a lot of open source brokers as well. Mosquitto & ActiveMQ are examples. Paho is a great client library to try out.

Q: Do you have the ability to change the request/response format from JSON to another format like XML (define XSD) or structured text?
A: Currently, the IoT Gateway models all data in JSON format. The format is customizable, but it is still JSON.

Q: Does the IoT Gateway buffer the data when the connection to the consumer is down?
A: Yes, the REST Client and MQTT Client agents buffer data even if connections to their destinations are down. Each instance of these two agents has a fixed buffer of 10,000 item updates.

Q: 10K of buffering is actually very little. Are there plans of increasing this and/or making it configurable?
A: Yes! Let us know what would be a better limit for your application. We were thinking about making it configurable, but fixed it at 10K for the first release.

IoT Gateway Configuration

Q: I want to collect data from PLCs and push it to the Cloud. Would this require changing the PLC code?
A: Typically, your PLC code would not need to change. The tags you want to see are mapped in KEPServerEX, and then the select ones you'd like to push to the Cloud are mapped within the IoT Gateway.

Q: How about redundancy?
A: The REST Client and MQTT Client interfaces currently do not have automatic failover capabilities. With the REST Server, if redundancy is desired, REST Clients would be expected to connect to a secondary instance of KEPServerEX running the IoT Gateway.

Q: Can you list TCP/UDP ports utilized for bidirectional communications, and at what stage does SSL/TLS come into play?
A: KEPServerEX won't show this information, but there are operating system tools to see this. Ports opened by KEPServerEX are configurable in the product;  if we fail to bind/open, we will output error events. SSL/TLS is supported by MQTT and REST (HTTPS).

REST (HTTP) and MQTT Functionality

Q: What is a REST client/server?
A: REST is basically HTTP. The REST Client pushes data to a REST Server, like your browser making a request to a website. In this case, your browser is the REST Client, and the web server is the REST Server. We also have a REST Server agent, where REST Clients can request data from us.

Q: Is it possible to connect to the IoT Gateway using a socket instead of HTTP?
A: Currently, we support RESTful connections via HTTP, and MQTT messaging over TCP.

Q: Is it possible to POST data to another REST Server?
A: Yes, our REST Client can publish data to REST Servers.

Q: Can the REST Client publish data based on a configured event?
A: Currently, the only "event" based reporting the IoT Gateway offers is change of value, timestamp, or quality—anything that would constitute an “item update.”

Q: Could you create tags through the REST interface?
A: Yes, dynamic tags can be defined through the IoT Gateway.

Q: Are you able to perform a POST request on the KEPServerEX REST Server to make a change on a tag(s)?
A: Yes, absolutely. Each REST Server agent can be configured to turn on a Write URL. We have customers using this to read and write data to PLCs and equipment connected to KEPServerEX today.

Q: Is it possible to write PLC tag values using REST or MQTT?
A: In KEPServerEX version 5.19, you can write using the REST Server agent. The REST Client and MQTT Client don't support writes, but we'll be adding write support to the MQTT Client in KEPServerEX version 5.20.


Q: Can an unauthorized user see my PLC data?
A: Not unless you specifically permit connections with no authentication.

Q: When you go from a closed network to the Cloud, what security does IoT Gateway offer?
A: SSL for REST connections, along with username and password authentication. TLS for MQTT connections, along with username and password authentication.

Q: Does the REST interface support connection security with HTTPS?
A: Yes, our REST Client and Server interfaces support HTTPS.

Wrap Up

I hope these Q&A pairs provided clarity and sparked some new ideas for how you might use the IoT Gateway in your own industrial environment. At Kepware, we’re very excited about the IoT Gateway’s potential to make IoT concepts a reality and to bridge the gap between Operations and IT.

If you’re ready to get started with your own IoT project, you can learn more about the IoT Gateway and download free, fully functioning demonstration software.

Download Free Demo

Have additional questions? Leave a comment below or contact one of our applications engineers or technical support engineers by phone or email. We look forward to hearing from you!