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)
-
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
- Create or open
-
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
-
Anselmo ChatBot (beta preview)
- Access an integrated ChatBot knowledgeable about Language Of Things (LOT) via the Notebook toolbar icon (🤖).
- Ask questions about LOT syntax, concepts, or request code examples.
- Includes Markdown rendering, diagram rendering (Mermaid), and code block copying.
-
“Explain Language Of Things Cell with Anselmo” (Button per LOT cell)
- Click the comment icon (💬) on any LOT code cell toolbar (or use context menu).
- Sends the cell's code to the Anselmo ChatBot for a detailed explanation.
-
Add VISU Button (Experimental)
- Able to create a Visualization on the fly for realtime monitoring. (experimental)
- From VSIX
- Download the
.vsix
file forLOT Notebooks vx.x.x
. - In VS Code, press
Ctrl+Shift+X
(Extensions panel) → click the...
menu → Install from VSIX... → select the.vsix
.
- Download the
- Reload VS Code.
- Verify installation by searching "LOT" in the Extensions panel or checking the extension in the list.
-
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.
- Open Command Palette (
-
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.
- Each cell can contain LOT code, e.g.
-
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
- Use the command
-
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
- In the cell toolbar (the inline buttons), click Open Chatbot (it appears if the cell's language is
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. |
- Cannot find module 'mqtt': Ensure
mqtt
is listed under"dependencies"
inpackage.json
and no.vscodeignore
is excludingnode_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
inextension.ts
to open your actual webview or external URL.
- 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.
- Docs: Language of Things (LOT): Overview of what LOT is.
- Docs: LOT Syntax Reference: Detailed overview of LOT syntax categories, keywords, and operators.
- Docs: LOT Actions: Explains how to define and use LOT actions.
- Docs: LOT Models: Explains how models are set up and used in LOT.
- Docs: LOT Rules: Explains how to write and apply rules in LOT.
- Added Coreflux Entities view:
- Tree view displays Models, Actions, Rules, and Routes currently active on the connected MQTT broker.
- Status icons indicate if an entity definition exists in the open workspace notebooks and if it's synchronized with the broker.
- Added Entity synchronization commands (available from context menu in Coreflux Entities view):
- Update Broker from Cell: Pushes the code from the corresponding notebook cell to the broker.
- Update Cell from Coreflux: Pulls the code from the broker into the corresponding notebook cell.
- Create Definition in Notebook: Inserts a
DEFINE
statement for the entity at the cursor in the active notebook. - Remove Entity from Coreflux: Sends a command to remove the entity from the broker.
- Added Go To Definition for entities: Clicking an entity in the tree view navigates to its
DEFINE
statement in the corresponding notebook cell. - Added Anselmo ChatBot (beta preview):
- Integrated webview chatbot accessible from the notebook toolbar.
- Provides explanations and assistance for Language Of Things (LOT).
- Added Explain LOT Cell command to send cell content directly to the chatbot.
- Added the Visu add/ remove commands for broker version >1.6
- Polished MQTT credential handling
- Basic chart display for numeric data in cells
Made by the Coreflux team with a LOT of love ❤️