• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Examples and Tutorials
  • Sending Telemetry to Ubidots

Creating a Database GUI Using Wago PFC 200 With IO Modules and WebUI

Sending Telemetry to Ubidots

Introduction

This example project is a setup that showcases how to connect a CDP application with the Ubidots IoT platform at https://ubidots.com/ using MQTT. It includes the UbidotsEdge block for data transmission, the CDP Logger for data logging, and a FallbackBroker for local MQTT communication in case of Ubidots API Key issues.

Note: The Ubidots cloud part needs no configuration for accepting the data. Nodes will be auto-created with the EdgeName and variables sent by the UbidotsEdge.

Note: For ease of example testing the MQTT link is not secured, but the required alternate broker address and the needed certificates are available from Ubidots and MQTTClient supports a secure setup.

Components

The project comprises the following key components

UbidotsEdge Block

Manages communication with the Ubidots cloud. It automatically sends logged data to the Ubidots platform using MQTT.

CDPLogger and Sine Blocks

Logs data from the application. In this example, it logs values from 'SineA' and 'SineB' sources. The logger has been set to log a new value every 10 seconds. Setting a Delta value on LoggedValues is also advised to reduce unwanted changes.

Testing only FallbackBroker Block

A local MQTT broker that serves as a stand-in for testing the edge behaviour without the Ubidots cloud. It is used when the Ubidots API Key is not set or is invalid. Note that in a real use case, this block should be removed.

In the fallback mode, MQTTExplorer can be used to monitor the fallback broker at 127.0.0.1:1883 to see what data would be uploaded to the cloud and the rate of the requests.

Configuration of UbidotsEdge

For testing the whole example it is best to create a trial account at Ubidots https://ubidots.com/ and set the APIKey in the UbidotsEdge block. When testing with multiple edge devices make sure the EdgeName is also changed to be unique.

Configuration EntryDescription
EdgeNameRepresents the unique identifier of the edge node.
RootTopicThe MQTT topic root under which data will be published (preconfigured).
APIKeyThe Ubidots API Key is needed for authenticating with the Ubidots platform. Register for trial at https://ubidots.com/ to get the API Key.

The APIKey is available under API Credentials in your profile.

\caption API Key location under the Ubidots profile.

Note: The Ubidots cloud is intended for slow telemetry data (up to 4 requests/second) and the UbidotsEdge down-samples all data from CDP Logger to 1 Hz. It is recommended to configure the logged values with Delta option to reduce unneeded data changes further for such telemetry data.

Operation Flow

  • The CDP Logger logs data from specified sources at a defined frequency.
  • UbidotsEdge reads the logged data and prepares it for transmission.
  • If the Ubidots API Key is valid, data is sent to the Ubidots cloud.
  • In case of an invalid or unset API Key, UbidotsEdge switches to the FallbackBroker for local MQTT communication.

Use Case and Benefits

This example project is ideal for IoT applications requiring reliable data transmission to cloud platforms. The integration of UbidotsEdge with CDPLogger simplifies the process of setting up data logging and cloud communication.

Creating a Database GUI Using Wago PFC 200 With IO Modules and WebUI

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2024 CDP Technologies. Privacy and cookie policy.

Return to top