
The Notebook Workflow
LoT Notebooks combine Documentation in Markdown and LoT code in a single file, so you can both run your code and keep your documentation together, using the notebook as living documentation for your project.Install and connect
Install the extension

- Open VS Code.
- Open the Extensions view in the sidebar (or use the shortcut
Ctrl+Shift+Xon Windows/Linux,Cmd+Shift+Xon macOS). - Search for LoT Notebooks by Coreflux and install it.
Connect to the broker

- Click the MQTT connection status in the bottom-left of VS Code, or click Connect to Broker in the Data Viewer (Coreflux sidebar).
- Enter your broker URL, username, and password.
Example URL and default login credentials
Example URL and default login credentials
Use a full URL such as
mqtt://localhost:1883 or mqtts://your-host:8883 for TLS.| Setting | Example (local defaults) |
|---|---|
| URL | mqtt://localhost:1883 |
| Username | root |
| Password | coreflux (change immediately in production) |
The extension securely stores your credentials. You only need to configure them once per workspace.
Create a new project

- In the Activity Bar, open the Coreflux view. Under PROJECT, use New File to create a notebook and save it in your workspace (use New Folder first if you want a dedicated project folder).
- In the notebook, add Markdown and LoT cells from the toolbar as needed.
Add LoT code to a LoT Notebook

- Open your LoT Notebook in VS Code.
- From the notebook toolbar, add a code cell.
- Type or paste your LoT code (
DEFINE ACTION,DEFINE MODEL, and so on). For a first example, use the code below.
What type of cells you can add to LoT Notebooks
LoT Notebooks support three types of cells, each with different behavior:Markdown Cells - Documentation

- Explain what your code does and why
- Document configuration requirements
- Add diagrams, tables, and formatted text
- Create section headers and navigation
LoT Code Cells - Runnable Logic

- The extension parses your code
- Sends it to the connected broker via MQTT
- The broker compiles and registers the definition
- You receive confirmation or error feedback
Python Cells - Advanced Logic

Running LoT

What else you can do with the LoT extension

| Capability | Why it helps |
|---|---|
| See what is running in the Broker | See what Actions, Models, Routes, and Rules the broker actually has after a deploy. |
| Remove LoT code | On Coreflux Explorer, remove one or more LoT entities. |
| Manage secrets and env vars | Configure the secrets within the broker, to manage secure credentials |
| See license usage | Spot license limits when deploy fails—before you debug LoT as a syntax issue. |
| See connected clients | See who is connected; useful when a device or app should be online but is not. |
| MQTT Data Viewer | Live topics and payloads in the Data Viewer. |
| Execution Trace | For a LoT cell, see it’s execution history and which topics and variables that run touched. |
Develop LoT Notebooks with AI

Version control with Git

.lotnb files aswell as any other files, like documentation, Docker files and supporting files.
Best Practices
Organize with Markdown
Organize with Markdown
Use markdown cells liberally to explain your code. Future you (and teammates) will appreciate the context.
One Definition Per Cell
One Definition Per Cell
Keep each Action, Model, or Route in its own cell. This makes debugging easier and allows selective execution.
Test Incrementally
Test Incrementally
Run cells one at a time when developing. This helps isolate issues and understand system behavior.
Use Descriptive Names
Use Descriptive Names
Name your Actions, Models, and Routes clearly. They appear in the broker’s entity lists and should be self-explanatory.
Troubleshooting
Cell won't run?
Cell won't run?
- Check that you’re connected to the broker (look for connection status in status bar)
- Verify your credentials are correct
- Ensure the broker is running and accessible
LoT not deployed — license limits?
LoT not deployed — license limits?
If running a cell shows an error and the broker rejects the definition because you have reached a license limit (for example on actions, routes, or another licensed resource), deployment stops and the message under the cell should describe the limit.
Open the Coreflux view in the Activity Bar and check the Coreflux Explorer section for your license status and usage so you can see what is capped and plan next steps (reduce definitions or adjust your license).
Python script not recognized?
Python script not recognized?
- Confirm the first line is
# Script Name: YourScriptName - Check for syntax errors in the Python code
- Ensure function names match what you’re calling from LoT
Entity not appearing after deployment?
Entity not appearing after deployment?
- Check the output for error messages
- Verify no syntax errors in your LoT code
- Use the Coreflux Entities panel to refresh the list
Next Steps
Debug in VS Code
Use cell output, Coreflux Entities, and live MQTT values to fix issues.
Explore Tutorials
Work through hands-on notebooks covering Actions, Models, Routes, and Python.

