relay

Your ideas, connected.

Configure a channel. Let your devices do the talking.

Make a connection

WebSocket

Give your project a channel. Bring your devices together.

Letters, numbers, hyphens, and underscores. Make it yours.

Two ESP32 boards share a Relay channel ESP32 ESP32 AOne shared channelESP32 B

Different devices. Same page.

Ready when you are
0 clientsWS · local development

Channel variables 0

You define the names. Your devices set the values.

Declare a variable without an initial value
DEVICE VALUES · READ ONLY
Names and types are saved. Values come from your devices.

ESP32 starter

A small handoff. Your own device logic.

Instructions + configured setup

Example logic to add: “ESP32 A writes button presses to button. ESP32 B turns its built-in LED on when button is 1, then writes back its LED state.” Declare both variables first and ask for the correct pins for your board.

Copy handoff includes your configured Wi-Fi password. The code is generated locally; Relay does not receive your credentials.

Included Wi-Fi & WebSocket code
Endpoint details
Host
Path
Port
Protocol
Idle cleanup
1 minute after the last client leaves

Configure Wi-Fi

Used only to generate code in this browser. Credentials are never saved or sent to Relay.

The conversation

0
WAITING
Your channel’s story will show up here. Connect to start listening.
Start here. Create a channel and declare variables.·Connect devices to the same endpoint.

From idea to connected.

Create a channel

Choose a unique name and select Create channel. Names are case-sensitive. Share the exact WebSocket endpoint with your board, or copy the configurator link under Endpoint details to open this channel again.

Declare your variables

Add a name such as temperature and choose its type. This only creates a definition. There is no initial value, and this configurator never publishes device values. Every connected client receives the channel definitions as a schema event.

Bring your ESP32

In Arduino IDE, install WebSockets by Markus Sattler and ArduinoJson 7. Select your ESP32 board. Use LLM handoff to copy five lines with your endpoint, exact variable names/types, and read/write protocol. Paste them into an LLM, then add your logic. For the connection setup, select Wi-Fi & WebSocket, enter your network under Configure Wi-Fi, and copy or download the complete sketch. It provides relayRead(name) and relayWrite(name, value) for your own logic. Copy handoff includes the full connection sketch with your configured SSID and password; credentials are generated locally and are not sent to Relay.

Read and write from devices

{"action":"write","variables":{"temperature":23.4}}

Declare temperature as a Number first. Send this packet from your ESP32. Every device on the same endpoint receives an update with the current values. New clients get a sync automatically; send {"action":"read"} to request another snapshot. Unset variables are absent from the data, rather than zero or null. Writes to undeclared names or the wrong type are rejected.

Connect another device

Copy the same endpoint into a second ESP32. For example, ESP32 A publishes button as 0 or 1, while ESP32 B checks that value and controls its built-in LED. ESP32 B can publish a separate led_state variable for ESP32 A to read. Declare both as Numbers first; match the pins and active levels to each board. Both boards can read and write. The configurator shows received values as a read-only monitor.

Keep the conversation going

No heartbeat code is needed in your sketch. Relay checks connections automatically, and the WebSocket library answers. Quiet connected devices stay online. A channel clears its live values 1 minute after the last client leaves and reopens at the same endpoint when a client returns; saved variable names and types remain available. Browser and ESP32 connections retry automatically.

Local development & deployment

For a local ESP32, open Relay using your computer’s LAN IP, such as http://192.168.1.20:8787, before copying code. The board cannot reach your computer using localhost. The ESP32 sketch uses plain WS. Publish an HTTP/WS endpoint on port 80 that forwards to the server on 127.0.0.1:8080. An HTTPS dashboard can still connect using WSS; the ESP32 uses WS on port 80.

Channels are shared by name, without accounts. Anyone with the name can read and write. Keep experiments free of secrets. Variable names and types are saved across restarts. Live values clear after 1 minute without clients. Connecting to the same endpoint reopens the channel automatically.

Start with the right names.

Declare a set of variable names and types for your project. Templates never create or overwrite values. Your devices supply the readings and commands.

Create a channel first, then choose a template. No values are initialized.