Control a group of LEDs
Load Remocon esp32-group-led on two ESP32 boards, each with an LED and resistor on GPIO4. Set the same GROUP_CHANNEL, server io.remocon.kr:55488, and distinct device indices 0 and 1.
Connect the workbench to the matching WebSocket server. Send TEXT to #lab$states: 10 enables LED 1, 01 enables LED 2, 11 enables both, and 00 disables both. The example requires exactly two binary digits; malformed payloads are ignored.
Discovery uses EMPTY #scan/ch, announcements on #detect/ch containing #lab, and metadata #lab$name (ESP32 LEDs:Tutorial) and #lab$ui (LED 1,LED 2). A controller's UI order, state length, and receiver indices must agree. Each board also publishes its own applied @$state.
A receiver starts with its output off and subscribes without overwriting the shared retained value with 00. If retained state is available, it applies that state. A disconnect can leave the last GPIO output active. A shared state publication is not an acknowledgment that every physical device applied it.
For eight devices and DIP-switch addressing, continue with Iris.