LOT Notebooks is a Visual Studio Code extension that provides:
A notebook interface for the LOT (Language of Things) DSL
Integration with MQTT for live data and real-time updates
A built-in chatbot command so you can easily open your external or custom chatbot (under dev)
Features
LOT Language Notebook
Create or open .lotnb notebooks recognized by this extension
Edit LOT code (DEFINE MODEL, DEFINE ACTION, etc.) in notebook cells
Execute your cells to run remove→add→subscribe logic with MQTT
MQTT Integration
Connect to an MQTT broker (credentials can be configured)
Subscribe/publish to topics
Listen for real-time messages from the broker, displayed in your LOT cells
Live Data Views
Renders numeric payloads in real-time with a custom JSON-based approach
Possibly provides charting if the JSON output references numeric data
“Open Chatbot” Button (per-cell toolbar)
For any cell using the lot language, you will see an Open Chatbot button in the toolbar
Clicking it triggers the command lot.openChatbot, which can open your chatbot in a webview panel or external browser
Installation
From VSIX
Download the .vsix file for LOT Notebooks vx.x.x.
In VS Code, press Ctrl+Shift+X (Extensions panel) → click the ... menu → Install from VSIX... → select the .vsix.
Reload VS Code.
Verify installation by searching "LOT" in the Extensions panel or checking the extension in the list.
Usage
Create a new .lotnb Notebook
Open Command Palette (Ctrl+Shift+P) → LOT Notebook: Create New Notebook
A new untitled .lotnb file opens with the LOT notebook UI.
Add Cells
Each cell can contain LOT code, e.g.
DEFINE MODEL MyModel WITH TOPIC "XPTO" ...
The extension recognizes the lot language within .lnt notebooks.
Run Cells
Press the run icon on a cell or the top Notebook Run button
The extension executes remove→add→subscribe logic for the code
Configure MQTT
Use the command LOT Notebook: Change Credentials to set broker URL, username, password
The extension automatically connects when running a cell if not already connected
Open Chatbot
In the cell toolbar (the inline buttons), click Open Chatbot (it appears if the cell’s language is lot)
The extension runs lot.openChatbot, which can open your external chatbot in a webview or external browser
Adjust this logic in your extension code if you want a different chatbot approach
Commands Overview
Command
Description
LOT Notebook: Create
Creates an untitled .lotnb notebook.
LOT Notebook: Change Credentials
Prompts for broker URL, username, password for MQTT connectivity.
lot.openTopicPayload
Opens a prompt to view/edit payload for an MQTT topic in the TreeView.
Known Issues / Troubleshooting
Cannot find module 'mqtt': Ensure mqtt is listed under "dependencies" in package.json and no .vscodeignore is excluding node_modules.
No cell output: Double-check you used DEFINE MODEL|ACTION|RULE, so the extension’s logic can parse your code.
Chatbot not opening? By default, the command just shows an info message. Modify lot.openChatbot in extension.ts to open your actual webview or external URL.
Further Documentation and Links
Coreflux.org: Coreflux is more than just a self-hosted MQTT broker; it also offers a cloud MQTT broker solution. The company’s focus is on describing data-driven systems and connecting OT devices or events with IT systems via LOT Routes.