Docs

Widgets

A widget is a control on your phone bound to one pin on your board. You tap a Button, 1 arrives on V1. Your board writes a temperature to V2, the Gauge moves. Everything below is a variation on that.

Pump V1 = 0
Temperature V2 = 23.5
180
Brightness V3 = 180

They work. Go ahead and try them.

Direction decides your code

A widget that sends needs a PLYNX_WRITE(Vn) handler in your sketch. A widget that displays needs your sketch to call Plynx.virtualWrite(Vn, …). Nothing arrives by itself in either direction.

Controls: phone to board

WidgetSendsUse it for
Button1 or 0relays, lights, pumps
Styled Button1 or 0, with labels per statecontrols that say what they do
Slidera value in a rangebrightness, speed, position
Vertical Sliderthe same, uprightfaders, levels
Stepa value changed by a fixed amountsetpoints, angles
Number Inputa number you typeexact values, durations
Text Inputa line of textmessages, names
Menuthe index of an optionmodes, presets
Segmented Controlthe index of a segmenttwo to four visible choices
RGB Pickerthree channelsLED strips, colour
Joysticktwo axesrobots, pan and tilt
Tiltphone tiltsteering by motion
Volume0 to 100amplifiers, buzzers

Readouts: board to phone

WidgetShowsUse it for
Gaugeone number on a dialtemperature, pressure
Value Displayone number as textany reading, with a unit
Labeled Valuethe same, name on the linedense dashboards
LEDa staterunning, open, alarm
Level Displaya filling bartanks, batteries
Vertical Levelthe same, uprighttanks, silos
Chartvalues over timetrends, history
LCDtwo lines of textstatus lines
Mappoints on a maptrackers, fleets
Tablerows of name and valuelogs, device lists
Imagea picture from a URLsnapshots, diagrams
Videoa camera streamESP32-CAM, webcams

Both ways

WidgetWhat it does
Terminalprints logs, takes commands
Bridgelets one board write pins on another

Logic and alerts

These run on the server or in the app, and most need no code at all.

WidgetWhat it does
Automationswitches a pin at a set time, or at sunrise and sunset
Rulesif-then rules the server watches
Scenesets several pins with one tap
Notificationa push message to your phone
Emaila message to an inbox
Webhookcalls a URL when a pin changes
RTCgives your board the current time
Tabssplits a dashboard into pages

What holds for every widget

  • Pin type matters. V1 (virtual) is not D1 (digital). A widget bound to the wrong type looks connected and does nothing.
  • Plynx.run() lives in loop(). Without it nothing is sent or received.
  • Don’t flood the link. Keep it under ten values per second, and send only when a value actually changes.
  • A reboot loses state. The board comes up knowing nothing. Ask for what it needs with Plynx.syncVirtual(Vn) inside PLYNX_CONNECTED().