This document aims to provide users with a step-by-step procedure on how to build and design your own customized Internet of Things pipeline in Reekoh.
Through the Basic Starter page, the user will have an understanding on how to:
- Configure your device to enable the platform to accept and pass data.
- Browse and pin plugins from the Marketplace to work with your connected device.
- Design & Configure data flow using the Pipeline Studio and your pinned plugins.
- Send and Verify data to your specified Gateway.
To demonstrate this, we're going to take you through connecting a MQTT Gateway to HTTP Webhooks.
Let's get started!
1. Register a Device
First, you need to login to your Reekoh account by supplying a valid Username or Email Address and Password. Once you're logged in, you will be directed to the Platform Console.
To register your device, navigate to Devices > Devices on the mega menu of your Platform Console and then click New Device.
On the New Device page, key-in the Device ID and Device Name. Once the form is complete, click Create Device.
Note: If you want Reekoh to auto-generate a Device ID, leave this field blank.
You should be able to see a notification saying your device has been created.
2. Pin Plugins
After you've registered your device, you need to pin the plugins you're going to use from the Marketplace. Navigate to Marketplace on the mega menu, and then select the corresponding category of the plugin(s) you want to pin. For this example, we'll use the HTTP Webhooks Connector and MQTT Gateway plugins.
Click the Connector tab and then hover over the HTTP Webhooks plugin. Click Pin on the pop-out window. You should be able to see a notification saying your plugin is pinned.
Do the same procedure for the MQTT plugin.
3. Build a Pipeline
After pinning the plugins you need, you are now ready to build your own pipeline.
To create a pipeline, navigate to Pipeline Studio on the mega menu and then click Create a New Pipeline from the pop-out window.
Select the plugins you'll use on the left pane, and then drag & drop them into the blank work space. In this example, we'll select MQTT first.
To configure your MQTT plugin, double-click the plugin and then complete the wizard that comes next. Click Save.
Note: Port number for the MQTT Gateway will be generated once your pipeline is deployed.
Once your MQTT plugin is configured, select the HTTP Webhooks connector plugin from the left pane and then drag & drop it to the canvass.
Double-click the plugin and then complete the wizard that comes next. You will be required to provide the Webhook URL of your HTTP Webhooks plugin. To obtain this, go to Request Bin and then click Create a RequestBin.
Copy the generated Bin URL. For this example, the generated URL is https://requestb.in/ry0zh5ry.
Go back to the Configure Component form of your plugin, and then paste the copied webhook url. Click Save.
Once you've configured both plugins, connect them by dragging the output terminal of MQTT to the input terminal of HTTP Webhooks. Select Save & Deploy from the drop-down menu.
Complete the wizard that comes next, and then click Save. You should be able to see a message saying your pipeline has been deployed.
To view the generated port, IP address, and status for MQTT, hover over the plugin. Take note that generation of these details may take a while so keep refreshing the page until it appears.
4. Connect and Send Data to the MQTT Gateway
In order to connect and send data to the MQTT Gateway, you need to install first an MQTT Client Simulator. For this example, we'll use MQTTLens.
To do this, go to the Chrome Web Store and search for the MQTTLens chrome application.
Open the app and then click Add to Chrome.
Click Add app on the pop-out window that comes next. Once installation is complete, you can now connect to the MQTT gateway.
Open the MQTTLens chrome application and then click the Add icon.
Complete the following connection details:
- Connection name - Supply any name for your connection.
- Hostname - IP address generated upon deployment of your Reekoh pipeline.
- Port - Port number generated upon deployment of your Reekoh pipeline.
- Client ID - Device ID supplied or generated upon registration of your device.
Once all details have been completed, click Create Connection.
After connection has been established, you need to send a JSON Data to the MQTT Gateway. Under the Publish section, key-in or paste the JSON data on the Message field, and then supply a value for Topic. Click Publish to send data to the MQTT Gateway.
5. Verify Output
To check if JSON data has been received in Request Bin, type the webhook URL you've provided upon configuration of your HTTP Webhooks plugin and then add ?inspect in the address bar. For example, https://requestb.in/ry0zh5ry?inspect. You should able to see the transmitted data under Raw Body.