Skip to main content

Overview

LoT Notebooks provide an interactive, Jupyter-like development experience for the Language of Things (LoT) in Visual Studio Code. Using .lotnb files, you can create complete “System as Code” documents that combine both documentation and executable code in a single file.
Coreflux offers a complementary VS Code extension with two functionalities:
  1. LoT Notebooks Extension: For creating and working with .lotnb notebook files
  2. LoT Language Support: For syntax highlighting and working with individual .lot script files
This documentation focuses primarily on the notebook experience, which is the recommended approach for creating complete IoT orchestrations with Coreflux.

What are LoT Notebooks?

LoT Notebooks (.lotnb files) are interactive documents that contain:
  • Markdown cells: For documentation, explanations, diagrams, and context
  • LoT code cells: For executable LoT definitions (Models, Rules, Actions, Routes)
Similar to Jupyter notebooks, LoT Notebooks allow you to:

Interactive Execution

Write and execute code in individual cells and see results immediately.

Rich Documentation

Include rich documentation, explanations, and diagrams alongside your code.

System as Code

Share complete, self-documenting solutions that deploy directly to your broker.

Visualization

Visualize your system architecture and logic clearly.

Installation

To get started with LoT Notebooks, follow these steps:
1

Install the Extension

  1. Open Visual Studio Code
  2. Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X)
  3. Search for and install the extension:
    • LoT Notebooks by Coreflux
2

Configure Your MQTT Broker

Before creating your first notebook, configure your connection to the Coreflux MQTT broker:
  1. Open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  2. Type “LoT Notebook: Change Credentials” and select it
  3. Enter your broker details:
    • URL (e.g., mqtt://localhost:1883)
    • Username (default is root)
    • Password
    Changing MQTT Credentials in the LoT Notebooks extension

Using LoT Notebooks

Available Commands

The LoT Notebooks extension provides several commands to help you work with your notebooks and interact with the MQTT broker. Access these commands through the VS Code Command Palette. LoT Notebooks commands in the VS Code Command Palette

Uploading Models and Actions

After writing your models or actions in LoT, you can upload them to the MQTT broker directly from the notebook.
1

Create Definition

Create a code cell with your LoT definition (MODEL, ACTION, RULE, etc.).
2

Execute

Execute the cell by clicking the run button.
3

Auto-Upload

The extension will automatically upload your definition to the connected broker.
Uploading a LoT model to the MQTT broker