This guide provides comprehensive instructions for connecting a RevPi to the Cumulocity IoT platform using Thin-edge.io. It covers installation, configuration, and data transmission.

Setting Up Your RevPi #

Wiring & Power Connection #

Use either a 24V DC DIN rail power supply or, for desktop use, a 24V DC plug-in power adapter to power the RevPi. A typical power adapter should have at least 30W. Use a barrel jack pigtail connector with open wire ends to connect it to the RevPi.

Establishing Network Connection #

After powering up, connect the RevPi to your network using an Ethernet cable. Access the device by navigating to http://revpi1234.local in a web browser, where 1234 represents the serial number found on the front of the RevPi.

Setting Up SSH Access #

For macOS Users

  1. Open the Terminal application (Applications > Utilities > Terminal).

  2. Type the following command and press Enter:

    ssh pi@revpi<SERIAL-NUMBER>.local

    Replace <SERIAL-NUMBER> with the actual serial number of your device.

  3. Enter the password from the sticker located on the right side of your device.

For Windows 7/10/11 Users

Windows users need an SSH client.

  • For Windows 10/11:

    1. Open Command Prompt or PowerShell.

    2. Type the following command and press Enter:

      ssh pi@revpi<SERIAL-NUMBER>.local
  • For Windows 7:

    1. Download and install PuTTY from https://www.putty.org/.

    2. Enter revpi<SERIAL-NUMBER>.local in the 'Host Name' field.

    3. Set the connection type to SSH and click 'Open'.

In both cases, replace <SERIAL-NUMBER> with your device’s serial number. When prompted, enter the password from the sticker on the right side of your device.

System Updates and Installing Additional Packages #

Once logged in via SSH, update and upgrade your system:

sudo apt update && sudo apt upgrade && sudo apt dist-upgrade

Install the necessary packages for No-Code OPC-UA and MQTT support:

sudo apt install mqtt-revpi-client opcua-revpi-server

Installing and Configuring the Cumulocity Client #

Download and Install the Thin-edge.io Client #

curl -fsSL https://thin-edge.io/install.sh | sh -s

Configuring Thin-edge.io #

Configure the Cumulocity IoT tenant URL:

sudo tedge config set c8y.url your-tenant.cumulocity.com

Replace your-tenant.cumulocity.com with your actual tenant link without the https.

Creating and Uploading Certificates #

Create and upload a certificate for each device:

sudo tedge cert create --device-id revpi<SERIAL-NUMBER>

Replace <SERIAL-NUMBER> with your device’s serial number.

sudo tedge cert upload c8y --user "your_username@example.com"

Starting the Thin-edge.io Client #

Start the Thin-edge client to connect to Cumulocity:

sudo tedge connect c8y

Testing - Sending Measurement Values #

Send a test measurement to Cumulocity:

tedge mqtt pub 'c8y/s/us' '211,100'

Verifying Data Reception #

Log into your Cumulocity account and navigate to the 'Device Management' section to view the 'Measurements' tab for your device.

Reboot your RevPi #

sudo reboot

Sending the I/O Data of the RevPi to the Thin-edge Connector #

Accessing RevPi’s Admin Interface #

Navigate to the RevPi’s web interface:

http://revpi<serial>.local

Configure I/O Modules and Fieldbus Data on the RevPi Using PiCtory #

  1. Log into the admin web interface.

  2. Launch PiCtory graphical editor.

  3. Drag and drop devices such as digital ans analog I/O modules.

  4. Configure their settings, and ensure the 'Export' checkbox is checked if the data should be sent to Cumulocity.

Send Connected Values to the Thin-edge Client #

Option 1: No-Code with PiCtory #

  1. Drag the virtual device 'MQTT' next to into your RevPi base module in PiCtory.

  2. Set the server to localhost.

  3. Save the configurations and reset the driver.

Option 2: Node-RED #

Use NodeRed to send values to Thin-edge’s MQTT broker. Configure an MQTT node to localhost and send values as JSON.

Option 3: CODESYS #

Install and use Codesys to program and send measurements using its MQTT client.

Option 4: Python #

Use the RevPiModIO2 library to interact with the inputs and outputs of the RevPi and send data to the Thin-edge MQTT broker.

Activate Cumulocity Device Management Features #

The Revolution Pi system supports various Cumulocity features, including:

  • Measurements

  • Warnings / Alarms

  • Configuration Management

  • Software Management

  • Remote Access via SSH / VNC

Refer to the Cumulocity documentation for setup instructions.