Skip to main content

Core Concepts

Understand the fundamental concepts of EdgeFlow automation platform.

EdgeFlow uses a visual, flow-based programming model. Master these core concepts to build powerful automations for your edge devices and IoT projects.

How It Works

Trigger Inject, HTTP, MQTT
Process Function, Switch
Output Debug, API, GPIO
msg.payload flows through each node
🔄

Flows

The container for your automation logic

A flow is a collection of nodes wired together. Each flow represents a complete automation workflow that executes independently. You can have multiple flows running simultaneously.

📁
Organization

Group related automations in separate flows for clarity

Independent

Each flow runs in isolation - errors don't affect other flows

🔀
Linkable

Flows can communicate via Link nodes for complex workflows

Flow States

Idle Saved but not deployed
Running Actively processing
Stopped Manually paused
Error Needs attention
📦

Nodes

Building blocks that perform specific actions

Nodes are the building blocks of EdgeFlow. Each node type performs a specific function - from reading sensors to sending notifications. EdgeFlow includes 100+ built-in nodes.

Node Anatomy

Input
ƒ Function
Output
Receives messages Processes data Sends results

Node Categories

⚙️ Core

Inject, Debug, Function, Switch, Change, Delay

🌐 Network

HTTP, MQTT, WebSocket, TCP, UDP

📍 Hardware

GPIO, PWM, I2C, SPI, Sensors

🗄️ Database

SQLite, PostgreSQL, MongoDB, Redis

💬 Messaging

Telegram, Email, Slack, Discord

🤖 AI

OpenAI, Anthropic, Ollama

💬

Messages

Data objects passed between nodes

Nodes communicate by passing messages. A message is a JavaScript object that flows through the wires. The main data is typically in msg.payload.

📄 Example Message
{
  "payload": 23.5,
  "topic": "sensors/temperature",
  "_msgid": "a1b2c3d4",
  "sensor": "DHT22",
  "location": "greenhouse"
}

Common Properties

msg.payload

The main data - can be any type (string, number, object, array)

msg.topic

Optional category or routing key for the message

msg._msgid

Unique identifier assigned to each message

Message Transformation

Inject
payload: "Hello"
Function
payload: "HELLO"
Debug
Output
🔗

Wires (Connections)

Links that connect nodes together

Wires connect the output port of one node to the input port of another. They define the path messages take through your flow.

Connection Rules

A
B
Basic Connection

One output to one input

A
B
C
Fan-out

One output to multiple inputs (message copied)

A
B
C
Fan-in

Multiple outputs to one input (sequential)

💡
Pro Tip

To delete a wire, click it to select (turns orange) then press Delete. To add a bend point, double-click the wire.

💾

Context (Variables)

Store data that persists between messages

Context lets you store data that persists across multiple messages. There are three scopes available, each with different visibility.

Global Available everywhere, persists on restart
global.get("apiKey") global.set("counter", 100)
Flow Shared within one flow
flow.get("lastReading") flow.set("total", 500)
Node Private to one node
context.get("count") context.set("state", "on")

Triggers

Ways to start your flow

Flows can be started in multiple ways. Choose the trigger that matches your use case.

Schedule

Run at specific times using cron

Every 5 minutes
🌐 HTTP

Respond to web requests

POST /api/webhook
📨 MQTT

React to IoT messages

sensors/+/temp
📍 GPIO

Hardware pin changes

Pin 17 rising edge
▶️ Manual

Click to run (Inject node)

Testing flows
🔗 Link

Called from another flow

Flow chaining

Best Practices

📐
Keep Flows Focused

One flow, one purpose. Split complex logic into multiple connected flows.

🏷️
Name Everything

Use descriptive names for flows and nodes. Your future self will thank you.

🐛
Debug Often

Add Debug nodes at key points to see what data is flowing through.

⚠️
Handle Errors

Use Catch nodes to gracefully handle failures and send alerts.