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.
| Setting | What it does |
|---|---|
| Notify when offline | send a message if the board stops reporting |
| Offline delay | how 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.notify() and the message
goes out.
Example
A water sensor on GPIO 4 that warns you once per leak.
#include <PlynxSimpleEsp32.h>
#define WATER_PIN 4
PlynxTimer timer;
bool warned = false;
void checkWater()
{
bool wet = digitalRead(WATER_PIN) == LOW;
if (wet && !warned) {
Plynx.notify("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.
notify(message) takes the text you want to read on the lock screen. Keep it
short and specific: “Water under the sink” tells you what to do, “Alert” does
not.
Rate limits
One push every 5 seconds per board. Send faster than that and the server refuses the extra ones instead of queueing them, so design for one message per real event, not one per reading.
Troubleshooting
| Problem | Check |
|---|---|
| No notification arrives | notifications are off for Plynx in the iOS settings |
| Only the first one arrives | the server is rate limiting; send less often |
| Nothing on the lock screen but the app shows it | Focus mode or Scheduled Summary is on |
| Board offline warnings never come | turn on Notify when offline in the widget settings |