Skip to content
Stand with Ukraine flag

Basic GPIO Panel

  • Widget
  • v1.0.0
  • Sep 1, 2026
  • MIT license
  • v4.2+ | Built-in
Basic GPIO Panel

Allows to display state of the GPIO for target device using latest attribute values. You should set the label of the selected data key to GPIO pin number (e.g. ‘1’) and use boolean values for widget to display the data.

Widget Type
  • Latest
Category
  • Controls
Use Cases
  • Industrial Automation
  • Smart Home

Who it’s for

Anyone monitoring the pins of a microcontroller or single-board computer without controlling them — checking which outputs are active, confirming an input is reading high, watching a prototype’s state from a dashboard. The device reports pin states as telemetry or attributes rather than answering RPC calls.

What it does

The Basic GPIO Panel displays a grid of labelled indicator lamps, each lit from a data key whose label is the pin number. Three keys labelled 1, 2 and 3 light three lamps in the configured positions, each in its own color, so the panel reads as a hardware status board.

  • A lamp per pin, positioned by row and column, so the panel can be laid out to match the physical header.
  • State comes from ordinary telemetry or attributes, which means no firmware RPC support is needed.
  • Each lamp has its own color, so a group of related pins can share one and stand apart from the rest.
  • The panel background color is set directly, distinguishing several panels on one dashboard.
  • The pin binding is by data key label, so a key labelled 1 drives the lamp configured for pin 1.
  • The Basic GPIO Panel is read-only: switching pins belongs on the Basic GPIO Control, which sends RPC commands.

How to set up

Data keys

The Basic GPIO Panel takes one data key per pin, and binds them by label.

KeyRoleTypeDescription
1Lights the lamp configured for pin 1TimeseriesThe key’s label must be the pin number as a plain string, and the value must be boolean. Attributes work equally well. Add one key per pin shown.

Set each key’s label to the pin number before configuring the lamps — the binding is on that label, so a key labelled GPIO 1 rather than 1 leaves its lamp permanently dark with no error.

GPIO

SettingDefaultEffect
GPIO ledsThree lamps, pins 1–3Each carries a pin number, a label, a row and column position, and a color
Background color#b71c1cThe panel behind the lamps

How to customize

  • To match the physical header — edit the GPIO leds list, setting each pin’s number, caption, row and column.
  • To group related pins — give each lamp its own color, so outputs and inputs are distinguishable at a glance.
  • To distinguish panels — set the Background color.
  • To add a pin — use Add GPIO led, then add a data key whose label is that pin’s number.

Tips

  • Caption the lamps with what the pin does and keep the pin number only in the configuration. A board reading Pump running and Door closed is usable by someone who has never seen the schematic.
  • Pair this panel with a Basic GPIO Control on the same dashboard when the pins are both watched and driven. The control sends commands and the panel shows what the device actually reports, and the difference between the two is exactly what a commissioning engineer needs to see.

Share Your Widget with the Community

Built a custom widget? Export it as a JSON from ThingsBoard and publish it to the IoT Hub through a simple 4-step wizard (Upload, Listing, Readme, Review & Submit). Share it with thousands of ThingsBoard developers worldwide and get featured in the catalog.