is the Internet of Things Application Platform and Marketplace of extensible IoT Applications. It combines a visual environment and an extensive set of APIs for the rapid design, integration and development of applications that execute on a scalable, secure and robust runtime. is compatible with all major IoT data platforms to accelerate your IoT Digital Transformation.

Using Meshlium with

To use Meshlium with you need the following: (1) Sign-up to, (2) Create a channel in your account, (3) Create a script in your account to receive the data sent by Meshlium, (4) Create a device on to authenticate the requests sent by Meshlium.

Sign-up to

You can sign-up for an account by selecting one of the available registration methods from:

After signing-up, or if you already had an account, sign-in to from using your credentials. Once authenticated, you will be directed to's Web IDE.

Create a channel in your account's channels are used to broadcast messages to your scripts, widgets or to the client applications that are using your services. To create a channel from's Web IDE (, click on the drop-down arrow near your username at the top-right corner of the screen, then select "Settings".

In the configuration dialog that is displayed, select the "Channels" tab. Click on "+Add Channel", then enter a name (e.g. "libelium"). Keep the checkboxes unchecked so that only authorized entities can publish or subscribe to this channel. Click on the check sign on the right to validate your changes.

Create a script to receive data

Scripts are used to implement the logic of your IoT applications, in JavaScript. In the current case, we need a script that receives the data sent by the Meshlium device. To create a new script, click the "+New Script" option on the bottom-left corner of the Web IDE; or select "Script" from the drop-down.

You can configure Meshlium to use HTTP or AMQP to send data to your account. The below code caters to both configurations and parses the received data into a JSON object ("payload" in the below example). Copy & paste the following into the script editing area of the Web IDE:

// require the✬s log module and configure it to the "info" level
var log = require("log");
try {
    var payload = null;
    // Check if the payload is available in request.parameters
    // (AMQP message) or in request.body (HTTP message)
    if (request.parameters && Object.keys(request.parameters).length > 0) {
        payload = JSON.parse(
    }else {
        payload = JSON.parse(request.body);
    }"Received the following payload:\n" + JSON.stringify(payload));


    log.error("Something went wrong\n" + JSON.stringify(exception));

Give a name to your script (e.g. "libelium") and save it.

Create a device to authenticate the requests

To access your resources on, third party clients - such as your Meshlium gateway - should authenticate. For that, they will use the credentials obtained after having been identified as devices in your account.

To create a new device, click on the drop-down near your username in the top right corner of the Web IDE, then select "Device Directory". Enter an ID and a password for your device. Confirm the password, then validate your changes by clicking on the check button on the right.

Your device is added and an authentication token has been generated for it.


To configure the cloud connector on Meshlium's Manager System, go to:

Cloud Connector -> Basic Cloud Partner -> scriptr

The configuration form is divided into 3 sections: a common section and 2 sections that are specific to the protocol (HTTP or AMQP) you will decide to use.

Note: if you have signed-up for a free account you should only choose HTTP.

Shared configuration

In the "Common" section, fill the following:

  • Script name: enter the name of the script you created in the section (e.g. "libelium").

  • Message template: configure the message to send to (this depends on the measures sent by your sensors).

  • Log level: specify a log level.

  • Interval: specify a time in seconds between 2 synchronizations with your account. This value cannot be less than 30.

Using HTTP to send data

In the "Common" section, fill the following:

  • Server adddress: type "".

  • Protocol: choose "HTTP" (default value).

In the "HTTP" section, fill the following:

  • Auth token: enter the value of the authentication token that was generated by for your Meshlium device, as described in the "Create a device to authenticate the requests" section.

Using AMQP to send data

Note: if you have only signed-up to a free account don’t use AMQP.

In the "Common" section, fill the following:

  • Server address: type "".

  • Protocol: choose "AMQP".

In the "AMQP" section, fill the following:

Note: check next paragraph, “Obtaining AMQP configuration from”, for the values obtained from

  • User: paste the value of the "Username" field from

  • Password: paste the value of the "Password" field from

  • Virtual host: paste the value of the "Virtual host" field from

  • Exchange: paste the value of the "Exchange" field from

  • Routing key: paste the value of the "Routing key" field from

Obtaining AMQP configuration from

From's Web IDE, click on your username on the top-right corner of the screen and select "Queuing". In the resulting panel:

  • Select "AMQP" as protocol.

  • In the "Credentials" section, select the device you have created in the “Create a device to authenticate the requests”.

  • In the "Publishing Details" section, select the channel you have created in “Create a channel in your account”.

Copy the value of "Virtual host", "Username", "Password", "Exchange name" and "Routing Key to invoke" and paste them in the "AMQP" section of Meshlium's configuration.

In Meshlium Manager System, click the "Save" button for storing your configuration.

Controlling the synchronization

Once the cloud connector is configured, the user can launch it using the "Start" button. At specified intervals, the frames received from the sensors and stored in the local database will be sent to your script on Check the status indicator of the cloud connector to know if it is "Running" (green light) or "Stopped" (red light).

You can stop the cloud connector anytime clicking on the "Stop" button.

Last updated