How do I use Connectors?

Setting up connectors allows you to send data to a server without logic and SDKs installed to devices.

If you are not sure about Onomondo Connectors, you can get an introduction here:

Before starting, you need to know which device that will be sending data, what data you want it to send, and where it is to be sent. Afterwards, follow these three steps to set up a Connector.

  1. Setting up the device to send data.
  2. Configuring the new Connector.
  3. Adding the Connector to a SIM.

Step 1: Setting up the device to send data

Make sure your device is connected to the network. Haven't done that before and need help? 

Once your device is connected you need to set it up to generate the desired payload. You need to send it using one of the protocols, like TCP or UDP. For simplicity, let's use an example with JSON payload sent over TCP using python. This code would be running on your device:

import socket

payload = { "Hello": "There!" }

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('1.2.3.4', 4321))
s.send(payload)
s.close()

This is enough to send the data to your service of choice - the rest happens at Onomondo. Notice that there is no overhead like encryption (e.g. https). With Onomondo you don't need to do that as it's sent to Onomondo before it's sent on the Internet, and encryption is added on our end.

But what IP address should I use?

It doesn't matter, because you set the routing rule on Onomondo - this way it's easier to update where to send data without updating your devices. Do not use the IP loopback address, 127.0.0.1. Simply using 1.2.3.4 and port 4321 provided in the example is sufficient. Also, if you avoid using domain names your device doesn't need to do a DNS lookup which consuming extra data and may stall the transmission.

Step 2: Configuring the new to a new Connector

Under the "Connectors" tab in the Onomondo app you can click the button "Add Connector" to configure your new Connector.

Currently, we offer:

  • TLS Connector
  • IBM Watson IoT
  • Microsoft Azure IoT
  • Google Cloud IoT Core

If you have a different service that you would like a Connector for, email us at support@onomondo.com. We are always looking to update our roadmap with new Connectors and we are happy to discuss it with you.

The Connector configuration has four sections:

  1. Connector name
  2. Connector type
  3. Type configuration
  4. Passthrough connection (More information to come in the future on this feature)

Once you have named your Connector, you will need to pick the type. 

For this example we are going to use a IBM Watson IoT.

Each type will allow you to connect to a specific service. Selecting a type will change the fields to fill out in the "Type configuration" section. Fill in the fields with the information provided from your cloud Platform credentials.  Once they are filled out, the 'Add' button will be available to create the Connector.

Step Three: Adding the Connector to a SIM

Once you have created a Connector, go to the SIMs tab. Find the SIM you want to attach to the Connector you have created.  Click "Go to the SIM" button to display the SIM detail page. Click the edit button. 

edit-sim-button

In the SIM settings menu, select the Connector dropdown menu and pick the newly created Connector and click Update.

 add-ibm-connector

Witness the magic of Onomondo's Connectors

Once the Connector is added, data sent from your device will reach the service you have chosen.

Using the example code on a Raspberry Pi 3 with a Huawei E3531 cellular modem your IBM Watson IoT account will receive the data.

If you need to change a connector, it is just a matter of repeating steps 1 and 2 without having to update the device.

Magic!