
The URL and the admin user can be accessed under Settings > Properties under the SQL Server configuration within Azure Portal. This allows me to access the database using SQL Server Management Studio. In order to work with the database directly, I went to the SQL Server resource, “Security” > “Firewalls” and added an exception for my client IP address. Before we can set this up, though, we have to give the data a place to go.įor this, I went again to the Azure Portal and selected “Create a resource” and selected “SQL Database.” I used the same resource group as the IoT Hub, and selected the lowest priced tier to minimize costs. The tool I chose to parse and pass the data is Azure Stream Analytics. I set a goal of parsing the data from the IoT Hub and passing it to a SQL Server instance for later reporting and analysis. For this exercise I wanted to stick to what I’m already comfortable with: SQL Server. Azure has myriad opportunities for performing actions and passing the data around from there, notably using Event Hub, Azure Functions and Routing. Now our data is getting to “the cloud.” More specifically, it’s hitting our Azure IoT Hub via MQTT messages. To verify that the messages are coming through, click on the “Data Tab” in the Device Explorer and click the “Monitor” button: Assuming all is well, click “Add IoT Items” to add items to publish to the IoT Hub.įor my setup, I’ll change the Scan Rate to 30 seconds, so that I’m not sending messages to the IoT Hub any quicker than this.

CONNECT KEPSERVEREX MQTT MANUAL
If they are, the IoT Gateway Manual that I linked to above has a helpful and detailed section on troubleshooting and diagnostics. Verify that no connection errors are shown in the KEPServer diagnostic list. The final window “MQTT Credentials” corresponds to the login information for the “Device” you created in the Azure IoT Gateway earlier.įor the Client ID use the same string as the deviceID.įor the Username, use the hostname/deviceID.įor the password, use the string that you copied from the Device Explorer above. The topic should follow the convention given in the knowledgebase article too:įor me, deviceID is “BALL_COUNT”, so I use devices/BALL_COUNT/messages/events/topic Note that both the protocol and the port are different from the default values given by KEPServer. Where HostName is given in the Overview screen for the IoT Hub in the Azure portal.

In the tree, click “Add Agent” under “IoT Gateway” and select “MQTT Client.”Ĭlick “Next.” The settings on the MQTT Client Broker screen are critical:Īs outlined in the knowledgebase article, change the URL to Now, in KEPServer, we’ll create the connection to the IoT Hub Device.

This is the key that KEPServer will use to authenticate to the Azure IoT Hub. Copy everything after and including “SharedAccessSignature” to the clipboard. Then click “SAS Token” and “Generate” to show the key. On the Management tab, create the “Device”. The authentication details were a little tricky: This, in essence, tells the IoT Hub to expect data from KEPServer. Then, follow the directions to create a “Device” in the IoT Hub using Device Explorer.

CONNECT KEPSERVEREX MQTT INSTALL
Once the IoT Hub is created in Azure, download and install the Device Explorer from github, and follow the instructions in the TechNote to connect it to the IoT Hub and retrieve the connection string. When an event occurs, KEPServer will contact the cloud service that we set up here and send it a “message.” What happens with that message once it arrives at the “IoT Hub” will be covered below. It’s not immediately clear what an “IoT Hub” is or does, but in a nutshell, it’s the server to KEPServer’s MQTT client. The first step is to log into your account at and create and create a new Microsoft IoT Hub: More helpful for this task, though, was this technote for connecting as an MQTT client: The IoT Gateway Manual is a thorough document on the functions and features of the KEPServer plugin:
CONNECT KEPSERVEREX MQTT HOW TO
I used two KEPServer documents to figure out how to accomplish this. In this article, we’ll continue the exercise of connecting the system to the cloud… Step 3: KEPServer IoT Gateway to Azure IoT Hub If you haven’t had a chance to read it yet, it’s here: In the our previous post, we set up the golf-ball machine to generate some data and brought it into KEPServer.
