Cloud Service Connectors
Last updated
Last updated
In this view, all the cloud service connector instances that have been already configured by the user are listed. The first time accessing to the Libelium Cloud Bridge service the list is empty, the message "You don't have any connector configured, click on the button below to add a new one" is displayed.
At least one cloud service connector instance must be configured to use the Libelium Cloud Bridge service. So programming sensor nodes to send data to the Libelium Cloud Bridge service before a valid cloud service instance is configured will fill the buffer and the sensor nodes will receive errors when trying to send data.
Adding the first cloud connector instance to the Libelium Cloud Bridge service:
Configured connector instances are shown in a grid with basic information:
Project name: Descriptive text for the instances.
Status: Active, Not-Active and Error.
Date: Cloud service connector instance creation date.
Adding a new cloud service connector instance is a standard process for all different cloud connectors available. There is a first tab for the configuration parameters, a second tab to associate the sensor nodes that will feed the connector with data, and a 3rd tab to check the logs messages received in the Libelium Cloud Bridge service from the destination cloud service.
The first step for adding a new cloud service connector instance is to configure the Libelium Cloud Bridge service with the valid user credentials needed to connect and synchronize data to the cloud service. Remember that this information must be given by the final cloud server (eg, AWS); Libelium just does not own or operate those final clouds. Most of those cloud services require to finalize a license purchase process to obtain the required parameters needed to properly authenticate and accept data from the Libelium Cloud Bridge service.
Configuration parameters are not exactly the same for all the cloud services, most of them include user and password authentication credentials combined with some API key for the service. They will be properly explained in the specific section of this guide dedicated for each one.
Press the "Check" button to test the connection with the cloud service using the values filled in the form for the required parameters. Error messages in the Log tab should be monitored.
When the connection with the cloud service is successful, the "Start Sync" button will be enabled. Click the "Start Sync" button to activate the instance and start sending values to the cloud service.
Associating sensor nodes to the cloud service connector instance is the most relevant step in the configuration of the Libelium Cloud Bridge service. As explained in the introduction of this guide, the Libelium Cloud Bridge service receives data from the sensor nodes in three different ways (direct HTTPS connections, Meshlium connector, and LWPAN backend callbacks). All this data received is buffered waiting to be synchronized to one or several cloud services.
Associating sensor nodes to a cloud service connector instance is the way for the Libelium Cloud Bridge service to know what buffered data must be sent to the cloud service connector instances.
The simplest configuration would be to send all data from all sensor nodes to a single cloud service connector instance, but we may want to group sensor nodes for different projects and send data to different cloud services.
In the "Associated devices" tab a table is shown, listing all the information related to the registered sensor nodes.
Data from the selected sensor nodes will be sent to the cloud service using the credentials configured in the instance.
Click "Add all nodes to connectors" to select all sensor nodes at once.
Click "Remove all nodes to connector" to clear all sensor nodes selected.
The "Logs" tab shows the information and error messages registering the result of the communication requests of Bridge while trying to send data to the cloud service. Different communication protocols are used to send data to the cloud services, messages related to the transport layer of the protocol can be identified and will be marked as INFO or ERROR. User intervention may be required to analyse the meaning of the messages generated in the application layer and decide if some actions are required.
An example of different types of messages is shown in the following image.
Click the "Refresh" button to refresh the logs view and load any new message available, latter messages will appear at the bottom.
Different types of log messages are identified depending on the response of the cloud service. A response is considered an error when the transport layer of the protocol returns an identified error code. A message with the "ERROR" tag will be displayed.
HTTPS transport layer error codes are:
Client error (4xx), meaning that the request contains bad syntax or cannot be fulfilled
Server error (5xx), meaning that the server failed to fulfill an apparently valid request
Any other message will be tagged as "INFO", showing the text received in the message from the application layer.
The properly configured cloud service connector instances send periodically to the cloud services the data buffered that has been received from the sensor nodes. The results of the communication requests can be monitored with the cloud service connector instance status. Cloud service connector instance states:
Active: The configuration is active when all fields are correct and there are not errors syncing the values.
Non Active: The connector is non active when one or more parameters are missing or misconfigured.
Error: This status is displayed when a connector has been configured correctly and an error occurred in the data synchronization.
Cloud service connector instances can be removed anytime: click the "Remove Connector" button to erase the current connector instance.
Only the configuration of this instance will be deleted, it will not affect the data previously sent to the cloud service. The same configuration parameters may be used to configure the cloud service in the future and data will be sent again.
Removing the last cloud service connector instance (or the only one) may cause in filling the Libelium Cloud Bridge service buffer because no data will be synchronized (the Bridge deletes overbuffer data). When the buffer is full, the Libelium Cloud Bridge service will not accept any more data, so sensor nodes trying to send data to the Libelium Cloud Bridge service when its buffer is full will receive communication errors.
The user must configure at least one cloud service connector instance to use the Libelium Cloud Bridge service. Each one of the cloud services available in the Libelium Cloud Bridge service (Alibaba Cloud, AWS IoT, Cumulocity, IBM Cloud, Microsoft Azure Event Hubs, Microsoft Azure IoT Hubs, MQTT, SAP Hana and Telefonica IoT Cloud) requires different parameters.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Access Key ID: Key IDprovided in the registration process.
Access Key Secret: Key Secret provided in the registration process.
Region: Region provided in the registration process
Click on the "Access Key" section of the profile account to get your access keys.
Once you are inside, press the "Create Access Key" button on the “Security Management” section.
When it has been created correctly, a pop-up window will appear with the data of the key that has just been generated.
If you want to store the information on your computer, you only have to press the "Save Access Key Information" button and a file with csv extension will automatically be saved on your PC with the key data generated.
After this you can consult all your generated keys in the panel. To see the secret key, press simply in the button "Show".
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name
Root-Ca Key: Authority of the certificate to be used
Private Key: Private key of the certificate to be used
Certificate: Certificate to be used
Host: Host that the certificate has been issued for
First of all you had to create a "Thing" in the “Manage” “Things” section on the AWS IoT Service. When you have created your own thing, click on the window with the name of the thing you just created.
To get the HOST parameter you will have to go to the “Interact” section and in the “HTTPS” section you will see the HOST that you will have to copy in the connector configuration.
To get the Private Key and Certificate if you do not have them previously created, you will have to go to the “Security” section and then press the "Create Certificate" button.
Download the three keys displayed before closing the window because they will never be shown again.
Click "Download" to save the root CA certificate.
Click the "Activate" button for assigning the keys to the Thing that you have just created. Click the "Done" button to finish the process and close all windows.
Copy the content of each downloaded file in their respective fields.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Tenant: The ID of your application.
User: The user that you use to log in to the Cumulocity Cloud.
Port Number: The port number of your tenant application.
Password: The password that you use to log in to the Cumulocity Cloud.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Organization: The organization ID of your dashboard.
API Password: The Authorization Token generated.
API User: The API key generated.
Event ID: Field used to configure the event where you want to send the information, if you do not know what to type in this field, you can use EID as value.
Go to Access “API Keys” menu, and click on the "Generate API Key" button, on the bottom left side. Select "Backend Trusted Application" as API role. You will get the API Key and Authentication Token. It is very important to write them down (save them on your PC), as there is no way to request them and they will be used later.
Complete the information in the form (all the fields are mandatory):
Namespace: Name of the Event Hub where you want to send data to.
Directive Name: Name of the shared access policies.
Directive Key: Key of the policy.
Name: Name assigned on the entity.
Template File: File with the template.
Create in the Microsoft panel a new Event Hub. The name assigned to the Event Hub will be the name to be provided in the "Namespace" field of the connector configuration.
Create a Policy on "Shared access policies" of the “Settings” section. The name of the shared access policies will be the name to be provided in the "Directive Name" field of the connector configuration.
Click in one of the policies that you have created to get the "Directive Key". A new window will be opened on the right with the "Primary Key" parameter, that is the value needed to fill the "Directive Key" field of the connector configuration.
Add a new entity in the “Entities” section of the newly Event hub created. The name assigned to the new Entity will be the "Name" field of the connector configuration.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Connection String: String to use in the connector.
Create an item on the "IoT Hub" section and click on the link with the name of the item you have just created.
Click on the "Settings" section of "Shared access policies".
Click the "Add" button to assign the name and the permissions needed. Click on the name and a window will appear on the right with the "Connection String", which you will have to copy and paste in the configuration of your connector.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
IP Address: The ip address of your application.
Port: The port number of your application.
SSL & SSL Cert: Certificate for secure communications.
User: The user that you use to log in to the MQTT Cloud.
Password: The password that you use to log in to the MQTT Cloud.
Client ID: The Client ID of your application.
Topic Template: Template for the MQTT topic.
Message Template: Template for the MQTT message.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Device token: Your device token.
Device ID: Your device ID.
MMS Endpoint: Endpoint to be used.
Message ID: ID of the message.
Meshlium Name: Meshlium name.
Complete the information in the form (all the fields are mandatory):
Project Name: Your project's name.
Server: Host name.
Port: The port number of your application.
API: The API key of your user panel account.