Skip to main content

Rpi Gpio Inventory

@aaronge/rpi-gpio-inventoryv2026.11.05.1· 16d agoBEHAVIORSWORKFLOWS
01README

Read-only snapshot of Raspberry Pi GPIO pin state (function, level, pull, consumer) via pinctrl/libgpiod, as a typed, versioned Swamp model — tracks what changed on the header once HATs/sensors are attached. Never sets a pin.

02Release Notes

Ship the workflow in the package so a single ops repo can pull it and run it under swamp serve's own scheduler.

03Behaviors1
@aaronge/rpi-gpio-inventoryv2026.08.26.1rpi_gpio_inventory.ts

Global Arguments

ArgumentTypeDescription
pinctrlPath?stringPath to the pinctrl binary. Override for odd installs.
gpioinfoPath?stringPath to the gpioinfo binary. Override for odd installs.
primaryGpiochipName?stringThe gpiochip whose line indices are verified to match pinctrl's
fn readGpio()
Run pinctrl get and gpioinfo, join consumer data for

Resources

gpio(infinite)— Every GPIO pin's function/level/pull from pinctrl get, enriched
04Workflows1
@aaronge/rpi-gpio-inventory549a4f18-95c2-42a2-9c0c-c86728ad5661

Snapshot GPIO pin state from gpio-local and assert the read actually produced pins (a trivial sanity check — readGpio already refuses to write an empty resource, so this mainly guards against a future change weakening that). The point of this model is the diff across versions, not a threshold to alert on: pin state only changes when a HAT/sensor is physically attached or a device tree overlay changes, so this runs once a day rather than every 5 minutes like the telemetry extensions — matching @a

collectSnapshot GPIO pin state.
1.readGpiogpio-local.readGpio
assertFail the run only if the read produced no pins at all.
1.pins-present
reportPrint a one-screen summary. Depends on collect only (not assert), so it still runs when an assertion fails.
1.summarize
05Previous Versions1
2026.08.26.1
06Stats
A
93 / 100
Downloads
33
Archive size
9.3 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Docs keep secrets in a vault1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License1/2partial

    no SPDX license declared

  • Verified public repository2/2earned
07Platforms