Skip to Content
GuidesESP32 sensor data to alerts

ESP32 Sensor Data to Slack Alerts

A minimal pipeline: ESP32 + BME280 → Plexus → Slack alert. The firmware sketch ships with the plexus-c  library; this guide covers the wiring, the threshold monitor, and the Slack integration.

Hardware

BME280ESP32
VIN3.3V
GNDGND
SDAGPIO 21
SCLGPIO 22

Use 3.3V, not 5V. Some breakouts have an onboard regulator and tolerate 5V — most don’t, and the chip dies silently if you guess wrong.

Install

  1. Arduino IDE 2.xarduino.cc .
  2. ESP32 board supportPreferences → Additional Boards Manager URLs: https://espressif.github.io/arduino-esp32/package_esp32_index.json. Then Tools → Board → Boards Manager, install “esp32” by Espressif.
  3. Two libraries from Sketch → Include Library → Manage Libraries: Adafruit BME280 Library and plexus-c. If plexus-c doesn’t appear, grab the latest release zip  and Sketch → Include Library → Add .ZIP Library.

Flash

  1. File → Examples → plexus-c → BME280_Dashboard.
  2. Edit WIFI_SSID, WIFI_PASSWORD, PLEXUS_API_KEY (from your /dev/keys page), and SOURCE_ID = "esp32-bme280".
  3. Tools → Board → ESP32 Dev Module, pick the port, upload.
  4. Tools → Serial Monitor → 115200 baud — you should see T=22.3°C H=54.1% P=1013.2 hPa within ~5 seconds.

Add the alert

Register a temperature threshold monitor:

export PLEXUS_API_KEY=plx_xxx # from your /dev/keys page curl -sS -X POST https://app.plexus.company/api/monitors \ -H "x-api-key: $PLEXUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source_id": "esp32-bme280", "metric": "temperature", "threshold": { "max": 35.0, "severity": "warning", "message": "BME280 above 35°C — check the room" } }'

Then connect Slack in the Plexus app (Integrations → Slack → Connect), pick a channel, and enable alert.triggered and alert.resolved.

Test

Press the BME280 between your fingers. ~15–20 seconds of palm contact crosses 35°C, and the Slack message lands.

Last updated on