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
| BME280 | → | ESP32 |
|---|---|---|
| VIN | → | 3.3V |
| GND | → | GND |
| SDA | → | GPIO 21 |
| SCL | → | GPIO 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
- Arduino IDE 2.x — arduino.cc .
- ESP32 board support — Preferences → Additional Boards Manager URLs:
https://espressif.github.io/arduino-esp32/package_esp32_index.json. Then Tools → Board → Boards Manager, install “esp32” by Espressif. - Two libraries from Sketch → Include Library → Manage Libraries:
Adafruit BME280 Libraryandplexus-c. Ifplexus-cdoesn’t appear, grab the latest release zip and Sketch → Include Library → Add .ZIP Library.
Flash
- File → Examples → plexus-c → BME280_Dashboard.
- Edit
WIFI_SSID,WIFI_PASSWORD,PLEXUS_API_KEY(from your/dev/keyspage), andSOURCE_ID = "esp32-bme280". - Tools → Board → ESP32 Dev Module, pick the port, upload.
- Tools → Serial Monitor → 115200 baud — you should see
T=22.3°C H=54.1% P=1013.2 hPawithin ~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