Ubidots and Swarm Hive have partnered to create a pre-built integration that creates a private Endpoint URL optimized to receive Swarm Hive's JSON payload.
Table of Contents
1. Creating a Swarm Hive Plugin
Step 1: In your Ubidots account, click on the "Plugins" option under the "Devices" navbar menu, then click on the "+" icon in the upper right corner and select Swarm Hive:
Step 2: Configure your Plugin according to these input settings:
Ubidots device type: An Ubidots device type will be created and linked to this plugin. This allows you to make batch changes to all of the devices that receive data through this plugin.
Ubidots TOKEN: Select the Ubidots token you'd like to use for this plugin.
Step 3: Finish the process and a new plugin will appear in the Plugins list:
Step 4: After creating the plugin, click on the Edit button, then go to Decoder, and copy the HTTPs Endpoint URL. The structure of the URL is the following
Also, keep at hand your Ubidots TOKEN, it will be needed in the following steps.
Step 5: Go to your Swarm account, click on Delivery then on New Delivery Method
Step 6: Pick a name for your WebHook, and fill these fields:
Acknowledge messages on successful delivery: checked
All devices: checked
URL: Enter your Plugin HTTPs Endpoint URL.
In the headers section, enter the below 2.
At the end, your Swarm webhook configuration should look something like this:
Step 7: Go back to Ubidots, edit the Decoding Function shown in the Decoder section of the plugin to match your customized payload.
2. Editing a Swarm Hive Plugin
To edit the Plugin, simply click on the Edit button in the Plugins list view:
The same Input fields that appeared during the creation process will appear. Please note that, every time the Plugin is updated, a provisioning script will run, overriding the current attributes of the target device: