Ajuda e guiasAgentes LAN (rede interna) › ESP32 como agente LAN (flash do navegador)

ESP32 como agente LAN (flash do navegador)

6 min de leitura · Agentes LAN (rede interna)

Goal: Use an ESP32 (under €5) as a LAN agent for monitoring devices in your internal network via ICMP ping. Flashing is done directly from the browser over USB.

When to choose ESP32 vs Docker agent

  • ESP32 - if you want cheap, low-power hardware (200 mA at 5 V) just for ICMP ping. No Linux, no maintenance.
  • Docker / systemd agent - if you need the full set of checks (HTTP, port, SSL, DNS) and have a server, Raspberry Pi.

Supported hardware

  • ESP32 (classic, LX6) - the big dev kit board
  • ESP32-S3 - newer dual-core, native USB OTG
  • ESP32-C3 - RISC-V, smallest (Seeed Xiao C3)

Step 1: Create an agent in the dashboard

  1. Go to Dashboard → Agents.
  2. Create a new agent with a name (e.g. "Office ESP32").

Step 2: Flash from the browser

  1. From the agents list, click Flash an ESP32 as a LAN agent (or URL /dashboard/agents/esp32/flash).
  2. Pick the agent this device will belong to.
  3. Connect the ESP32 via a USB cable that supports data (some charging cables don't).
  4. Click 1. Connect ESP32 - the browser will show a USB port picker. Pick the ESP32.
  5. Click 2. Upload firmware - the firmware (~4 MB) downloads and flashes, about 30 s.
  6. Click 3. Write token - the auth token is written over serial. Done.

Supported browsers: Chrome, Edge, Opera (Web Serial API). Firefox and Safari are not supported yet. In that case, use esptool CLI - the exact command is shown in the "Use esptool CLI instead" section on the flasher page.

Step 3: Connect to WiFi

After flashing the ESP32 reboots and opens a captive portal:

  1. On your phone or laptop, find the WiFi network epulzio-esp32-XXXX (XXXX = last 4 chars of MAC).
  2. Connect - the config page opens automatically (or browse to 192.168.4.1).
  3. Pick your WiFi network, enter the password, click Save.
  4. The ESP32 joins your network and starts heartbeating to epulz.io within a few seconds.

Step 4: Create LAN ping monitors

  1. Click + New monitor.
  2. Type: LAN ping (via agent).
  3. Target: an IP address or hostname (e.g. 192.168.1.1, nas.local).
  4. Pick your agent (your ESP32) from the list.
  5. Interval: 1 min (recommended for LAN).

Status LED

StateMeaning
Fast blink (5 Hz)Not connected to WiFi - use captive portal
Slow blink (1 Hz)WiFi OK but auth token missing
SolidAll OK, agent talking to epulz.io

Reset and serial commands

  • Factory reset: hold the BOOT button for 5 seconds - clears WiFi credentials and token, opens the captive portal.
  • Serial console (115200 baud):
    • STATUS - prints hostname, SSID, IP, RSSI, pending results count.
    • TOKEN plzag_xxx - manually set the token (alternative to web flasher provisioning).
    • RESET - factory reset via serial.

FAQ

Which devices can I monitor?

Any IP device that replies to ICMP echo: routers, NAS, printers, cameras, IoT sensors, even other servers. The ESP32 sends 3 ping packets and returns the average RTT.

How many monitors can one ESP32 handle?

Practical limit is ~50-100 monitors at a 1-min interval. Each ping takes ~1-3 s and they run sequentially.

Does it work behind NAT without port forwarding?

Yes. The ESP32 initiates an outbound HTTPS connection to epulz.io every 30-60 s. No port forward or VPN required.

What's the power draw?

With WiFi connected, about 80-200 mA at 5 V. From a USB charger that's under 0.5 W continuous. For critical use we recommend a UPS or battery backup.