Docs

Notification

The Notification widget sends a push message to your phone. Your board decides when.

Use it for: a leak, a door opened, a freezer above temperature, a battery about to die, a cycle finished.

SettingWhat it does
Notify when offlinesend a message if the board stops reporting
Offline delayhow long to wait before calling it offline

Open these from the canvas: tap Edit, then long press the widget and choose Configure.

The widget takes no pin. Your sketch calls Plynx.logEvent() and the message goes out.

Example

A water sensor on GPIO 4 that warns you once per leak.

notification.ino
#include <PlynxSimpleEsp32.h>

#define WATER_PIN 4

PlynxTimer timer;
bool warned = false;

void checkWater()
{
  bool wet = digitalRead(WATER_PIN) == LOW;

  if (wet && !warned) {
    Plynx.logEvent("leak", "Water detected under the sink");
    warned = true;
  }

  if (!wet) {
    warned = false;
  }
}

void setup()
{
  Serial.begin(115200);
  pinMode(WATER_PIN, INPUT_PULLUP);

  // Auto setup: WiFi and the Plynx token are configured from the app.
  //
  // To provide them directly in the sketch instead, use:
  //   Plynx.begin(auth, ssid, pass);
  Plynx.begin();

  timer.setInterval(2000L, checkWater);
}

void loop()
{
  Plynx.run();
  timer.run();
}

The warned flag matters. Without it the sensor sends a notification every two seconds for as long as the floor is wet, and you turn notifications off.

logEvent(name, description) takes an event name and a message. The name groups the events, the description is what you read on the lock screen.

Rate limits

The server drops repeated events from the same board within a short window. Design for one message per real event, not per reading.

Troubleshooting

ProblemCheck
No notification arrivesnotifications are off for Plynx in the iOS settings
Only the first one arrivesthe server is rate limiting; send less often
Nothing on the lock screen but the app shows itFocus mode or Scheduled Summary is on
Board offline warnings never cometurn on Notify when offline in the widget settings

Next