The Senquip Plugin is an integration that allows you to send data from your Senquip sensors to Ubidots with ease. The plugin will carry out all steps needed to set up devices and variables at Ubidots to leverage the integration.
Requirements
An active Ubidots account.
An active Senquip account.
A Senquip device.
1. Plugin setup
Log in to your Ubidots account, click on the "devices" tab, then "plugins", then click on the + icon to create a new plugin and search for the Senquip option.
The plugin's setup wizard will appear. Click on "next" and select/fill the required parameters.
Ubidots token: Select the Ubidots token you would like to use for this plugin. It's recommended to create a new token dedicated to this plugin only, in case you need to increase its rate limit in the future.
Click on "next" to finish the process. You will see the new plugin listed on the plugins' list.
Click on the newly created plugin and navigate to the "decoder" section on the left menu and copy the "HTTPs endpoint URL", you will use it to set up the HTTP endpoint in the next step.
2. Set up the HTTPS endpoint
Log in to your Senquip account, click on the device that you want to use with the plugin and open its "settings" page.
Click on the "endpoint" button and scroll down until you find the "HTTP" section.
Click on the "configure HTTPS" button and a modal will pop up. Fill in the following fields:
Server Address: The plugin's URL (the one you copied in the first section of this guide).
CA Certificate: Load Ubidots' roots PEM certificate. You can download it from here.
Click on "apply" and wait for the changes to be applied to the device. After that, you will be receiving data at Ubidots
3. Advanced usage
After setting up the plugin, it will be triggered automatically by sensor reading events at Senquip Portal.
If, for some reason, you need to change this behavior (to send more or fewer data than the default, for example), you can achieve that by editing the decoder code inside the plugin:
From your Ubidots account, click on the "devices" tab and then "plugins", this will load your plugins' list. Click on the Senquip plugin you have created to edit it.
Navigate to the "decoder" tab on the left menu and look for the code editor under the "decoding function" section, make the appropriate changes and save them by clicking on the "save & make live" button.
Note: The payload returned from the decoder function must be in accordance to any of the options shown here.