Overview
This guide walks you through setting up the Coreflux MQTT Broker on a Revolution Pi (ARM64) industrial edge device, deploying LOT (Language of Things) actions from VS Code, and running Python-based vibration severity calculations directly inside the MQTT broker with no cloud dependency.Data flow
Prerequisites
Hardware
- Revolution Pi (ARM64) or any edge device with Ethernet. Learn abou the hardware requirement here: https://docs.coreflux.org/quick-start/installation
- Network connection between your dev PC and RevPi
- Vibration sensor with IO-Link (or simulated data)
Software (Development PC)
- Visual Studio Code
- LoT Language Support by Coreflux extension (VS Code marketplace)
- Python 3.11.9 from python.org (Not Microsoft Store version, see troubleshooting)
Software (Revolution Pi)
- Coreflux MQTT Broker for Linux ARM64
- Python 3.11.x (installed via apt)
- python3.11-dev package
- Node-RED (optional, for visualization)
1. Installing Coreflux on Revolution Pi
1
Download and Extract
Download the Linux ARM64 build of Coreflux MQTT Broker from coreflux.org. Transfer it to your RevPi via SCP or download directly:
2
Install the Coreflux MQTT Broker
The installation instructions are given on this page: https://docs.coreflux.org/quick-start/installation#raspberry-piStart the broker to verify it works:You should see the broker start and listen on port 1883. Press Ctrl+C to stop after confirming startup.
Default CredentialsThe default Coreflux broker credentials are username: root, password: coreflux. These are required when connecting from VS Code or MQTT clients.
3
Install VS Code
Install the open source code editor i.e., VS Code, on your computer: https://code.visualstudio.com/
4
Install LoT extension in VS Code
LoT (Language of Things) is a human-readable language for IoT automation. It uses near-English syntax to define logic, data structures, and integrations—all executed directly within the Coreflux MQTT broker.
The LoT extension lets you interact with the Coreflux MQTT broker from VS Code. To install LoT, go to the extension in VS Code and search for LoT.
The LoT extension lets you interact with the Coreflux MQTT broker from VS Code. To install LoT, go to the extension in VS Code and search for LoT.

5
Learning LoT
To learn how LoT interacts with Coreflux MQTT Broker, check this repository, which has many sample codes and exercises: https://github.com/CorefluxCommunity/Language-Of-Things-Training/tree/main
6
Configure VS Code Connection
In your LoT project folder, create or edit the .broker file with credentials embedded in the URL:
2. Setting Up Python Runtime on Revolution Pi
Coreflux uses an embedded Python runtime located in ~/coreflux/python_runtime/. On Linux ARM64, this requires manually copying the system Python shared libraries into this folder.1
Install Required Python Packages
Why python3.11-dev?The -dev package installs the shared library files (libpython3.11.so) that embedded runtimes need to load Python via the C API. Without it, the broker finds the python_runtime folder but cannot initialize Python.
2
Find the Shared Library Files
3
Copy Files to python_runtime
4
Confirm Python Loads at Broker Startup
Start the broker and look for these lines in the output:
Python WorkingWhen you see ‘Python runtime initialized successfully’ instead of ‘Python runtime not available, scripts disabled’, the Python integration is ready.
3. Troubleshooting
3.1 Python Version Compatibility
3.2 Windows — Microsoft Store Python
On Windows, if Python is installed via the Microsoft Store, the where Python command returns:3.3 Windows- Copying Python to python_runtime
After installing Python 3.11.9 from python.org, copy the full installation into the broker folder. This is in case you are running Coreflux Broker on Windows3.4 Port 1883 Already in Use (Linux)
If you see ‘MQTT Port 1883 is in use by unknown process’, another instance of Coreflux is already running (possibly managed by pm2 or systemd):3.5 ‘Entity Not Found on Broker’ Error
This error appears in the LoT notebook when clicking the play button, but the action has never been deployed, or the broker has restarted and lost the action. The play button in a .lotnb file deploys the action to the broker; it does not auto-persist between broker restarts unless the action file is saved in the broker’s persistent storage location.Deployment TipAfter restarting the broker, re-run all cells in your .lotnb file using ‘Run All’ to redeploy all actions.
4. Vibration Severity Example
4.1 The Python Script- VibrationCalc.py
Create this file in your VS Code project. It will be deployed to the broker’s python_scripts folder:ISO 10816 ReferenceThe output of this function is vibration severity in mm/s RMS. According to ISO 10816: Zone A (0-0.7 mm/s) = excellent, Zone B (0.7-1.8) = acceptable, Zone C (1.8-4.5) = monitor, Zone D (>4.5) = danger.
4.2 The LOT Action
Create a new .lotnb file in VS Code with this LOT action code:4.3 Deploy from VS Code
- Open the .lotnb file in VS Code
- Confirm the status bar shows ‘MQTT: Connected to mqtt://<RevPi-IP>:1883.’
- Enter your user credentials:
- Username: root
- Password: coreflux
- Click the ▶ play button on the LOT action cell to deploy
- Check the COREFLUX ENTITIES panel — the action should appear
- Publish test messages to X_VRMS, Y_VRMS, Z_VRMS topics
- Subscribe to output/vibration_severity to see results

4.4 Test with MQTT Client
In the following example, we are reading actual vibration data via OPC UA. You can just replace the vibration data source in the flow for your use-case. The source code for this flow is shared in the resource section.

4.5 ISO 10816 Severity Classification Table
| Zone | RMS (mm/s) | Classification | Action |
|---|---|---|---|
| Zone | RMS (mm/s) | Classification | Action |
| A | 0 – 0.7 | Excellent | New or recently serviced machine |
| B | 0.7 – 1.8 | Acceptable | Normal long-term operation |
| C | 1.8 – 4.5 | Monitor | Tolerable short-term, investigate |
| D | > 4.5 | Danger | Shutdown recommended immediately |

