Perhaps you just got access to your ExoSense instance but when you log in you don’t see any assets or devices or you’re just wondering how easy it is to get a device connected and sending data; Either way, follow this guide and you’ll see how quick and easy it is!
The first thing we want to verify is that the device will be able to connect. The requirements for a device are:
- An internet connection
- Supports either MQTT/HTTP protocols
- Supports TLS Security
The first step is to add an IoT Connector from the Exchange to your Murano business. There may be pre-constructed IoT Connectors for the gateway you are using but for the sake of this guide we will just be using the “ExoSense Standard Connector Template”.
Once you have named and created your IoT Connector, click on the 3 dots and select “Manage IoT Connector” to view the devices, settings, and more.
Once in the IoT Connector Management view, select Settings from the left-hand menu and select the protocol for your device. In this case, we will be using HTTP but if you have an MQTT device the steps are similar you just need to adjust the protocol settings from HTTP to MQTT.
To add a device, the device can either register its own identity when it provisions or we can add the device identity manually. The setting to allow a device to register its own identity is under the Settings section. In this case, we’re going to manually add the device. To do that, click on the “+ New Device” button in the top right corner and enter in a device ID. Generally, this is the device MAC address or Serial Number, but you can use whatever name you’d like to identify your device.
Now that we’ve added the device identity, we need to have it activate so it can start sending data in. This device will need to provision, receive it’s authentication token, and store this token for all further communication. We can use an HTTP POST request to get the authentication token for this device using the following example, substituting the “Solution ID” with your IoT Connector’s ID (found by clicking the ID shield button in the top left of the IoT Connector Management page):
POST /provision/activate HTTP/1.1 Host: [Solution_ID].m2.exosite.io Content-Type: application/x-www-form-urlencoded;charset=utf-8 Accept: */* Content-Length: 8 id=[Device ID you created]
The response should look like the following:
HTTP/1.1 200 OK content-length: 40 date: Thu, 09 Sep 2021 20:24:03 GMT server: Murano 2RfG0aak2KQFQVAsM5D737VguXkZH2GIf9f2YcAl
The response value of
2RfG0aak2KQFQVAsM5D737VguXkZH2GIf9f2YcAl is my token that is required for all further device communication and must be stored safely in non-volatile memory on the device. You should now see that your device shows activated.
Now that the device is activated, we can have it send in it’s configuration information via the config_io resource. Once sent, you should see the updated config_io in the device resources.
Now that the device is configured, you can start sending in data on these channels through the data_in resource.
Once you get data flowing in, you may switch over to your ExoSense instance and under the “Devices” section in the “Unused Devices” section we will want to claim the device and move it into the group you would like it to be in. Once the device is claimed and in a group, you can create an asset and start building your dashboards to visualize the data coming in.
For more information, please refer to our documentation here: Connect a Device - Exosite Documentation