Documentation Index
Fetch the complete documentation index at: https://docs.coreflux.org/llms.txt
Use this file to discover all available pages before exploring further.
What is LoT?
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. Everything in LoT is built by defining four types of entities — Actions, Models, Routes, and Rules. Each one handles a different part of your automation, and inside them you use commands likePUBLISH, SET, and GET to make things happen.
The Four Building Blocks
Everything in LoT is built from four core constructs, each created with theDEFINE keyword:
| Construct | Purpose | Trigger Types |
|---|---|---|
| Actions | Execute logic when events occur | Time, Topic, System events, Manual |
| Models | Structure MQTT data into JSON schemas | Topic values, Action calls |
| Routes | Connect to external systems | Topic patterns |
| Rules | Control who can publish/subscribe | Client identity, Topic patterns |
Actions
Event-driven logic triggered by time or MQTT topics.
Models
Data schemas that structure MQTT messages into JSON.
Rules
Access control for topics and operations.
Routes
Connect to databases, brokers, and external services.
How They Work Together
A typical LoT solution combines all four building blocks. Each definition below uses valid LoT syntax — the same patterns you will see in the Models, Actions, Routes, and Rules references.| Step | What Happens |
|---|---|
| 1 | When sensors/temp001/raw updates, the Model publishes JSON to sensors/temp001/formatted |
| 2 | The Action reads temperature from that JSON and publishes to alerts/temp001/high_temp when it exceeds 80 |
| 3 | The Route inserts every message under sensors/# (raw, formatted, and related topics) into PostgreSQL |
| 4 | The Rule denies publish to alerts/# unless the client has AllowedSystemAlerts or is root |
What You’ll Learn on This Page
Below you’ll find practical examples showing LoT in action - from simple heartbeats to data transformation. Each example demonstrates a core capability you can implement immediately.Hello World
Three examples showing what LoT can do:| Example | Trigger | What it does |
|---|---|---|
| Heartbeat | Every 5 seconds | Publishes “ok” to indicate the system is alive |
| Echo | Message on input/message | Forwards the payload to another topic |
| SensorData | Value on sensors/raw | Formats raw sensor data into structured JSON |
Next Steps
Best Practices & Patterns
Naming, topic design, reusable logic, and pitfalls to avoid.
Actions Overview
Learn how Actions automate MQTT data processing.

