Skip to content

Add telemetry component type (rssi, latency_ms, boot_reason)#332

Open
tyeth wants to merge 1 commit into
v2-displaysfrom
add-telemetry-components
Open

Add telemetry component type (rssi, latency_ms, boot_reason)#332
tyeth wants to merge 1 commit into
v2-displaysfrom
add-telemetry-components

Conversation

@tyeth

@tyeth tyeth commented Jun 11, 2026

Copy link
Copy Markdown
Member

Adds a new telemetry class of components to match the firmware PR adafruit/Adafruit_Wippersnapper_Python#262 (telemetry components with drivers for RSSI, latency, and boot reason) and protobuf PR adafruit/Wippersnapper_Protobuf#204.

Each telemetry component is a single host/device metric the firmware samples and reports inside a ws.telemetry.Event. The broker schedules reporting via ws.telemetry.Add (name, period); the component is identified by telemetryName, which must match a firmware telemetry driver's NAME.

What's added

  • components/telemetry/schema.json — new component-type schema: telemetryName, valueKind (float/bytes/bool), optional unit, reportOnce, defaultPeriod, plus the common fields.
  • components/telemetry/rssi/definition.json — Wi-Fi RSSI (float, dBm), periodic (default 300s).
  • components/telemetry/latency_ms/definition.json — broker round-trip latency (float, ms), periodic (default 300s).
  • components/telemetry/boot_reason/definition.json — boot reason (bytes), one-shot (reportOnce, period 0).
  • .github/workflows/validate.yml — register telemetry in the validation matrix and the filename allowlist regexes.

All three definitions are "published": false until firmware support ships.

Notes

  • Telemetry components have no associated image (like ds18x20).
  • README documentation for the new component type will follow in a separate PR stacked on top.

🤖 Generated with Claude Code

…boot_reason

Adds a new "telemetry" class of components matching adafruit/Adafruit_Wippersnapper_Python#262.
Each telemetry component is a single host/device metric reported as a
ws.telemetry.Event, identified by the name sent in ws.telemetry.Add.

- New components/telemetry/schema.json (telemetryName, valueKind, unit,
  reportOnce, defaultPeriod + common fields)
- rssi (float, dBm, periodic), latency_ms (float, ms, periodic),
  boot_reason (bytes, one-shot / period 0) definitions
- Register telemetry in validate.yml CI matrix and filename regexes

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
"documentationURL": "https://learn.adafruit.com/adafruit-io-basics-wippersnapper",
"published": false,
"telemetryName": "boot_reason",
"valueKind": "bytes",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valueKind seems identical in practice to sensorType - is there a reason we need a new type here?

"description": "Reports a best-effort boot/reset reason for the device as a string. Published once when added, never on a periodic cadence.",
"documentationURL": "https://learn.adafruit.com/adafruit-io-basics-wippersnapper",
"published": false,
"telemetryName": "boot_reason",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

telemetryName -> name to match PB

"minLength": 1,
"maxLength": 16
},
"reportOnce": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be included in theAdd message?

"description": "When true, this metric is reported a single time when added (period 0) rather than on a periodic cadence. Used for one-shot metrics such as boot_reason.",
"type": "boolean"
},
"defaultPeriod": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this redundant? reportOnce already enables a sensor to send a single metric, why would this require a 0 for toggling too? Should be handled by code (dropped if we see reportOnce in the Add payload).

"minLength": 3,
"maxLength": 24
},
"telemetryName": {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

name

@@ -0,0 +1,11 @@
{

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also include images for each component? Can be very simple text for now, Tyler can design icons later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants