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 the RevPi #

Wiring and Power Connection #

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

Establishing Network Connection #

▷ Connect the RevPi to the power supply.

▷ 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

▷ Open the terminal application (Applications  Utilities  Terminal).

▷ Type the following command and press Enter with <SERIAL-NUMBER> being the actual serial number of the RevPi:

ssh pi@revpi<SERIAL-NUMBER>.local

▷ 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:

▷ Open Command Prompt or PowerShell.

▷ Type the following command and press Enter:

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

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

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

▷ Set the connection type to SSH and select 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.

Updating the System #

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

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

Installing Additional Packages #

▷ 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 #

Downloading and Installing 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.

▷ Navigate to the Device Management section.

▷ View the Measurements tab for your device.

Rebooting the 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

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

▷ Log into the admin web interface.

▷ Launch PiCtory graphical editor.

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

▷ Configure their settings.

▷ Ensure the Export checkbox is checked if the data should be sent to Cumulocity.

Sending Connected Values to the Thin-edge Client #

Option 1: No-Code with PiCtory #

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

▷ Set the server to localhost.

▷ Save the configurations and reset the driver.

Option 2: Node-RED #

▷ Use Node-RED 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.

Activating 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.