Node reference
Every built-in node has its own page, covering what it does, its properties and its output. This page lists them all, grouped as in the editor's palette: General, Network and Hardware.
Kinds of node
Each node is one of three kinds. The kind decides where it can sit in a flow.
- Source: starts a message. Has no input. Every chain in a flow begins with one.
- Transform: takes a message in, and passes it on, changed, delayed or not at all.
- Sink: takes a message in and acts on it. Has no output.
See flows, nodes and messages for how they fit together.
Which node do I need?
| To… | Use |
|---|---|
| do something at a fixed interval | timer |
| do something once, when the flow starts | startup |
| send a test message by hand | inject |
| respond to a pin changing | interrupt, eswitch |
| respond to presses, long presses and double clicks | ebutton |
| read an analog input | adc |
| read a rotary knob | encoder |
| drive an LED strip | neopixel |
| switch an LED or relay | gpio out |
| dim an LED or set a motor's speed | pwm out |
| read a temperature, humidity or pressure sensor | bme280 |
| talk to another I2C device, or find its address | i2c device |
| draw on a display | display spi, display i2c |
| show readings as pages on a display | GUI nodes |
| change a message, or decide where it goes | function |
| set or clear a value between messages | change |
| send only changes, or limit the rate | filter |
| keep a number's history and show its histogram | journal |
| show the time of day | ntp |
| wait before passing a message on | delay |
| see what's in a message | debug |
| send or receive MQTT messages | mqtt publish, mqtt subscribe |
| call a web API | http request |
| serve a web page or API from the board | http in and http response |
| send or receive UDP packets | udp send, udp receive |
| read BLE beacons and sensors | ble scan |
| broadcast a reading over Bluetooth | ble advertise |
| let a phone, computer or another board read or set a value | ble characteristic out, ble characteristic in |
| send and receive text with a Bluetooth terminal app | ble uart in, ble uart out |
| read from, write to, or listen to a BLE sensor or another board | ble read, ble write, ble notify |
| know when WiFi connects or drops | wifi status |
| stop messages while WiFi is down | wifi gate |
General
Nodes that don't need a network or hardware:
| Node | Kind | What it does |
|---|---|---|
| inject | source | Sends one message with a fixed payload when you click it in the editor. |
| startup | source | Sends one message each time the flow starts. |
| timer | source | Sends a rising count at a fixed interval. |
| function | transform | Runs your own MicroPython on each message. |
| delay | transform | Passes each message on after a set wait. |
| filter | transform | Passes a message on only if it changed enough, or enough time has passed. |
| change | transform | Sets or deletes one message property or flow variable. |
| journal | transform | Keeps the recent history of a number as average, min and max rows, for a histogram. |
| debug | sink | Prints a message to the editor's console. |
Network
These nodes share the flow's WiFi network. A flow has one, set on any WiFi node's WiFi field.
| Node | Kind | What it does |
|---|---|---|
| wifi status | source | Reports when the WiFi connection comes up or goes down. |
| wifi gate | transform | Passes a message on only while WiFi is connected. |
| ntp | in and out | Sets the board's clock from the internet and sends the time. |
| mqtt subscribe | source | Sends a message for each MQTT message on a topic. |
| mqtt publish | sink | Publishes a message's payload to an MQTT topic. |
| http request | transform | Makes an HTTP request per message and passes on the response. |
| http in | source | Serves HTTP from the board, sending a message for each request. |
| http response | sink | Answers a request that arrived through http in. |
| udp receive | source | Sends a message for each UDP packet received on a port. |
| udp send | sink | Sends a message's payload as a UDP packet. |
Bluetooth
These nodes need a board with Bluetooth LE: ESP32, ESP32-S3, ESP32-C3 or ESP32-C5. They share the board's one radio.
| Node | Kind | What it does |
|---|---|---|
| ble scan | source | Sends a message for each Bluetooth LE advertisement nearby. |
| ble advertise | sink | Advertises the board's name and a payload over Bluetooth LE. |
| ble characteristic in | source | Sends a message when a connected device writes a characteristic. |
| ble characteristic out | sink | Sets a characteristic a connected device can read, and notifies it. |
| ble uart in | source | Receives text lines from a Bluetooth terminal app. |
| ble uart out | sink | Sends text to a Bluetooth terminal app. |
| ble read | transform | Reads a characteristic of another BLE device. |
| ble write | sink | Writes to a characteristic of another BLE device. |
| ble notify | source | Sends each value another BLE device notifies. |
The board's Bluetooth name is set once, in the BLE config. The devices the board connects to are BLE peers.
Hardware
Pin numbers are checked against your board before a deploy. See boards and processors.
| Node | Kind | What it does |
|---|---|---|
| interrupt | source | Fires the moment a pin changes. |
| eswitch | source | Reports a debounced switch opening or closing. |
| ebutton | source | Reports presses, releases, long presses and double clicks. |
| adc | source | Reads an analog pin, sending when the reading moves past its bounds. |
| encoder | source | Reports a rotary knob's value as it turns. |
| neopixel | sink | Lights a WS2812 / NeoPixel strip. |
| gpio out | sink | Sets a pin high or low. |
| pwm out | sink | Drives a pin with a variable duty cycle. |
| bme280 | source | Reads a BME280 or BMP280 sensor at a fixed interval. |
| i2c device | transform | Reads, writes or scans an I2C device that has no node of its own. |
| display spi | sink | Sends a frame to an SPI color display (ST7789). |
| display i2c | sink | Sends a frame to an I2C OLED display (SSD1306). |
Hardware is shared
Each pin, PWM output, I2C bus and SPI bus is set up once, and every node that uses it shares that one setup. Two nodes
can use the same pin only if they set it up the same way. For example, an interrupt and an eswitch can both read
an input pin with no pull, but a gpio out can't drive a pin an eswitch reads. When two nodes clash, the compile
stops and names both.
A function or custom node gets the same objects with
runtime.shared(), for example runtime.shared('i2c', 0).
Shared settings
Some settings are set once and shared by the nodes that use them:
- WiFi network and MQTT broker: config nodes, with the real passwords kept outside the flow file. See config nodes.
- I2C bus: the pins and clock for a bus, shared by every I2C node on it. See I2C bus.
- BLE: the board's Bluetooth name, shared by the ble nodes. See BLE.
- BLE peer: a device the board connects to, shared by the nodes that use it. See BLE peer.
- Touch panel: the controller, bus and size of a touch screen, used by a gui screen or a touch node. See touch panels.
Something missing?
A function node covers most gaps: a comparison, a sum, a calculation on a reading. For something you'll use again, write a custom node.