LED

Docs / Widgets / Displays / LED
Display widget

LED

An LED shows a state your device reports: a door open, a motor running, a tank full. As a Bulb it is simply on or off. As a Solid Dot it dims with the value, from off at MIN to full brightness at MAX.

Device → dashboardBulb or Solid Dot1 Telemetry PointTP0 to TP127

Try it

The board's code writes TP0. Press and hold the red BUTTON: it sends 1 and the Bulb lights. Switch LED Style to Solid Dot, set MAX to 255 and turn the knob to dim it.

SimulationLIVE
Dashboard
This is the real widget from the dashboard.
Your device
NuttyFiMCU · Wi-FiONLINENUTTYFI0writes TP0Button: OFF
Knob (0–255)
This board's code writes the Telemetry Point.
LED Style
Telemetry Point MAX
Widget Color
Show
The LED only showsYou can't tap it to change anything. To control the device from the dashboard, use a Switch or Button. A common pair: a Switch sends the command, an LED on the point the device writes back shows what really happened.

How to add and set up

  1. Open the dashboard in edit modeOpen the device and turn on editing. Widgets now show a toolbar and a resize handle.
  2. Add an LEDPress + on the right edge of the canvas and pick LED. Drag it into place and resize it with the round handle.
  3. Open its settingsClick the gear in the widget's toolbar. The window opens with a Live Preview on the left.
  4. Link a Telemetry PointIn Linked Telemetry Points, pick the point your device writes, for example TP0. Check MIN and MAX in Configure TP and press Save TP Settings.
  5. Pick a style and colourIn LED Configuration, choose Bulb or Solid Dot. Pick a Widget Color, then press DONE.

The settings window, section by section

Open the window from the widget's toolbar: turn on edit mode and click the gear. On the left is a Live Preview of the tile that blinks the LED once so you see both the on and off look. Nothing changes on the dashboard until you press DONE; CANCEL or ✕ throws the changes away.

1. General Settings

SettingWhat it does
Widget NameThe title in the top-left of the tile, up to 20 characters. Name it after what it shows, like Door, Pump running or Tank full. Empty = LED.
Label ColorColour of the title only. Pick one of the colours, or press + to choose any colour.
Hide widget NameHides the title.
Hide Telemetry PointHides the small TP0 badge. The link still works.
Hide Widget BorderRemoves the coloured outline around the tile.

2. Linked Telemetry Points

Pick the point your device's code writes, from TP0 to TP127. A new LED isn't linked to anything, so it stays off until you link it. The pencil opens Configure TP:

FieldWhat it means for the LED
DATA TYPEinteger for whole numbers (0, 1, 255) or double for decimals. Use integer for a simple on/off LED.
UNITSNone, °C, °F, %, V, A, W or Custom. The LED doesn't show a unit, but other widgets on the same point do.
MINThe value that means off. Default 0.
MAXThe value that means on (Bulb) or full brightness (Solid Dot). Default 1. MAX must be bigger than MIN.
DECIMALSOnly for double: how many decimal places to keep.

These settings belong to the Telemetry Point, so every widget linked to the same point uses the same MIN and MAX.

3. LED Configuration

Bulb: a bulb icon inside the circle, off (grey) or on (filled with the Widget Color). Best for yes/no states. Solid Dot: a plain circle that dims with the value — min = off, max = full brightness. Best for levels, like a PWM output or a light sensor.

4. Widget Color

The colour of the lit LED and of the tile's outline.

What the LED shows for each value

The LED reads the linked Telemetry Point and compares it with that point's MIN and MAX.

StyleDevice sendsLED shows
BulbMIN (default 0)Off: grey circle, grey bulb
BulbMAX (default 1)On: circle filled with the Widget Color, white bulb
Solid DotMIN … MAXBrightness follows the value. With MIN 0 and MAX 255, sending 128 lights it about half way.
For smooth dimming, raise MAXWith the default range of 0 to 1, a Solid Dot can only be off or fully on. Set MAX to the top of your reading, for example 255 for an 8-bit PWM value or 100 for a percentage.

Send data from your device

The LED shows the value your board writes with SME.publish(), on the same point you linked on the dashboard. The examples use TP0.

C++ · Arduino
SME.publish(TP0, 1);   // LED on  (MAX)
SME.publish(TP0, 0);   // LED off (MIN)
Send when something changesDon't publish on every pass of loop(). Send when the value changes, or on a timer, for example every one or two seconds.

These are snippets. Your sketch also needs #include <SMEIoT.h>, SME.begin(...) in setup() and SME.run() in loop(). The full sketch tab shows a complete example; see the SDK quick start for more.

Move, resize and the widget toolbar

Turn on edit mode to change the layout. Each widget then shows a small toolbar at its top-right:

ButtonWhat it does
InfoA short card: what the LED does, its linked point and style, and a link to this guide.
SettingsOpens the settings window described above.
DuplicateAdds a copy with the same settings. Change its linked point to watch something else.
DeleteRemoves the widget from the dashboard.

On a small tile the toolbar folds into a ⋮ menu with the same actions; inside a Container it also has Remove from Container. Move: drag the tile. Resize: drag the round handle at the bottom-right corner — the circle grows with the tile.

Troubleshooting

What you seeCheck
The LED never lightsIs a Telemetry Point linked? A new LED has none, and no TP badge shows. Link the point your device writes.
Still off after linkingIs it the same point the code writes? TP1 on the dashboard won't see values sent to TP0.
Off even though the device sends a valueFor Bulb, the device must send the point's MAX. If MAX is 255 and the code sends 1, it stays off — try it in the simulation.
Solid Dot is only on or offMAX is still 1. Raise it, for example to 255, and save the Telemetry Point.
The dashboard didn't change after editingChanges only apply after DONE.
Nothing updates at allIs the device online? The LED only shows values the device sends.
Was this page helpful?