Raspberry Pi GPIO Panel
Allows to change the state of the GPIO for Raspberry Pi devices using RPC commands. Requires handling of the RPC commands in the device firmware. Uses ‘getGpioStatus’ and ‘setGpioStatus’ RPC calls
Who it’s for
Anyone monitoring a Raspberry Pi’s GPIO header from a dashboard — confirming which outputs are driven, watching input pins on a test rig, checking a build’s state without controlling it. The Pi reports its pin states as telemetry or attributes.
What it does
The Raspberry Pi GPIO Panel displays the Pi’s full forty-pin header as a grid of indicator lamps, each lit from a data key whose label is the pin number. A key labelled 1 lights the lamp configured for pin 1, in the color set for that lamp, so the panel reads as a picture of the header.
- Preconfigured for the Pi — all forty header positions laid out, rather than a blank panel.
- State comes from ordinary telemetry or attributes, so no RPC support is needed on the device.
- Each lamp has its own color, which is how power, ground and signal pins are told apart on a full header.
- Lamp positions are set by row and column, so the layout mirrors the physical board.
- The pin binding is by data key label, so a key labelled
1drives the lamp for pin 1. - The Raspberry Pi GPIO Panel is read-only: switching pins belongs on the Raspberry Pi GPIO Control.
How to set up
Data keys
The Raspberry Pi GPIO Panel takes one data key per pin shown, bound by label.
| Key | Role | Type | Description |
|---|---|---|---|
1 | Lights the lamp configured for pin 1 | Timeseries | The 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 you want lit. |
Set each key’s label to the pin number before configuring the lamps — the binding is on that label, so a key labelled anything else leaves its lamp dark with no error. Pins with no matching key simply stay unlit, so a panel showing the whole header can be fed by only the keys that matter.
GPIO
| Setting | Default | Effect |
|---|---|---|
| GPIO leds | Forty lamps covering the Pi header | Each carries a pin number, a label, a row and column position, and a color |
| Background color | #b71c1c | The panel behind the lamps |
How to customize
- To show only the pins in use — remove the unused lamps from the GPIO leds list, or leave them and let them stay dark.
- To mirror the physical board — set each lamp’s row and column to its position on the header.
- To distinguish pin functions — give power, ground and signal lamps different colors.
- To distinguish panels — set the Background color.
Tips
- Decide whether the panel is a header diagram or a status board, and configure for one. The full forty lamps make a recognizable picture of the Pi; four labelled lamps make something an operator can actually read. Trying to be both produces a wall of dark lamps with the meaningful ones lost among them.
- Confirm the numbering the Pi’s agent reports before trusting the layout. Physical header positions and BCM GPIO numbers disagree for nearly every pin, and a panel keyed to the wrong scheme lights plausible-looking lamps in the wrong places.
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.