The following steps are not required to follow the tutorial "Putting Raspberry Pi into operation". However, you will need the following information when you want to transfer unencrypted data between Raspberry Pis via →MQTT. This possibility is provided by logi.RTS starting with version 2.3.1301.
Contents of this article:
Connecting to Raspberry Pi by using PuTTY
Use PuTTY for the following configuration/installation steps.
In dialog PuTTY Configuration, enter the detected IP-address under Host Name, select SSH under Connection type, then click Open.
PuTTY displays a terminal window in which you have to enter certain commands – one after each other. Conclude each command by pressing the Enter-key so that the corresponding action is executed.
Configuring logi.RTS on the Raspberry Pi
How to configure logi.RTS assuming that logi.RTS has been installed into this directory:
- Terminate logi.RTS on the Raspberry Pi.
Within the terminal window of PuTTY: Change into the directory
/opt/RTS/PLCof the Raspberry Pi.
Open the file
RTSIO.cfgin a text editor, change this file and save the changes.
Delete the prefix character
#in this line.
Save the changes and exit the editor: Press Ctrl+O (and confirm the file name), then press Ctrl+X.
- Start the Raspberry Pi anew. logi.RTS will run after the reboot, if you have added logi.RTS to the system start (see under "Installing and starting logi.RTS on Raspberry Pi").
Installing/configuring MQTT broker
Transferring data via MQTT requires a MQTT broker. You may install this MQTT broker on any computer or on the Raspberry Pi. Take care that
and the Raspberry Pis are able to access the MQTT broker.
See the user documentation of your MQTT broker, if you need information on installation and/or configuration of this MQTT broker.
Example for a MQTT broker that logi.cals is using: the open source software Mosquitto (http://mosquitto.org/). On Debian-based Linux systems, such as Raspbian, the installation of the Mosquitto broker can be performed by entering the following commands as the root user:
Controlling the connection for TCP port
1883. Allow this connection in the Windows Firewall because it is required by logi.CAD 3 (see troubleshooting article "The Windows Firewall has blocked features of this program" for information on this).
Enhancing the application by MQTT blocks
- Use the appropriate MQTT blocks in your logi.CAD 3 application.
- Load the application onto the Raspberry Pi – this is analogous to the description under "Loading application onto Raspberry Pi".
Analyzing applications that use MQTT blocks
In order to analyze MQTT applications, there are several tools. logi.cals uses "MQTT RCP Application" of the "Graphical MQTT Client Tools" of the Paho framework (https://eclipse.org/paho/clients/tool/). By using the program you can determine whether messages have been published to a certain topic on a given MQTT broker. Furthermore, it is possible to subscribe to arbitrary topics.