MetriBeacon
Menu

ESP32 and Arduino sensor

Send ESP32 sensor readings over HTTPS with the Arduino example.

On this page

What you need

An ESP32, Arduino-ESP32 Core 3.x, Wi-Fi, a MetriBeacon series and a device key.

How to do it

  1. Create a Gauge series using count for the raw example. Copy secrets.example.h to a private secrets.h and set Wi-Fi, key, series ID, NTP and sensor pin.
  2. Compile for your actual board. The classic ESP32 example uses GPIO 34 and a five-minute interval; adapt these to your hardware.
  3. Wait for clock synchronisation and check the serial status and first reading in the dashboard.

Good to know

The example stores one pending batch across restarts and retries the same content. It verifies TLS with its supplied CA certificate. Calibrate and convert raw counts before using physical units.

If something goes wrong

Check NTP, Wi-Fi and certificate trust if sending fails. Do not disable TLS verification or publish secrets.h or credential-bearing firmware. After an outage beyond 24 hours, review the outdated pending batch.