Remote Relay Control (PHP)
ESP32 should poll:
/api/relay
(or
/api/relay.php
if rewrite is unavailable)
Relay 1
State:
ON
Queue ON
Queue OFF
Tip: use duration for timed ON (e.g. 5000 = 5 seconds).
Relay 2
State:
OFF
Queue ON
Queue OFF
Note: duration is optional; ESP32 auto-off is handled on device.
Status
This UI queues commands. The ESP32 should execute them when it polls
GET /api/relay
and then ACK via
POST /api/relay
.